Skip to content

Commit ad1445d

Browse files
vogelsgesangJDevlieghere
authored andcommitted
[lldb-dap] Rename enableDisplayExtendedBacktrace (llvm#109521)
The `enable` prefix is a filler word which adds no additional information. Rename the setting to `displayExtendedBacktrace` Given that this setting was only introduced a month ago, and that there has not been any release since then, I assume that usage is still rather low. As such, it should be fine to not provide backwards-compatibility workarounds. (cherry picked from commit 19ecded)
1 parent 881f26a commit ad1445d

File tree

8 files changed

+18
-18
lines changed

8 files changed

+18
-18
lines changed

lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ def request_launch(
778778
runInTerminal=False,
779779
postRunCommands=None,
780780
enableAutoVariableSummaries=False,
781-
enableDisplayExtendedBacktrace=False,
781+
displayExtendedBacktrace=False,
782782
enableSyntheticChildDebugging=False,
783783
commandEscapePrefix=None,
784784
customFrameFormat=None,
@@ -831,7 +831,7 @@ def request_launch(
831831

832832
args_dict["enableAutoVariableSummaries"] = enableAutoVariableSummaries
833833
args_dict["enableSyntheticChildDebugging"] = enableSyntheticChildDebugging
834-
args_dict["enableDisplayExtendedBacktrace"] = enableDisplayExtendedBacktrace
834+
args_dict["displayExtendedBacktrace"] = displayExtendedBacktrace
835835
args_dict["commandEscapePrefix"] = commandEscapePrefix
836836
command_dict = {"command": "launch", "type": "request", "arguments": args_dict}
837837
response = self.send_recv(command_dict)

lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ def launch(
386386
expectFailure=False,
387387
postRunCommands=None,
388388
enableAutoVariableSummaries=False,
389-
enableDisplayExtendedBacktrace=False,
389+
displayExtendedBacktrace=False,
390390
enableSyntheticChildDebugging=False,
391391
commandEscapePrefix=None,
392392
customFrameFormat=None,
@@ -428,7 +428,7 @@ def cleanup():
428428
runInTerminal=runInTerminal,
429429
postRunCommands=postRunCommands,
430430
enableAutoVariableSummaries=enableAutoVariableSummaries,
431-
enableDisplayExtendedBacktrace=enableDisplayExtendedBacktrace,
431+
displayExtendedBacktrace=displayExtendedBacktrace,
432432
enableSyntheticChildDebugging=enableSyntheticChildDebugging,
433433
commandEscapePrefix=commandEscapePrefix,
434434
customFrameFormat=customFrameFormat,
@@ -468,7 +468,7 @@ def build_and_launch(
468468
postRunCommands=None,
469469
lldbDAPEnv=None,
470470
enableAutoVariableSummaries=False,
471-
enableDisplayExtendedBacktrace=False,
471+
displayExtendedBacktrace=False,
472472
enableSyntheticChildDebugging=False,
473473
commandEscapePrefix=None,
474474
customFrameFormat=None,
@@ -505,7 +505,7 @@ def build_and_launch(
505505
postRunCommands=postRunCommands,
506506
enableAutoVariableSummaries=enableAutoVariableSummaries,
507507
enableSyntheticChildDebugging=enableSyntheticChildDebugging,
508-
enableDisplayExtendedBacktrace=enableDisplayExtendedBacktrace,
508+
displayExtendedBacktrace=displayExtendedBacktrace,
509509
commandEscapePrefix=commandEscapePrefix,
510510
customFrameFormat=customFrameFormat,
511511
customThreadFormat=customThreadFormat,

lldb/test/API/tools/lldb-dap/extendedStackTrace/TestDAP_extendedStackTrace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test_stackTrace(self):
3636
"DYLD_LIBRARY_PATH=/usr/lib/system/introspection",
3737
"DYLD_INSERT_LIBRARIES=" + backtrace_recording_lib,
3838
],
39-
enableDisplayExtendedBacktrace=True,
39+
displayExtendedBacktrace=True,
4040
)
4141
source = "main.m"
4242
breakpoint = line_number(source, "breakpoint 1")

lldb/tools/lldb-dap/DAP.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ DAP::DAP()
3636
focus_tid(LLDB_INVALID_THREAD_ID), stop_at_entry(false), is_attach(false),
3737
enable_auto_variable_summaries(false),
3838
enable_synthetic_child_debugging(false),
39-
enable_display_extended_backtrace(false),
39+
display_extended_backtrace(false),
4040
restarting_process_id(LLDB_INVALID_PROCESS_ID),
4141
configuration_done_sent(false), waiting_for_run_in_terminal(false),
4242
progress_event_reporter(

lldb/tools/lldb-dap/DAP.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ struct DAP {
185185
bool is_attach;
186186
bool enable_auto_variable_summaries;
187187
bool enable_synthetic_child_debugging;
188-
bool enable_display_extended_backtrace;
188+
bool display_extended_backtrace;
189189
// The process event thread normally responds to process exited events by
190190
// shutting down the entire adapter. When we're restarting, we keep the id of
191191
// the old process here so we can detect this case and keep running.

lldb/tools/lldb-dap/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This binary is not packaged with the VS Code extension.
77

88
There are multiple ways to obtain this binary:
99
* build it from source (see [LLDB's build instructions](https://lldb.llvm.org/resources/build.html))
10-
* 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.
10+
* 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.
1111
* use the binary provided by your toolchain (for example `xcrun -f lldb-dap` on macOS) or contact your toolchain vendor to include it.
1212

1313
By default, the VS Code extension will expect to find `lldb-dap` in your `PATH`.
@@ -188,8 +188,8 @@ specific key/value pairs:
188188
|**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.
189189
|**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.
190190
|**customThreadFormat** | string | | Same as `customFrameFormat`, but for threads instead of stack frames.
191+
|**displayExtendedBacktrace**|bool| | Enable language specific extended backtraces.
191192
|**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.
192-
|**enableDisplayExtendedBacktrace**|bool| | Enable language specific extended backtraces.
193193
|**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.
194194
|**initCommands** |[string]| | LLDB commands executed upon debugger startup prior to creating the LLDB target.
195195
|**preRunCommands** |[string]| | LLDB commands executed just before launching/attaching, after the LLDB target has been created.

lldb/tools/lldb-dap/lldb-dap.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ bool FillStackFrames(lldb::SBThread &thread, llvm::json::Array &stack_frames,
696696
stack_frames.emplace_back(CreateStackFrame(frame));
697697
}
698698

699-
if (g_dap.enable_display_extended_backtrace && reached_end_of_stack) {
699+
if (g_dap.display_extended_backtrace && reached_end_of_stack) {
700700
// Check for any extended backtraces.
701701
for (uint32_t bt = 0;
702702
bt < thread.GetProcess().GetNumExtendedBacktraceTypes(); bt++) {
@@ -779,8 +779,8 @@ void request_attach(const llvm::json::Object &request) {
779779
GetBoolean(arguments, "enableAutoVariableSummaries", false);
780780
g_dap.enable_synthetic_child_debugging =
781781
GetBoolean(arguments, "enableSyntheticChildDebugging", false);
782-
g_dap.enable_display_extended_backtrace =
783-
GetBoolean(arguments, "enableDisplayExtendedBacktrace", false);
782+
g_dap.display_extended_backtrace =
783+
GetBoolean(arguments, "displayExtendedBacktrace", false);
784784
g_dap.command_escape_prefix =
785785
GetString(arguments, "commandEscapePrefix", "`");
786786
g_dap.SetFrameFormat(GetString(arguments, "customFrameFormat"));
@@ -2157,8 +2157,8 @@ void request_launch(const llvm::json::Object &request) {
21572157
GetBoolean(arguments, "enableAutoVariableSummaries", false);
21582158
g_dap.enable_synthetic_child_debugging =
21592159
GetBoolean(arguments, "enableSyntheticChildDebugging", false);
2160-
g_dap.enable_display_extended_backtrace =
2161-
GetBoolean(arguments, "enableDisplayExtendedBacktrace", false);
2160+
g_dap.display_extended_backtrace =
2161+
GetBoolean(arguments, "displayExtendedBacktrace", false);
21622162
g_dap.command_escape_prefix =
21632163
GetString(arguments, "commandEscapePrefix", "`");
21642164
g_dap.SetFrameFormat(GetString(arguments, "customFrameFormat"));

lldb/tools/lldb-dap/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@
268268
"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.",
269269
"default": false
270270
},
271-
"enableDisplayExtendedBacktrace": {
271+
"displayExtendedBacktrace": {
272272
"type": "boolean",
273273
"description": "Enable language specific extended backtraces.",
274274
"default": false
@@ -393,7 +393,7 @@
393393
"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.",
394394
"default": false
395395
},
396-
"enableDisplayExtendedBacktrace": {
396+
"displayExtendedBacktrace": {
397397
"type": "boolean",
398398
"description": "Enable language specific extended backtraces.",
399399
"default": false

0 commit comments

Comments
 (0)