This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [commit] [rfc] Print MI fullname even for non-existing files
- From: Marc Khouzam <marc dot khouzam at ericsson dot com>
- To: "'Jan Kratochvil'" <jan dot kratochvil at redhat dot com>
- Cc: "'Tom Tromey'" <tromey at redhat dot com>, "'gdb-patches at sourceware dot org'" <gdb-patches at sourceware dot org>
- Date: Thu, 3 Jan 2013 15:38:04 +0000
- Subject: RE: [commit] [rfc] Print MI fullname even for non-existing files
- References: <20121217155859.GA8029@host2.jankratochvil.net> <8738z4y1el.fsf@fleche.redhat.com> <E59706EF8DB1D147B15BECA3322E4BDC04CEB7@eusaamb103.ericsson.se> <20121225080350.GB11349@host2.jankratochvil.net>
> -----Original Message-----
> From: Jan Kratochvil [mailto:jan.kratochvil@redhat.com]
> Sent: Tuesday, December 25, 2012 3:04 AM
> To: Marc Khouzam
> Cc: 'Tom Tromey'; 'gdb-patches@sourceware.org'
> Subject: [commit] [rfc] Print MI fullname even for non-existing files
>
> 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
Thanks for doing this!
> 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.
Agreed.
> 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".
This has been fixed in cdt-8.0.2:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=367788
Thanks again
Marc