diff --git a/core/debugger.cpp b/core/debugger.cpp index e97ca24..edfac23 100644 --- a/core/debugger.cpp +++ b/core/debugger.cpp @@ -119,7 +119,7 @@ static void RegisterSettings() R"({ "title" : "Stack Variable Annotations", "type" : "boolean", - "default" : true, + "default" : false, "description" : "Add stack variable annotations", "ignore" : ["SettingsProjectScope", "SettingsResourceScope"] })"); diff --git a/core/debuggercontroller.cpp b/core/debuggercontroller.cpp index a56670c..bcef868 100644 --- a/core/debuggercontroller.cpp +++ b/core/debuggercontroller.cpp @@ -31,6 +31,7 @@ DebuggerController::DebuggerController(BinaryViewRef data) m_state = new DebuggerState(data, this); m_adapter = nullptr; + m_shouldAnnotateStackVariable = Settings::Instance()->Get("debugger.stackVariableAnnotations"); RegisterEventCallback([this](const DebuggerEvent& event) { EventHandler(event); }, "Debugger Core"); } @@ -1944,7 +1945,7 @@ void DebuggerController::DefineVariablesRecursive(uint64_t address, ConfidenceGet("debugger.stackVariableAnnotations")) + if (!m_shouldAnnotateStackVariable) return; if (!m_liveView) diff --git a/core/debuggercontroller.h b/core/debuggercontroller.h index 576a127..5ff4abc 100644 --- a/core/debuggercontroller.h +++ b/core/debuggercontroller.h @@ -95,6 +95,7 @@ namespace BinaryNinjaDebugger { bool m_initialBreakpointSeen = false; bool m_firstLaunch = true; + bool m_shouldAnnotateStackVariable = false; void EventHandler(const DebuggerEvent& event); void UpdateStackVariables();