[commit] [rfc] Print MI fullname even for non-existing files

Jan Kratochvil jan.kratochvil@redhat.com
Tue Dec 25 08:04:00 GMT 2012


On Thu, 20 Dec 2012 15:32:55 +0100, Marc Khouzam wrote:
> > Jan> symtab_to_fullname now always returns non-NULL.
> > 
> > Jan> Currently this patch only changes from user point of view MI:
> > Jan> (gdb) -file-list-exec-source-file
> > Jan> 	^done,line="1",file="deleted.c",macro-info="0"
> > -> 
> > Jan> 	
> > ^done,line="1",file="deleted.c",fullname="/path/to/deleted.c",
> > macro-info="0"
> > 
> > Jan> Is there a serious reason why fullname was suppressed for
> > Jan> non-existing files?  While it breaks MI compatibility in 
> > some way I
> > Jan> find it an acceptable change.
> > 
> > It seems pretty reasonable to me as well.
> 
> For what it's worth, that is an ok change for Eclipse (we don't
> use that command).

This specific command was just an example.  The change affects any MI output
where fullname="/abs/path" was printed.  Now it will be printed even if that
source file is not present on the disk.  While that may be rather rate case it
would be bad if Eclipse breaks.

I have tested now eclipse-cdt-8.1.1-1.fc18.x86_64, if I remove /usr/src/debug
I get:

unpatched/patched present file:
Subwindow tab title shows the short filename "ioputs.c".

unpatched missing file:
Can't find a source file at "ioputs.c" 
Locate the file or edit the source lookup path to include its location.
Subwindow tab title shows the short filename "ioputs.c":
	http://people.redhat.com/~jkratoch/eclipse-gdb-unpatched.png

patched missing file:
Can't find a source file at "/usr/src/debug/glibc-2.16-75f0d304/libio/ioputs.c"
Locate the file or edit the source lookup path to include its location.
Subwindow tab title shows the fullname "/usr/src/debug/glibc-2.16-75f0d304/libio/ioputs.c":
	http://people.redhat.com/~jkratoch/eclipse-gdb-fullname.png

So I find the patch in fact an improvement even for Eclipse.
Therefore I have checked it in:
	http://sourceware.org/ml/gdb-cvs/2012-12/msg00184.html

Besides that the compatibility of Eclipse <-> GDB across versions is not too
great, FSF GDB HEAD fails with eclipse-cdt-8.0.1-4.fc16.x86_64:
	Error in final launch sequence
	Failed to execute MI command:
	maintenance set python print-stack off
	Error message from debugger back end:
	Undefined maintenance set command: "python print-stack off".  Try "help maintenance set".


Thanks,
Jan



More information about the Gdb-patches mailing list