Skip to content

[lldb-dap] Rename enableDisplayExtendedBacktrace #109521

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ def request_launch(
runInTerminal=False,
postRunCommands=None,
enableAutoVariableSummaries=False,
enableDisplayExtendedBacktrace=False,
displayExtendedBacktrace=False,
enableSyntheticChildDebugging=False,
commandEscapePrefix=None,
customFrameFormat=None,
Expand Down Expand Up @@ -831,7 +831,7 @@ def request_launch(

args_dict["enableAutoVariableSummaries"] = enableAutoVariableSummaries
args_dict["enableSyntheticChildDebugging"] = enableSyntheticChildDebugging
args_dict["enableDisplayExtendedBacktrace"] = enableDisplayExtendedBacktrace
args_dict["displayExtendedBacktrace"] = displayExtendedBacktrace
args_dict["commandEscapePrefix"] = commandEscapePrefix
command_dict = {"command": "launch", "type": "request", "arguments": args_dict}
response = self.send_recv(command_dict)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def launch(
expectFailure=False,
postRunCommands=None,
enableAutoVariableSummaries=False,
enableDisplayExtendedBacktrace=False,
displayExtendedBacktrace=False,
enableSyntheticChildDebugging=False,
commandEscapePrefix=None,
customFrameFormat=None,
Expand Down Expand Up @@ -428,7 +428,7 @@ def cleanup():
runInTerminal=runInTerminal,
postRunCommands=postRunCommands,
enableAutoVariableSummaries=enableAutoVariableSummaries,
enableDisplayExtendedBacktrace=enableDisplayExtendedBacktrace,
displayExtendedBacktrace=displayExtendedBacktrace,
enableSyntheticChildDebugging=enableSyntheticChildDebugging,
commandEscapePrefix=commandEscapePrefix,
customFrameFormat=customFrameFormat,
Expand Down Expand Up @@ -468,7 +468,7 @@ def build_and_launch(
postRunCommands=None,
lldbDAPEnv=None,
enableAutoVariableSummaries=False,
enableDisplayExtendedBacktrace=False,
displayExtendedBacktrace=False,
enableSyntheticChildDebugging=False,
commandEscapePrefix=None,
customFrameFormat=None,
Expand Down Expand Up @@ -505,7 +505,7 @@ def build_and_launch(
postRunCommands=postRunCommands,
enableAutoVariableSummaries=enableAutoVariableSummaries,
enableSyntheticChildDebugging=enableSyntheticChildDebugging,
enableDisplayExtendedBacktrace=enableDisplayExtendedBacktrace,
displayExtendedBacktrace=displayExtendedBacktrace,
commandEscapePrefix=commandEscapePrefix,
customFrameFormat=customFrameFormat,
customThreadFormat=customThreadFormat,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_stackTrace(self):
"DYLD_LIBRARY_PATH=/usr/lib/system/introspection",
"DYLD_INSERT_LIBRARIES=" + backtrace_recording_lib,
],
enableDisplayExtendedBacktrace=True,
displayExtendedBacktrace=True,
)
source = "main.m"
breakpoint = line_number(source, "breakpoint 1")
Expand Down
2 changes: 1 addition & 1 deletion lldb/tools/lldb-dap/DAP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ DAP::DAP()
focus_tid(LLDB_INVALID_THREAD_ID), stop_at_entry(false), is_attach(false),
enable_auto_variable_summaries(false),
enable_synthetic_child_debugging(false),
enable_display_extended_backtrace(false),
display_extended_backtrace(false),
restarting_process_id(LLDB_INVALID_PROCESS_ID),
configuration_done_sent(false), waiting_for_run_in_terminal(false),
progress_event_reporter(
Expand Down
2 changes: 1 addition & 1 deletion lldb/tools/lldb-dap/DAP.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ struct DAP {
bool is_attach;
bool enable_auto_variable_summaries;
bool enable_synthetic_child_debugging;
bool enable_display_extended_backtrace;
bool display_extended_backtrace;
// The process event thread normally responds to process exited events by
// shutting down the entire adapter. When we're restarting, we keep the id of
// the old process here so we can detect this case and keep running.
Expand Down
4 changes: 2 additions & 2 deletions lldb/tools/lldb-dap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This binary is not packaged with the VS Code extension.

There are multiple ways to obtain this binary:
* build it from source (see [LLDB's build instructions](https://lldb.llvm.org/resources/build.html))
* download it one of the relase packages from the [LLVM release page](https://github.com/llvm/llvm-project/releases/). The `LLVM-19.1.0-{operating_system}.tar.xz` packages contain a prebuilt `lldb-dap` binary.
* download one of the relase packages from the [LLVM release page](https://github.com/llvm/llvm-project/releases/). The `LLVM-19.1.0-{operating_system}.tar.xz` packages contain a prebuilt `lldb-dap` binary.
* use the binary provided by your toolchain (for example `xcrun -f lldb-dap` on macOS) or contact your toolchain vendor to include it.

By default, the VS Code extension will expect to find `lldb-dap` in your `PATH`.
Expand Down Expand Up @@ -188,8 +188,8 @@ specific key/value pairs:
|**commandEscapePrefix** | string | | The escape prefix to use for executing regular LLDB commands in the Debug Console, instead of printing variables. Defaults to a back-tick (`\``). If it's an empty string, then all expression in the Debug Console are treated as regular LLDB commands.
|**customFrameFormat** | string | | If non-empty, stack frames will have descriptions generated based on the provided format. See https://lldb.llvm.org/use/formatting.html for an explanation on format strings for frames. If the format string contains errors, an error message will be displayed on the Debug Console and the default frame names will be used. This might come with a performance cost because debug information might need to be processed to generate the description.
|**customThreadFormat** | string | | Same as `customFrameFormat`, but for threads instead of stack frames.
|**displayExtendedBacktrace**|bool| | Enable language specific extended backtraces.
|**enableAutoVariableSummaries**|bool| | Enable auto generated summaries for variables when no summaries exist for a given type. This feature can cause performance delays in large projects when viewing variables.
|**enableDisplayExtendedBacktrace**|bool| | Enable language specific extended backtraces.
|**enableSyntheticChildDebugging**|bool| | If a variable is displayed using a synthetic children, also display the actual contents of the variable at the end under a [raw] entry. This is useful when creating sythetic child plug-ins as it lets you see the actual contents of the variable.
|**initCommands** |[string]| | LLDB commands executed upon debugger startup prior to creating the LLDB target.
|**preRunCommands** |[string]| | LLDB commands executed just before launching/attaching, after the LLDB target has been created.
Expand Down
10 changes: 5 additions & 5 deletions lldb/tools/lldb-dap/lldb-dap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ bool FillStackFrames(lldb::SBThread &thread, llvm::json::Array &stack_frames,
stack_frames.emplace_back(CreateStackFrame(frame));
}

if (g_dap.enable_display_extended_backtrace && reached_end_of_stack) {
if (g_dap.display_extended_backtrace && reached_end_of_stack) {
// Check for any extended backtraces.
for (uint32_t bt = 0;
bt < thread.GetProcess().GetNumExtendedBacktraceTypes(); bt++) {
Expand Down Expand Up @@ -778,8 +778,8 @@ void request_attach(const llvm::json::Object &request) {
GetBoolean(arguments, "enableAutoVariableSummaries", false);
g_dap.enable_synthetic_child_debugging =
GetBoolean(arguments, "enableSyntheticChildDebugging", false);
g_dap.enable_display_extended_backtrace =
GetBoolean(arguments, "enableDisplayExtendedBacktrace", false);
g_dap.display_extended_backtrace =
GetBoolean(arguments, "displayExtendedBacktrace", false);
g_dap.command_escape_prefix =
GetString(arguments, "commandEscapePrefix", "`");
g_dap.SetFrameFormat(GetString(arguments, "customFrameFormat"));
Expand Down Expand Up @@ -2139,8 +2139,8 @@ void request_launch(const llvm::json::Object &request) {
GetBoolean(arguments, "enableAutoVariableSummaries", false);
g_dap.enable_synthetic_child_debugging =
GetBoolean(arguments, "enableSyntheticChildDebugging", false);
g_dap.enable_display_extended_backtrace =
GetBoolean(arguments, "enableDisplayExtendedBacktrace", false);
g_dap.display_extended_backtrace =
GetBoolean(arguments, "displayExtendedBacktrace", false);
g_dap.command_escape_prefix =
GetString(arguments, "commandEscapePrefix", "`");
g_dap.SetFrameFormat(GetString(arguments, "customFrameFormat"));
Expand Down
4 changes: 2 additions & 2 deletions lldb/tools/lldb-dap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@
"description": "Enable auto generated summaries for variables when no summaries exist for a given type. This feature can cause performance delays in large projects when viewing variables.",
"default": false
},
"enableDisplayExtendedBacktrace": {
"displayExtendedBacktrace": {
"type": "boolean",
"description": "Enable language specific extended backtraces.",
"default": false
Expand Down Expand Up @@ -393,7 +393,7 @@
"description": "Enable auto generated summaries for variables when no summaries exist for a given type. This feature can cause performance delays in large projects when viewing variables.",
"default": false
},
"enableDisplayExtendedBacktrace": {
"displayExtendedBacktrace": {
"type": "boolean",
"description": "Enable language specific extended backtraces.",
"default": false
Expand Down
Loading