Adding back --break_on_instruction.
This commit is contained in:
parent
3e52a99adf
commit
7fe0a10d43
|
@ -18,6 +18,9 @@
|
||||||
DECLARE_bool(debug);
|
DECLARE_bool(debug);
|
||||||
DECLARE_bool(always_disasm);
|
DECLARE_bool(always_disasm);
|
||||||
|
|
||||||
|
DECLARE_uint64(break_on_instruction);
|
||||||
|
DECLARE_uint64(break_on_memory);
|
||||||
|
|
||||||
|
|
||||||
namespace alloy {
|
namespace alloy {
|
||||||
|
|
||||||
|
|
|
@ -24,3 +24,9 @@ DEFINE_bool(debug, DEFAULT_DEBUG_FLAG,
|
||||||
|
|
||||||
DEFINE_bool(always_disasm, false,
|
DEFINE_bool(always_disasm, false,
|
||||||
"Always add debug info to functions, even when no debugger is attached.");
|
"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.");
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
#include <alloy/frontend/ppc/ppc_hir_builder.h>
|
#include <alloy/frontend/ppc/ppc_hir_builder.h>
|
||||||
|
|
||||||
|
#include <alloy/alloy-private.h>
|
||||||
#include <alloy/frontend/tracing.h>
|
#include <alloy/frontend/tracing.h>
|
||||||
#include <alloy/frontend/ppc/ppc_context.h>
|
#include <alloy/frontend/ppc/ppc_context.h>
|
||||||
#include <alloy/frontend/ppc/ppc_disasm.h>
|
#include <alloy/frontend/ppc/ppc_disasm.h>
|
||||||
|
@ -125,10 +126,10 @@ int PPCHIRBuilder::Emit(FunctionInfo* symbol_info, bool with_debug_info) {
|
||||||
typedef int (*InstrEmitter)(PPCHIRBuilder& f, InstrData& i);
|
typedef int (*InstrEmitter)(PPCHIRBuilder& f, InstrData& i);
|
||||||
InstrEmitter emit = (InstrEmitter)i.type->emit;
|
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");
|
Comment("--break-on-instruction target");
|
||||||
DebugBreak();
|
DebugBreak();
|
||||||
}*/
|
}
|
||||||
|
|
||||||
if (!i.type->emit || emit(*this, i)) {
|
if (!i.type->emit || emit(*this, i)) {
|
||||||
XELOGCPU("Unimplemented instr %.8X %.8X %s",
|
XELOGCPU("Unimplemented instr %.8X %.8X %s",
|
||||||
|
|
|
@ -20,9 +20,6 @@ DECLARE_bool(trace_user_calls);
|
||||||
DECLARE_bool(trace_kernel_calls);
|
DECLARE_bool(trace_kernel_calls);
|
||||||
DECLARE_uint64(trace_thread_mask);
|
DECLARE_uint64(trace_thread_mask);
|
||||||
|
|
||||||
DECLARE_uint64(break_on_instruction);
|
|
||||||
DECLARE_uint64(break_on_memory);
|
|
||||||
|
|
||||||
DECLARE_string(load_module_map);
|
DECLARE_string(load_module_map);
|
||||||
|
|
||||||
DECLARE_string(dump_path);
|
DECLARE_string(dump_path);
|
||||||
|
|
|
@ -25,13 +25,6 @@ DEFINE_uint64(trace_thread_mask, -1,
|
||||||
"Trace threads with IDs in the mask, or -1 for all.");
|
"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:
|
// Debugging:
|
||||||
DEFINE_string(load_module_map, "",
|
DEFINE_string(load_module_map, "",
|
||||||
"Loads a .map for symbol names and to diff with the generated symbol "
|
"Loads a .map for symbol names and to diff with the generated symbol "
|
||||||
|
|
Loading…
Reference in New Issue