[Lldb-commits] [lldb] [lldb-dap] Show assembly depending on `stop-disassembly-display` settings (PR #136494)
Ely Ronnen via lldb-commits
lldb-commits at lists.llvm.org
Mon Apr 21 14:16:42 PDT 2025
================
@@ -163,6 +163,25 @@ GetEnvironmentFromArguments(const llvm::json::Object &arguments) {
return envs;
}
+std::string GetStopDisassemblyDisplay(lldb::SBDebugger &debugger) {
+ std::string stop_disassembly_display = "no-debuginfo"; // default value
+ lldb::SBCommandReturnObject result;
+ debugger.GetCommandInterpreter().HandleCommand(
+ "settings show stop-disassembly-display", result);
+ if (result.Succeeded()) {
+ std::string output = result.GetOutput();
+ size_t pos = output.find("stop-disassembly-display");
+ if (pos != std::string::npos) {
+ size_t start = output.find("= ", pos) + 2;
+ size_t end = output.find("\n", start);
+ stop_disassembly_display =
+ output.substr(start, end - start); // trim whitespace
+ }
+ }
----------------
eronnen wrote:
Changed it to `SBDebugger::GetSetting` now, apparently `OptionValueEnumeration::ToJSON` implementation was missing
https://github.com/llvm/llvm-project/pull/136494
More information about the lldb-commits
mailing list