This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Adding a missing NT_FILES note to a core file so gdb can load solibs for it
- From: Bogdan Harjoc <harjoc at gmail dot com>
- To: gdb at sourceware dot org
- Date: Mon, 25 Jan 2016 16:06:05 +0200
- Subject: Adding a missing NT_FILES note to a core file so gdb can load solibs for it
- Authentication-results: sourceware.org; auth=none
I received some mips core files from an openwrt machine where all
.so's are sstripped: all the sections at the end are trimmed except
those strictly needed to run programs. All standard openwrt images are
built like this.
Reading the core files with readelf doesn't show any NT_FILES note,
and from stepping through the code, it seems this causes
solib_svr4_r_map() to fail, and "info sharedlibrary" shows nothing of
course.
I'm about to add that missing section back to the core file hoping it
will fix the automating loading of solibs. Google-coredumper [1] looks
like a good start for this, and cores are ELF files anyway. The load
addresses will be taken from the mapping that "info proc mappings"
outputs, it seems to be the same information.
[1] https://code.google.com/p/google-coredumper
So I'd like to ask whether this has any chance of working.
Thanks,
Bogdan