From 5355183590c4b01551f031fb56811e6bd84e41ba Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Tue, 1 Sep 2015 09:38:55 -0700 Subject: [PATCH] Don't double-break on debugbreak. --- src/xenia/cpu/backend/x64/x64_emitter.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/xenia/cpu/backend/x64/x64_emitter.cc b/src/xenia/cpu/backend/x64/x64_emitter.cc index 49568fce7..bc5f74269 100644 --- a/src/xenia/cpu/backend/x64/x64_emitter.cc +++ b/src/xenia/cpu/backend/x64/x64_emitter.cc @@ -304,7 +304,9 @@ uint64_t TrapDebugPrint(void* raw_context, uint64_t address) { uint64_t TrapDebugBreak(void* raw_context, uint64_t address) { auto thread_state = *reinterpret_cast(raw_context); XELOGE("Trap!"); - xe::debugging::Break(); + if (FLAGS_break_on_debugbreak) { + xe::debugging::Break(); + } return 0; } @@ -320,9 +322,6 @@ void X64Emitter::Trap(uint16_t trap_type) { // Always trap? // TODO(benvanik): post software interrupt to debugger. CallNative(TrapDebugBreak, 0); - if (FLAGS_break_on_debugbreak) { - db(0xCC); - } break; case 25: // ?