diff --git a/src/alloy/alloy-private.h b/src/alloy/alloy-private.h index 76b59e381..213b4bfad 100644 --- a/src/alloy/alloy-private.h +++ b/src/alloy/alloy-private.h @@ -18,6 +18,9 @@ DECLARE_bool(debug); DECLARE_bool(always_disasm); +DECLARE_uint64(break_on_instruction); +DECLARE_uint64(break_on_memory); + namespace alloy { diff --git a/src/alloy/alloy.cc b/src/alloy/alloy.cc index 1fd5261c0..714036f71 100644 --- a/src/alloy/alloy.cc +++ b/src/alloy/alloy.cc @@ -24,3 +24,9 @@ DEFINE_bool(debug, DEFAULT_DEBUG_FLAG, DEFINE_bool(always_disasm, false, "Always add debug info to functions, even when no debugger is attached."); + +// Breakpoints: +DEFINE_uint64(break_on_instruction, 0, + "int3 before the given guest address is executed."); +DEFINE_uint64(break_on_memory, 0, + "int3 on read/write to the given memory address."); diff --git a/src/alloy/frontend/ppc/ppc_hir_builder.cc b/src/alloy/frontend/ppc/ppc_hir_builder.cc index 501fc3f15..2fc49396a 100644 --- a/src/alloy/frontend/ppc/ppc_hir_builder.cc +++ b/src/alloy/frontend/ppc/ppc_hir_builder.cc @@ -9,6 +9,7 @@ #include +#include #include #include #include @@ -125,10 +126,10 @@ int PPCHIRBuilder::Emit(FunctionInfo* symbol_info, bool with_debug_info) { typedef int (*InstrEmitter)(PPCHIRBuilder& f, InstrData& i); InstrEmitter emit = (InstrEmitter)i.type->emit; - /*if (i.address == FLAGS_break_on_instruction) { + if (i.address == FLAGS_break_on_instruction) { Comment("--break-on-instruction target"); DebugBreak(); - }*/ + } if (!i.type->emit || emit(*this, i)) { XELOGCPU("Unimplemented instr %.8X %.8X %s", diff --git a/src/xenia/cpu/cpu-private.h b/src/xenia/cpu/cpu-private.h index 1b49862f6..3272d2ece 100644 --- a/src/xenia/cpu/cpu-private.h +++ b/src/xenia/cpu/cpu-private.h @@ -20,9 +20,6 @@ DECLARE_bool(trace_user_calls); DECLARE_bool(trace_kernel_calls); DECLARE_uint64(trace_thread_mask); -DECLARE_uint64(break_on_instruction); -DECLARE_uint64(break_on_memory); - DECLARE_string(load_module_map); DECLARE_string(dump_path); diff --git a/src/xenia/cpu/cpu.cc b/src/xenia/cpu/cpu.cc index 12c8118f6..389aeee18 100644 --- a/src/xenia/cpu/cpu.cc +++ b/src/xenia/cpu/cpu.cc @@ -25,13 +25,6 @@ DEFINE_uint64(trace_thread_mask, -1, "Trace threads with IDs in the mask, or -1 for all."); -// Breakpoints: -DEFINE_uint64(break_on_instruction, 0, - "int3 before the given guest address is executed."); -DEFINE_uint64(break_on_memory, 0, - "int3 on read/write to the given memory address."); - - // Debugging: DEFINE_string(load_module_map, "", "Loads a .map for symbol names and to diff with the generated symbol "