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: [commit] [rfc] Print MI fullname even for non-existing files


> -----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


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