This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: debugging core files from other machines with archived symbol files
- From: Paul Koning <pkoning at equallogic dot com>
- To: loa_gus at hotmail dot com
- Cc: drow at mvista dot com, gdb at sources dot redhat dot com
- Date: Tue, 19 Aug 2003 09:31:48 -0400
- Subject: Re: debugging core files from other machines with archived symbol files
- References: <BAY1-F1042H7ufgzqbP00005976@hotmail.com>
>>>>> "Erik" == Erik Gustafsson <loa_gus@hotmail.com> writes:
Erik> Hmm.. Isn't this something you want to be able to do? Seems to
Erik> me that everybody that is shipping software to customers would
Erik> like to be able to debug crash dumps from customer sites in a
Erik> simple way.
Erik> I'm not sure I understand on what level the problem is. Is this
Erik> a missing feature in GDB or missing information in the core
Erik> file?
I don't think there is a real issue in practice. Daniel briefly
stated the requirements -- you need to have a file system subtree
somewhere that has the same shape as the target system tree. That in
general isn't a big deal.
Given that, you simply point gdb to that subtree with
solib-absolute-prefix, and you're good to go.
For example, suppose your build procedure produces full (unstripped)
binaries in .../targetroot/usr/lib, .../targetroot/usr/bin, etc. Then
this gets the job done:
gdb .../targetroot/usr/bin/brokenapp
(gdb) set solib-absolute-prefix .../targetroot
(gdb) core customercorefile
GDB will find the relevant file names and the load addresses from data
stored in the corefile. Well, that depends on the OS; some don't do a
particularly good job. For example, you may discover, as I did, that
you can find text sections of libs but not data sections.
paul