From: Roman Popov <ripopov@gmail.com>
To: Jason Merrill <jason@redhat.com>
Cc: Andrew Pinski <pinskia@gmail.com>,
Richard Biener <richard.guenther@gmail.com>,
Simon Marchi <simon.marchi@polymtl.ca>,
Martin Sebor <msebor@gmail.com>, Manfred <mx2927@gmail.com>,
GDB Development <gdb@sourceware.org>,
GCC Development <gcc@gcc.gnu.org>
Subject: Re: gdb 8.x - g++ 7.x compatibility
Date: Sat, 03 Mar 2018 04:01:00 -0000 [thread overview]
Message-ID: <CAATAM3HrAHtqfCAiS-oJU3543LQYa=Sdrn_f2HZ6xyAU=1=AeA@mail.gmail.com> (raw)
In-Reply-To: <CAATAM3Etae8TQ2tynS2KeykN1xGYWcjJYnEThzoAoazA-TU7sA@mail.gmail.com>
I've experimented with adding DW_AT_linkage_name for composite types in
LLVM. Here is impact on binary sizes (compiled with debuginfo):
Original size with DW_AT_linkage_name for composites
% increase
clang-7.0 1926574256 1952846192
1.4%
clang-tidy 1220980360 1238498112
1.4%
llvm-mt 7404728 7525328
1.6%
cout<<"hello"; 21552 22080 2.4%
-Roman
2018-03-02 15:06 GMT-08:00 Roman Popov <ripopov@gmail.com>:
> Ok, sounds reasonable. In case of debugger we are indeed "linking" RTTI
> name with name in debuginfo.
>
> I've checked LLVM docs, they generate Debuginfo from LLVM "Metadata", and
> metadata for types already contains mangled names in "identifier" field:
> https://llvm.org/docs/LangRef.html#dicompositetype . So it should not be
> hard to propagate it to object file.
>
> I will ask on LLVM maillist if they can emit it.
>
>
> 2018-03-01 13:03 GMT-08:00 Jason Merrill <jason@redhat.com>:
>
>> On Thu, Mar 1, 2018 at 3:26 PM, Andrew Pinski <pinskia@gmail.com> wrote:
>> > On Thu, Mar 1, 2018 at 12:18 PM, Roman Popov <ripopov@gmail.com> wrote:
>> >> Is there any progress on this problem?
>> >>
>> >> I'm not familiar with G++ , but I have little experience with LLVM. I
>> can
>> >> try make LLVM emitting mangled names to DW_AT_name, instead of
>> demangled
>> >> ones.
>> >> This way GDB can match DW_AT_name against RTTI. And for display it can
>> >> call abi::__cxa_demangle(name, NULL, NULL, &status), from #include
>> >> <cxxabi.h>.
>> >>
>> >> Will it work?
>> >
>> >
>> > Reading http://wiki.dwarfstd.org/index.php?title=Best_Practices:
>> > the DW_AT_name attribute should contain the name of the corresponding
>> > program object as it appears in the source code, without any
>> > qualifiers such as namespaces, containing classes, or modules (see
>> > Section 2.15). A consumer can easily reconstruct the fully-qualified
>> > name from the DIE hierarchy. In general, the value of DW_AT_name
>> > should be such that a fully-qualified name constructed from the
>> > DW_AT_name attributes of the object and its containing objects will
>> > uniquely represent that object in a form natural to the source
>> > language.
>> >
>> >
>> > So having the mangled symbol in DW_AT_name seems backwards and not the
>> > point of it.
>>
>> If we add the mangled name, which seems reasonable, it should be in
>> DW_AT_linkage_name.
>>
>> Jason
>>
>
>
next prev parent reply other threads:[~2018-03-03 4:01 UTC|newest]
Thread overview: 52+ 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:01 ` 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 9:16 ` Stephan Bergmann
2018-02-05 10:59 ` Jonathan Wakely
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:36 ` Simon Marchi
2018-02-07 16:51 ` Jonathan Wakely
2018-02-07 17:13 ` 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
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 [this message]
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='CAATAM3HrAHtqfCAiS-oJU3543LQYa=Sdrn_f2HZ6xyAU=1=AeA@mail.gmail.com' \
--to=ripopov@gmail.com \
--cc=gcc@gcc.gnu.org \
--cc=gdb@sourceware.org \
--cc=jason@redhat.com \
--cc=msebor@gmail.com \
--cc=mx2927@gmail.com \
--cc=pinskia@gmail.com \
--cc=richard.guenther@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).