From: Tom Tromey <tromey@redhat.com>
To: Michael Eager <eager@eagerm.com>
Cc: Keith Seitz <keiths@redhat.com>,
"gdb-patches\@sourceware.org ml"
<gdb-patches@sourceware.org>
Subject: Re: [PATCH] Revised display-linkage-name
Date: Fri, 26 Jul 2013 18:42:00 -0000 [thread overview]
Message-ID: <874nbhtb80.fsf@fleche.redhat.com> (raw)
In-Reply-To: <51EFF8F8.6050807@eagerm.com> (Michael Eager's message of "Wed, 24 Jul 2013 08:55:36 -0700")
>>>>> "Michael" == Michael Eager <eager@eagerm.com> writes:
Michael> This is pretty pointless busywork, serving no useful purpose.
It's part of the currently-agreed-upon coding style.
You're always welcome to propose changes.
Michael> +set|show display-linkage-name-len
It's more gdb-ish to spell out "length".
Michael> + /* Print linkage name after source name if requested and different. */
Michael> + if ((display_linkage_name || ui_out_is_mi_like_p (uiout))
Michael> + && linkname != NULL && strcmp (funname, linkname) != 0)
Michael> + {
Michael> + annotate_linkage_name ();
FWIW there isn't much need to add new annotations. Annotations are
officially deprecated. It's fine by me if you want to leave this in for
some reason though.
Michael> + ui_out_text (uiout, " [");
Michael> +
Michael> + if (strlen (linkname) > display_linkage_name_len)
Michael> + {
Michael> + char *lname = alloca (display_linkage_name_len + 4);
Michael> +
Michael> + strncpy (lname, linkname, display_linkage_name_len);
Michael> + lname[display_linkage_name_len] = '\0';
Michael> + strcat (lname, "...");
Michael> + ui_out_text (uiout, lname);
Michael> + }
Michael> + else
Michael> + ui_out_text (uiout, linkname);
Michael> +
Michael> + ui_out_text (uiout, "]");
Michael> + ui_out_field_stream (uiout, "linkage_name", stb);
This is emitting the linkage name using ui_out_text. That is wrong for
MI.
Then this emits the linkage_name field with the contents from "stb" --
which is reusing a result computed previously (look up for the
fprintf_symbol_filtered).
I tend to think that limiting the name length should only be done in the
not-MI case. That is, for MI, it is better to always print the whole
thing.
Tom
next prev parent reply other threads:[~2013-07-26 18: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
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 [this message]
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=874nbhtb80.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=eager@eagerm.com \
--cc=gdb-patches@sourceware.org \
--cc=keiths@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