|
9 | 9 | #include "lldb/Target/ThreadPlanShouldStopHere.h" |
10 | 10 | #include "lldb/Symbol/Function.h" |
11 | 11 | #include "lldb/Symbol/Symbol.h" |
| 12 | +#include "lldb/Target/Language.h" |
12 | 13 | #include "lldb/Target/LanguageRuntime.h" |
13 | 14 | #include "lldb/Target/Process.h" |
14 | 15 | #include "lldb/Target/RegisterContext.h" |
@@ -85,7 +86,12 @@ bool ThreadPlanShouldStopHere::DefaultShouldStopHereCallback( |
85 | 86 | if (Symbol *symbol = frame->GetSymbolContext(eSymbolContextSymbol).symbol) { |
86 | 87 | ProcessSP process_sp(current_plan->GetThread().GetProcess()); |
87 | 88 | for (auto *runtime : process_sp->GetLanguageRuntimes()) { |
88 | | - if (runtime->IsSymbolARuntimeThunk(*symbol)) { |
| 89 | + if (runtime->IsSymbolARuntimeThunk(*symbol) && |
| 90 | + flags.Test(ThreadPlanShouldStopHere::eStepOutPastThunks)) { |
| 91 | + LLDB_LOGF( |
| 92 | + log, "Stepping out past a language thunk %s for: %s", |
| 93 | + frame->GetFunctionName(), |
| 94 | + Language::GetNameForLanguageType(runtime->GetLanguageType())); |
89 | 95 | should_stop_here = false; |
90 | 96 | break; |
91 | 97 | } |
@@ -140,9 +146,12 @@ ThreadPlanSP ThreadPlanShouldStopHere::DefaultStepFromHereCallback( |
140 | 146 | // because it's marked line 0. |
141 | 147 | bool is_thunk = false; |
142 | 148 | for (auto *runtime : process_sp->GetLanguageRuntimes()) { |
143 | | - if (runtime->IsSymbolARuntimeThunk(*sc.symbol)) { |
144 | | - LLDB_LOGF(log, "In runtime thunk %s - stepping out.", |
145 | | - sc.symbol->GetName().GetCString()); |
| 149 | + if (runtime->IsSymbolARuntimeThunk(*sc.symbol) && |
| 150 | + flags.Test(ThreadPlanShouldStopHere::eStepOutPastThunks)) { |
| 151 | + LLDB_LOGF( |
| 152 | + log, "Stepping out past a language thunk %s for: %s", |
| 153 | + frame->GetFunctionName(), |
| 154 | + Language::GetNameForLanguageType(runtime->GetLanguageType())); |
146 | 155 | is_thunk = true; |
147 | 156 | break; |
148 | 157 | } |
|
0 commit comments