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