From 2ed6f478c174b9240965bd0cd78a48a36d3957a6 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Mon, 6 Jan 2014 22:51:06 -0800 Subject: [PATCH] Adding --always_disasm. --- src/alloy/alloy-private.h | 1 + src/alloy/alloy.cc | 3 +++ src/alloy/frontend/ppc/ppc_translator.cc | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) 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(); }