From: Michael Eager <eager@eagerm.com>
To: Tom Tromey <tromey@redhat.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 20:18:00 -0000 [thread overview]
Message-ID: <51F2D975.3060801@eagerm.com> (raw)
In-Reply-To: <874nbhtb80.fsf@fleche.redhat.com>
On 07/26/13 11:41, Tom Tromey wrote:
>>>>>> "Michael" == Michael Eager <eager@eagerm.com> writes:
>
> Michael> +set|show display-linkage-name-len
>
> It's more gdb-ish to spell out "length".
OK.
> 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.
I added the annotations at your request (4/19/13):
>> I think for MI it is better to make this a real field.
>> Also I wonder whether this should be emitted unconditionally if
>> mi-like. Say:
Perhaps I misunderstood what you meant by "make this a real field".
> 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.
What should it be? ui_out_field_string()? Something else?
> 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.
OK.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
next prev parent reply other threads:[~2013-07-26 20:18 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
2013-07-26 20:18 ` Michael Eager [this message]
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=51F2D975.3060801@eagerm.com \
--to=eager@eagerm.com \
--cc=gdb-patches@sourceware.org \
--cc=keiths@redhat.com \
--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