Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Eager <eager@eagerm.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org, tromey@redhat.com
Subject: Re: [PATCH] Revised display-linkage-name
Date: Wed, 22 May 2013 21:42:00 -0000	[thread overview]
Message-ID: <519D3BCA.8090401@eagerm.com> (raw)
In-Reply-To: <838v36u84e.fsf@gnu.org>

On 05/22/2013 12:28 PM, Eli Zaretskii wrote:
>> Date: Wed, 22 May 2013 11:03:22 -0700
>> From: Michael Eager <eager@eagerm.com>
>> CC: Tom Tromey <tromey@redhat.com>
>>
>> Changes:
>>     Add NEWS and docs.
>>     Add linkage name to "info break" listing.
>>     Add MI annotations.
>>     Add command to set/show display length limit, remove define.
>>     Add test case.
>
> Thanks.
>
>> +set|show display-linkage-name-len
>> +
>> +  Set the maximum number of characters to display in the linkage name,
>> +  if display-linkage-name is on.  The default is 20.
>
> Do we really need this?  Why not display the whole name always?

With C++, and especially with templates, the linker name can become
very long.

>
>> +@kindex set display-linkage-name @code{on}|@code{off}
>
> Please remove the on|off part from the index entry.  Just the command
> is enough.

OK.

>
>> +@cindex list linker symbol names
>
> Is "linker symbol name" how users would expect this to be called?  I
> wouldn't.  Index entries should use phrases that readers might have in
> mind when they are looking for the stuff described in this section.
>
> I think the correct terminology is "linkage name".

The only reference I find using Google to "linkage name" is in DWARF.
I don't consider this to be common or widely used terminology.  I
personally would look for "symbol name", which unfortunately has multiple
meanings.

I'm happy to use "linkage name", but I don't think that this is a
phrase readers might have in mind, unless they had just been reading
the DWARF spec.

>
>> +The default is @code{off}, which means that @value{GDBN} will only
>> +display the function name used in the source.  When @code{on}, @value{GDBN}
>> +will also display the symbol name used by the linker within brackets if it is
>> +different from the name in the source.  This can be useful with compilers
>> +which may prepend characters to a source name, for example, an underscore.
>> +
>> +This is different from "set print asm-demangle on" which only displays
>> +the linkage name for C++ symbols and does not display the source name.
>
> Isn't it confusing to have 2 subtly different settings that actually
> achieve almost the same?  How about a single setting, perhaps a
> tristate, instead of 2 separate booleans?

I don't think it is confusing.

The two options are significantly different, both in implementation and
definition.  Asm-demangle is only mentioned as contrast in information provided.

The functionality provided by display-linkage-name is not related to C++.
There is no demangling being performed.  Trying to combine two unrelated
options into one would make a hash of the coding for both.

>
>> +@kindex set display-linkage-name-len
>> +@kindex show display-linkage-name-len
>> +@cindex list linker symbol names
>             ^^^^^^^^^^^^^^^^^^^^^^^^
> Copy/paste error?  You already have an identical index entry a few
> lines above.

Oops.

>
>> +@item set display-linkage-name-len @var{len}
>> +@itemx show display-linkage-name-len @var{len}
>> +Set the maximum number of characters of linkage name to display.  The
>> +@code{show} command displays the current setting.  The default is @code{20}.
>
> I think we don't need this setting.  After all, we show source-level
> function names in their full glory, right?

Source level names are limited in size.  Linker names may be thousands
of characters long.


-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077


  reply	other threads:[~2013-05-22 21:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-22 18:28 Michael Eager
2013-05-22 19:28 ` Eli Zaretskii
2013-05-22 21:42   ` Michael Eager [this message]
2013-06-17 17:35 ` Michael Eager
2013-07-10 16:17   ` Michael Eager
2013-07-11 23:28     ` Keith Seitz
2013-07-12 21:17       ` Michael Eager
2013-07-17 18:51         ` Michael Eager
2013-07-17 19:14           ` Eli Zaretskii
2013-07-22 17:48           ` Keith Seitz
2013-07-22 20:07             ` Michael Eager
2013-07-22 21:55               ` Keith Seitz
2013-07-24 15:55                 ` Michael Eager
2013-07-26 18:42                   ` Tom Tromey
2013-07-26 20:18                     ` Michael Eager
2013-07-29 17:48                       ` Tom Tromey
2013-08-01 19:36                         ` Michael Eager
2013-08-01 20:56                           ` Tom Tromey
2013-08-02 18:00                             ` Michael Eager

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=519D3BCA.8090401@eagerm.com \
    --to=eager@eagerm.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.com \
    /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