Re: gdb 8.x - g++ 7.x compatibility

Tom Tromey <[email protected]>
Newsgroups gmane.comp.gdb.devel,gmane.comp.gcc.devel
Message-ID <[email protected]>
>>>>> "Dan" == Daniel Berlin <[email protected]> writes:

Dan> If there are multiple types named Foo<2u>, DWARF needs to be extended to
Dan> allow a pointer from the vtable debug info to the class type debug info
Dan> (unless they already added one).

This is what we did for Rust.

Rust doesn't have a stable ABI yet, so using gdb's current approach --
having the debugger use details of the ABI in addition to the debug info
-- wasn't an option.

So, instead, the Rust compiler emits DWARF for the vtable and associates
the vtable with the concrete type for which it was emitted.  This
required a minor DWARF extension.

I think C++ could probably do something along these lines as well.

The current gdb approach hasn't been really solid since function-local
classes were added to C++.  IIRC there are bugs in gdb bugzilla about
this.  These kinds of problems are, I think, completely avoided by a
DWARF-based approach.

Tom
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.