From: Daniel Berlin <dberlin@dberlin.org>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: Martin Sebor <msebor@gmail.com>, Manfred <mx2927@gmail.com>,
gdb@sourceware.org, GCC <gcc@gcc.gnu.org>
Subject: Re: gdb 8.x - g++ 7.x compatibility
Date: Wed, 07 Feb 2018 17:11:00 -0000 [thread overview]
Message-ID: <CAF4BwTXUF_2d-bL2+C5dCY-wwc_uAeWngUrYnWAKqoctyYVOnQ@mail.gmail.com> (raw)
In-Reply-To: <CAF4BwTU2DEOXOnuORD-y+-7XgiOw1CjN4z2K5aW8tNxtjorbCw@mail.gmail.com>
>
>
> This avoids the problem of the demangler gdb is using getting a different
> name than the producer used. It also should always give you the right one.
> If the producer calls the type "vtable fo Foo<2u>" here and "Foo<2>"
> elsewhere, yes, that's a bug. It should be consistent.
>
>
This should be Foo<2u> vs Foo<2>
> If there are multiple types named Foo<2u>, DWARF needs to be extended to
> allow a pointer from the vtable debug info to the class type debug info
> (unless they already added one).
> Then you would do *no* symbol lookups, you'd follow that pointer (gdb
> would add it to the symbol_info structure)
>
Note that the ABI is explicitly designed so that type identity can be done
by address comparison.
Also note that adding alternative names for symbols is probably a "not
great" idea, though it would work. The *vast* majority of debug info is in
those names, and adding long names will often triple or quadruple the size
of debug info.
Google has binaries where 90% of the size is in gigabytes of linkage
names. People have worked hard to need the names *less*.
So you want to get *away* from going by name, especially when the compiler
knows "this is the vtable that goes with this type". It should just tell
you.
Right now, that is what you are missing "given a vtable for a type, how do
i get the type".
Trying to do that by name is a hack. A hack that has lasted 15+ years mind
you, but still a hack.
I would just kill that hack.
next prev parent reply other threads:[~2018-02-07 17:11 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-03 3:17 Roman Popov
2018-02-03 3:57 ` carl hansen
2018-02-03 4:54 ` Simon Marchi
2018-02-03 5:02 ` Roman Popov
2018-02-03 6:43 ` Roman Popov
2018-02-03 14:20 ` Paul Smith
2018-02-03 17:18 ` Roman Popov
2018-02-03 18:36 ` Manfred
2018-02-04 5:02 ` Simon Marchi
2018-02-04 17:09 ` Manfred
2018-02-04 19:17 ` Martin Sebor
2018-02-05 5:07 ` Simon Marchi
2018-02-05 16:45 ` Martin Sebor
2018-02-05 16:59 ` Simon Marchi
2018-02-05 17:44 ` Roman Popov
2018-02-05 20:08 ` Jonathan Wakely
2018-02-05 20:10 ` Roman Popov
2018-02-05 20:12 ` Jonathan Wakely
2018-02-05 20:17 ` Roman Popov
2018-02-06 3:52 ` Martin Sebor
2018-02-07 7:21 ` Daniel Berlin
2018-02-07 13:44 ` Simon Marchi
2018-02-07 15:07 ` Manfred
2018-02-07 15:16 ` Jonathan Wakely
2018-02-07 16:19 ` Manfred
2018-02-07 16:26 ` Michael Matz
2018-02-07 16:43 ` Simon Marchi
2018-02-07 16:51 ` Jonathan Wakely
2018-02-07 17:03 ` Simon Marchi
2018-02-07 17:08 ` Jonathan Wakely
2018-02-07 17:20 ` Simon Marchi
2018-02-07 17:30 ` Jonathan Wakely
2018-02-07 18:28 ` Simon Marchi
2018-02-08 11:26 ` Michael Matz
2018-02-08 14:05 ` Paul Smith
2018-02-08 14:07 ` Jonathan Wakely
2018-02-07 17:31 ` Marc Glisse
2018-02-07 17:04 ` Daniel Berlin
2018-02-07 17:11 ` Daniel Berlin [this message]
2018-02-07 22:00 ` Nathan Sidwell
2018-02-07 20:29 ` Tom Tromey
2018-02-08 15:05 ` Richard Biener
2018-03-01 20:18 ` Roman Popov
2018-03-01 20:26 ` Andrew Pinski
2018-03-01 21:03 ` Jason Merrill
2018-03-02 23:06 ` Roman Popov
2018-03-03 4:01 ` Roman Popov
2018-03-04 4:28 ` Daniel Berlin
2018-02-05 11:05 ` Jonathan Wakely
2018-02-07 15:19 ` Jonathan Wakely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAF4BwTXUF_2d-bL2+C5dCY-wwc_uAeWngUrYnWAKqoctyYVOnQ@mail.gmail.com \
--to=dberlin@dberlin.org \
--cc=gcc@gcc.gnu.org \
--cc=gdb@sourceware.org \
--cc=msebor@gmail.com \
--cc=mx2927@gmail.com \
--cc=simon.marchi@polymtl.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox