diff --git a/src/alloy/alloy-private.h b/src/alloy/alloy-private.h index fb0c8561c..76b59e381 100644 --- a/src/alloy/alloy-private.h +++ b/src/alloy/alloy-private.h @@ -16,6 +16,7 @@ DECLARE_bool(debug); +DECLARE_bool(always_disasm); namespace alloy { diff --git a/src/alloy/alloy.cc b/src/alloy/alloy.cc index 2d718b614..1fd5261c0 100644 --- a/src/alloy/alloy.cc +++ b/src/alloy/alloy.cc @@ -21,3 +21,6 @@ using namespace alloy; DEFINE_bool(debug, DEFAULT_DEBUG_FLAG, "Allow debugging and retain debug information."); + +DEFINE_bool(always_disasm, false, + "Always add debug info to functions, even when no debugger is attached."); diff --git a/src/alloy/frontend/ppc/ppc_translator.cc b/src/alloy/frontend/ppc/ppc_translator.cc index c4121fb13..efc0b8d5d 100644 --- a/src/alloy/frontend/ppc/ppc_translator.cc +++ b/src/alloy/frontend/ppc/ppc_translator.cc @@ -74,7 +74,7 @@ int PPCTranslator::Translate( // NOTE: we only want to do this when required, as it's expensive to build. DebugInfo* debug_info = NULL; - if (FLAGS_debug || with_debug_info) { + if (FLAGS_always_disasm || with_debug_info) { debug_info = new DebugInfo(); }