mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 19:00:14 -05:00
Merge pull request #8569 from merryhime/watchpoints
dynarmic: Abort watchpoints ASAP
This commit is contained in:
commit
09300abe92
5 changed files with 4 additions and 9 deletions
2
externals/dynarmic
vendored
2
externals/dynarmic
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 9ebf6a8384836322ce58beb7ca10f5d4c66e9211
|
Subproject commit 1f0a43753e51e4855ee6c0936d30807f373245cc
|
|
@ -147,7 +147,6 @@ void ARM_Interface::Run() {
|
||||||
|
|
||||||
// Notify the debugger and go to sleep if a watchpoint was hit.
|
// Notify the debugger and go to sleep if a watchpoint was hit.
|
||||||
if (Has(hr, watchpoint)) {
|
if (Has(hr, watchpoint)) {
|
||||||
RewindBreakpointInstruction();
|
|
||||||
if (system.DebuggerEnabled()) {
|
if (system.DebuggerEnabled()) {
|
||||||
system.GetDebugger().NotifyThreadWatchpoint(current_thread, *HaltedWatchpoint());
|
system.GetDebugger().NotifyThreadWatchpoint(current_thread, *HaltedWatchpoint());
|
||||||
}
|
}
|
||||||
|
|
|
@ -203,7 +203,7 @@ public:
|
||||||
static constexpr Dynarmic::HaltReason break_loop = Dynarmic::HaltReason::UserDefined2;
|
static constexpr Dynarmic::HaltReason break_loop = Dynarmic::HaltReason::UserDefined2;
|
||||||
static constexpr Dynarmic::HaltReason svc_call = Dynarmic::HaltReason::UserDefined3;
|
static constexpr Dynarmic::HaltReason svc_call = Dynarmic::HaltReason::UserDefined3;
|
||||||
static constexpr Dynarmic::HaltReason breakpoint = Dynarmic::HaltReason::UserDefined4;
|
static constexpr Dynarmic::HaltReason breakpoint = Dynarmic::HaltReason::UserDefined4;
|
||||||
static constexpr Dynarmic::HaltReason watchpoint = Dynarmic::HaltReason::UserDefined5;
|
static constexpr Dynarmic::HaltReason watchpoint = Dynarmic::HaltReason::MemoryAbort;
|
||||||
static constexpr Dynarmic::HaltReason no_execute = Dynarmic::HaltReason::UserDefined6;
|
static constexpr Dynarmic::HaltReason no_execute = Dynarmic::HaltReason::UserDefined6;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -155,7 +155,7 @@ public:
|
||||||
const auto match{parent.MatchingWatchpoint(addr, size, type)};
|
const auto match{parent.MatchingWatchpoint(addr, size, type)};
|
||||||
if (match) {
|
if (match) {
|
||||||
parent.halted_watchpoint = match;
|
parent.halted_watchpoint = match;
|
||||||
ReturnException(parent.jit.load()->Regs()[15], ARM_Interface::watchpoint);
|
parent.jit.load()->HaltExecution(ARM_Interface::watchpoint);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,7 +204,6 @@ std::shared_ptr<Dynarmic::A32::Jit> ARM_Dynarmic_32::MakeJit(Common::PageTable*
|
||||||
|
|
||||||
// Code cache size
|
// Code cache size
|
||||||
config.code_cache_size = 512_MiB;
|
config.code_cache_size = 512_MiB;
|
||||||
config.far_code_offset = 400_MiB;
|
|
||||||
|
|
||||||
// Allow memory fault handling to work
|
// Allow memory fault handling to work
|
||||||
if (system.DebuggerEnabled()) {
|
if (system.DebuggerEnabled()) {
|
||||||
|
@ -215,7 +214,6 @@ std::shared_ptr<Dynarmic::A32::Jit> ARM_Dynarmic_32::MakeJit(Common::PageTable*
|
||||||
if (!page_table) {
|
if (!page_table) {
|
||||||
// Don't waste too much memory on null_jit
|
// Don't waste too much memory on null_jit
|
||||||
config.code_cache_size = 8_MiB;
|
config.code_cache_size = 8_MiB;
|
||||||
config.far_code_offset = 4_MiB;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Safe optimizations
|
// Safe optimizations
|
||||||
|
|
|
@ -198,7 +198,7 @@ public:
|
||||||
const auto match{parent.MatchingWatchpoint(addr, size, type)};
|
const auto match{parent.MatchingWatchpoint(addr, size, type)};
|
||||||
if (match) {
|
if (match) {
|
||||||
parent.halted_watchpoint = match;
|
parent.halted_watchpoint = match;
|
||||||
ReturnException(parent.jit.load()->GetPC(), ARM_Interface::watchpoint);
|
parent.jit.load()->HaltExecution(ARM_Interface::watchpoint);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -264,7 +264,6 @@ std::shared_ptr<Dynarmic::A64::Jit> ARM_Dynarmic_64::MakeJit(Common::PageTable*
|
||||||
|
|
||||||
// Code cache size
|
// Code cache size
|
||||||
config.code_cache_size = 512_MiB;
|
config.code_cache_size = 512_MiB;
|
||||||
config.far_code_offset = 400_MiB;
|
|
||||||
|
|
||||||
// Allow memory fault handling to work
|
// Allow memory fault handling to work
|
||||||
if (system.DebuggerEnabled()) {
|
if (system.DebuggerEnabled()) {
|
||||||
|
@ -275,7 +274,6 @@ std::shared_ptr<Dynarmic::A64::Jit> ARM_Dynarmic_64::MakeJit(Common::PageTable*
|
||||||
if (!page_table) {
|
if (!page_table) {
|
||||||
// Don't waste too much memory on null_jit
|
// Don't waste too much memory on null_jit
|
||||||
config.code_cache_size = 8_MiB;
|
config.code_cache_size = 8_MiB;
|
||||||
config.far_code_offset = 4_MiB;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Safe optimizations
|
// Safe optimizations
|
||||||
|
|
Loading…
Reference in a new issue