================
@@ -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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to