[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon May 12 09:57:57 PDT 2025


dwblaikie wrote:

> > My intent (haven't checked the patch) is that it'd be modeled as a static member variable - so there'd be a declaration in the class, but a definition DIE outside the class that'd be indexed by gdb OK, I'd have thought? (it'd go in .debug_names, and gdb_index, I think - figure gdb would parse/index the definition DIE?)
> 
> I think this would be fine. The crucial thing, I think, is that there's some indication at the CU scope. This way the initial scan can take note of the global and its address; then fully read the CU if the class type is needed at some point.

As a note - when you say "at the CU scope" do you mean a direct child of the CU, or anything outside a function or class definition? (ie: could be inside a namespace) - Clang puts definitions, I think, in the namespace nearest the declaration for the definition - compare these: https://godbolt.org/z/EoK4noe7o

https://github.com/llvm/llvm-project/pull/130255


More information about the llvm-commits mailing list