[PATCH] Display full file path in MI style disassembly listing

Tom Tromey tromey@redhat.com
Wed Oct 17 17:16:00 GMT 2012

>>>>> "Andrew" == Andrew Burgess <aburgess@broadcom.com> writes:

Andrew> +	  char *filename;

I think this could be const.

Andrew> +
Andrew> +	  filename = s->fullname;
Andrew> +	  if (filename == NULL)
Andrew> +	    {
Andrew> +	      filename = symtab_to_fullname (s);
Andrew> +	      if (filename == NULL)
Andrew> +		filename = s->filename;
Andrew> +	    }
Andrew> +
Andrew>  	  ui_out_field_int (uiout, "line", line);
Andrew>  	  ui_out_text (uiout, "\tin ");
Andrew> -	  ui_out_field_string (uiout, "file", s->filename);
Andrew> +	  ui_out_field_string (uiout, "file", filename);
Andrew>  	  ui_out_text (uiout, "\n");

It isn't obvious to me that this only applies to the MI case.
Can you explain that?


More information about the Gdb-patches mailing list