This is the mail archive of the gdb@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]
Other format: [Raw text]

Re: External debug symbols


On Fri, Sep 20, 2002 at 11:11:09AM -0400, Elena Zannoni wrote:
> 
> I have looked at this. I think it's a valuable thing to have.  I have
> a few questions about the approach, and a few more specific comments
> about the code. I haven't followed all the implications of this patch.
> What do other folks think?

In general, I'm in love with it.

>  > diff --exclude '*~' --exclude '*.orig' --exclude '*.rej' --exclude '.#*' --exclude '*.o' --exclude CVS --exclude SCCS --exclude RCS --exclude '.*.flags' --exclude .cvsignore --exclude .depend -ur gdb-5.2.1/gdb/configure.in gdb-5.2.1.separate_debug_symbols/gdb/configure.in
>  > --- gdb-5.2.1/gdb/configure.in	Thu Mar 28 05:28:00 2002
>  > +++ gdb-5.2.1.separate_debug_symbols/gdb/configure.in	Mon Aug 26 17:02:48 2002
>  > @@ -234,6 +234,14 @@
>  >  AC_CHECK_LIB(socket, socketpair)
>  >  AC_CHECK_FUNCS(socketpair)
>  >  
>  > +debugdir=${libdir}/debug
>  > +	 
>  > +AC_ARG_WITH(separate-debug-dir,
>  > +[  --with-separate-debug-dir=path   Look for global separate debug info in this path [LIBDIR/debug]],
>  > +[debugdir="${withval}"])
>  > +	
>  > +AC_DEFINE_DIR(DEBUGDIR, debugdir)
>  > +#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
>  >  
> 
> Could this be done alternatively using an environment variable,
> instead of being set at configure time? something like
> DEBUG_INFO_PATH, or similar.  I don't have a strong preference, but
> seems to me that an environment variable is more flexible. 

I'd have to change this for local GDB packages anyway.  Full
relocatable installs are a must for me, so I'd have to make this path
follow the current location of the GDB binary.  I'm hoping to put the
necessary support code in libiberty eventually...
 
> Thinking out loud...
> 
> I wonder if it wouldn't be more intuitive to add the debug info to the
> objfile, instead of creating another objfile.  So that in the end we
> would have just a new field added to the objfile, indicating the name
> of the debug info file.

I like this idea; it seems a lot less fragile.


-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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