@@ -701,6 +701,8 @@ void request_attach(const llvm::json::Object &request) {
701
701
GetBoolean (arguments, " enableAutoVariableSummaries" , false );
702
702
g_dap.enable_synthetic_child_debugging =
703
703
GetBoolean (arguments, " enableSyntheticChildDebugging" , false );
704
+ g_dap.enable_display_extended_backtrace =
705
+ GetBoolean (arguments, " enableDisplayExtendedBacktrace" , false );
704
706
g_dap.command_escape_prefix =
705
707
GetString (arguments, " commandEscapePrefix" , " `" );
706
708
g_dap.SetFrameFormat (GetString (arguments, " customFrameFormat" ));
@@ -3091,17 +3093,20 @@ void request_stackTrace(const llvm::json::Object &request) {
3091
3093
// This will always return an invalid thread when
3092
3094
// libBacktraceRecording.dylib is not loaded or if there is no extended
3093
3095
// backtrace.
3094
- lldb::SBThread queue_backtrace_thread =
3095
- thread.GetExtendedBacktraceThread (" libdispatch" );
3096
+ lldb::SBThread queue_backtrace_thread;
3097
+ if (g_dap.enable_display_extended_backtrace )
3098
+ queue_backtrace_thread = thread.GetExtendedBacktraceThread (" libdispatch" );
3096
3099
if (queue_backtrace_thread.IsValid ()) {
3097
3100
// One extra frame as a label to mark the enqueued thread.
3098
3101
totalFrames += queue_backtrace_thread.GetNumFrames () + 1 ;
3099
3102
}
3100
3103
3101
3104
// This will always return an invalid thread when there is no exception in
3102
3105
// the current thread.
3103
- lldb::SBThread exception_backtrace_thread =
3104
- thread.GetCurrentExceptionBacktrace ();
3106
+ lldb::SBThread exception_backtrace_thread;
3107
+ if (g_dap.enable_display_extended_backtrace )
3108
+ exception_backtrace_thread = thread.GetCurrentExceptionBacktrace ();
3109
+
3105
3110
if (exception_backtrace_thread.IsValid ()) {
3106
3111
// One extra frame as a label to mark the exception thread.
3107
3112
totalFrames += exception_backtrace_thread.GetNumFrames () + 1 ;
0 commit comments