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: [patch] Fix GNU/Linux core open: Can't read pathname for load map: Input/output error.


On Tue, 17 May 2011 03:06:11 +0200, Paul Pluzhnikov wrote:
> I see this all the time, and it causes end-user confusion.

(a)
The fix should be in glibc and not in gdb but it was rejected in glibc.

(b) 
Loading libraries for a core file from the inferior solist stored in the core
file does not work anyway.  If you have a crashed application with memory
corruption commonly the inferior solist is also corrupted, GDB fails to find
the libraries, therefore fails to load relocated symbols and therefore fails
to display symbols for the backtrace.

The right approach is to map symbols for libraries according to their
build-ids (when available).  This is no longer dependent on the corrupted
solist.  And it is also no longer dependent on this glibc bug as the solist
will no longer get used (it will - to check for libraries not having
build-id).

Unfortunately the whole build-id locating patch is not yet in FSF GDB.
	http://sourceware.org/ml/gdb-patches/2010-11/msg00353.html
	http://sourceware.org/ml/gdb-patches/2010-11/msg00354.html
or:
	http://pkgs.fedoraproject.org/gitweb/?p=gdb.git;a=blob_plain;f=gdb-6.6-buildid-locate.patch;hb=f15
	http://pkgs.fedoraproject.org/gitweb/?p=gdb.git;a=blob_plain;f=gdb-6.6-buildid-locate-rpm.patch;hb=f15
	http://pkgs.fedoraproject.org/gitweb/?p=gdb.git;a=blob_plain;f=gdb-6.6-buildid-locate-rpm-librpm-workaround.patch;hb=f15
	http://pkgs.fedoraproject.org/gitweb/?p=gdb.git;a=blob_plain;f=gdb-6.6-buildid-locate-core-as-arg.patch;hb=f15

I do not yet have written the build-id extension for mapping solibs but I will
do it soon as it affects Fedora ABRT backtracing a lot.


Thanks,
Jan


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