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 Tue, 27 Aug 2002, Alexander Larsson wrote:

> On 21 Aug 2002, Jim Blandy wrote:
>  
> > Wow, that's a lot less work than I expected it to be.  It doesn't look
> > especially wrong to me.  Basically, the presence of a .debuglink
> > section tells GDB that, whenever it loads one objfile, it should also
> > load the other.  When the stripped objfile is freed, the other one is
> > freed, too.
> 
> Ok. Here is a new, more "productized" patch. It is slightly larger, since 
> it does a bit more. New in this patch is:
> * Some more memory handling code to handle the cases Jim mentioned.
> * Verify the crc32 checksum of the debug symbol file
> * look for separate debug files in several places:
>   1 - In the same directory as the original file
>   2 - In a .debug subdirectory
>   3 - In a gloal directory, with the full pathname appended.
>       So if the global path is /usr/lib/debug it would look for 
>       debug info for /usr/bin/ls in /usr/lib/debug/usr/bin/ls.
>       (global directory is settable in gdb, defaults to $libdir/debug)
> 
>   The last place is what we want to use for the Red Hat distribution. It 
>   makes it very nice from a packaging standpoint.

There was a slight bug in the old patch regarding the ALL_OBJFILES_SAFE 
macro, but here is an updated one that should work.

I'd like to hear some comments on this patch.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl@redhat.com    alla@lysator.liu.se 
He's a globe-trotting neurotic grifter with acid for blood. She's a 
mistrustful antique-collecting snake charmer with the power to see death. They 
fight crime! 

Attachment: gdb_debug.patch
Description: Text document


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