This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: [PATCH]: Symbol origin patch, with changelog


> Date: Fri, 5 Jan 2001 13:46:27 -0500 (EST)
> From: Daniel Berlin <dan@redhat.com>
> 
> SYmbol origin patch again, with changelog this time.
> I made the small change Eli requested to the documentation as well.

Thans.  The doco patches are approved, except for this minor
nitpicking:

> + @item show print origin 
> + Show whether or not @value{GDBN} will print the origin of a symbol when 
> + printing a symbol name. 
> + @end table 

This needs a @kindex entry.

> + struct objfile * 
> + lookup_objfile (const char *name) 
> + { 
> +   register char *slash; 
> +   register struct objfile *objfile; 
> +   register struct objfile *result; 
> + 
> +   /* First, search for an exact match */ 
> + 
> +   ALL_OBJFILES (objfile) 
> +     if (STREQ (name, objfile->name)) 
> +       return objfile; 
> + 
> +   slash = strchr (name, '/'); 

Bother.  Are we sure that some DOSish platform, such as MinGW, won't
use backslashes in objfiles?  (I don't think this is a problem with
DJGPP, at least not with native COFF debugging, because there are no
leading directories in COFF debug info.)  Also, there are all kinds of
complications with the drive letter brain-damage, e.g., the file name
could be d:foo.o.

If backslashes _can_ appear, perhaps you should simply call basename
from the system library, or provide a portable version of it which
does TRT on each platform?

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