dwblaikie wrote:

> > Removing the vtable global variable and moving the "location info" into the 
> > static within the class, will work for the SCE debugger.
> 
> I was thinking about this last night and wondering if the vtable will appear 
> as a class member even if the class is local to a function?
> 
> If so then it seems like this would be hard for gdb to find (can't speak for 
> other debuggers). The issue being that gdb tends not to read DIEs that it 
> thinks are uninteresting, and this means function bodies in general are 
> skipped.
> 
> If the vtable were a global-but-artificial object, then it would readily be 
> found by the initial scan.

Hmm, so I think the idea was that there'd still be an out-of-line definition 
(like for an inline static class member variable with storage - the DWARF 
contains a definition DIE that's outside the class, eg: 
https://godbolt.org/z/z3Kz8Eorn ) - though since static class members can't 
exist in function-local classes we can't quite extrapolate from there. I'd say 
we can extrapolate from function-local types member function definitions, which 
appear outside the function the type is local to: 
https://godbolt.org/z/zvf15YKhE

https://github.com/llvm/llvm-project/pull/130255
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to