[llvm] [llvm][DebugInfo] Encode DW_AT_object_pointer on method declarations with DW_FORM_implicit_const (PR #124790)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 3 11:27:30 PST 2025


dwblaikie wrote:

re: producing the GCC-thing when gdb-tuning. I'd be hesitant to endorse that until someone has a specific gdb behavior/use case for this - it's possible GCC is producing something GDB doesn't need/use (there is precedent for this - view numbering, so far as I understand, is not implemented in gdb, for instance).

So, yeah, I'd be OK with the non-standard attr+form combo when tuning for lldb and not changing non-lldb tuning behavior.

If we wanted to be more cautious, we could use an LLVM extension attribute for this - though I'd guess it'd produce the same-ish GDB behavior (it'd spit some warning about not knowing what the attribute is - but there'd be less risk that way, since GDB wouldn't be trying to interpret the index as an offset, which could collide, but is unlikely to - because it's always going to be 0)

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


More information about the llvm-commits mailing list