This is the mail archive of the gdb@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: Adding a missing NT_FILES note to a core file so gdb can load solibs for it


On Mon, 25 Jan 2016 15:06:05 +0100, Bogdan Harjoc wrote:
> So I'd like to ask whether this has any chance of working.

No.  GDB does not support NT_FILE reading.  GDB follows DT_DEBUG:
	readelf -d execbinary|grep -w DEBUG

Besides that it would not be completely correct, depending on the point of
view.  mmap()ped shared library will be present in NT_FILE but GDB will not
shows it as it was not dlopen()ed (either by a call or via DT_NEEDED).

When GDB cannot read shared libraries it usually means your executable does
not exactly match the one that was core dumped.  To make them matching one
should match build-id from the core file with that of the executable:
	eu-unstrip -n --core=corefile
	readelf -n execbinary|grep -A1 NT_GNU_BUILD_ID
IIRC ld-linux.so also needs to match, I cannot remember why now.


Jan


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