[Lldb-commits] [lldb] [lldb] Support stepping through C++ thunks (PR #127419)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 17 08:31:31 PST 2025
================
@@ -476,3 +476,12 @@ CPPLanguageRuntime::GetStepThroughTrampolinePlan(Thread &thread,
return ret_plan_sp;
}
+
+bool CPPLanguageRuntime::IsSymbolARuntimeThunk(const Symbol &symbol) {
+ // Virtual function override thunks come in two forms. Those overriding from a
+ // non-virtual base, with fixed this adjustments, use a "Th" prefix and encode
+ // the required adjustment offset, probably negative, indicated by a 'n'
+ // prefix, and the encoding of the target function.
+ return symbol.GetMangled().GetMangledName().GetStringRef().starts_with(
----------------
Michael137 wrote:
Hmm i think we also want to check `Tc` and `Tv`?
`Tv` you can test by inheriting one of the bases virtually. And here's an example of a `Tc` encoding:
```
struct V1 { };
struct V2 : virtual V1 { };
struct A {
virtual V1 *f();
};
struct B : A {
virtual void b();
virtual V2 *f();
};
V2 *B::f() { return 0; }
```
```
$ c++filt -n _ZTch0_v0_n24_N1B1fEv
covariant return thunk to B::f()
```
https://github.com/llvm/llvm-project/pull/127419
More information about the lldb-commits
mailing list