This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Revised display-linkage-name


On 08/01/13 13:55, Tom Tromey wrote:
"Michael" == Michael Eager <eager@eagerm.com> writes:

Michael> I eliminated the annotations and made the other requested changes.

Michael> +		  if (strlen (SYMBOL_LINKAGE_NAME (msymbol.minsym))
Michael> +		      > display_linkage_name_length)
Michael> +		    {

I think this should also check ui_out_is_mi_like_p.

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> +      ui_out_text (uiout, " [");
Michael> +
Michael> +      if (strlen (linkname) > display_linkage_name_length)
Michael> +        {

Here too.

Michael> +	  char *lname = alloca (display_linkage_name_length + 4);
Michael> +
Michael> +	  strncpy (lname, linkname, display_linkage_name_length);
Michael> +	  lname[display_linkage_name_length] = '\0';
Michael> +	  strcat (lname, "...");
Michael> +	  ui_out_text (uiout, lname);

Here you emit it as text...

Michael> +	}
Michael> +      else
Michael> +	ui_out_field_string (uiout, "linkage name", linkname);

... here with a field name with spaces...

Michael> +
Michael> +      ui_out_text (uiout, "]");
Michael> +      ui_out_field_stream (uiout, "linkage_name", stb);

... and here with an underscore.  Another part of the patch used
"linkage-name", with a hyphen.  I think the hyphen one should be
preferred.

Also, this last bit looks the same as an earlier revision to me.
"stb" simply isn't valid here -- your code isn't printing to it, it was
set up earlier; I'm surprised it is even still live.

Thanks.  I'll rework the MI stuff.  I have no experience/understanding
of how this is supposed to work.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]