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] |
On Wed, May 05, 2010 at 01:48:21PM +0100, Andrew Stubbs wrote:Hi all,
I'm trying to get to the bottom of a problem debugging prelinked libraries. I've fixed a few aspects of the problem, but the further I get into it the more I think I must be missing something. I mean, debugging prelinked libraries is supposed to Just Work, right? But I can't see how it could ever have worked.
It definitely works. GDB is even supposed to automatically handle libraries that are prelinked to a different location on disk than they were at runtime, although that's relatively recent, IIRC.
Upon closer inspection, I find that the psymtab has the textlow and texthigh addresses as the original file-offsets, before relocation. This appears to be because it calculates the section offset as the difference between the actual address and the ELF VMA, but the file is prelinked, so the offset is zero, and the debug info and symbols are then not relocated.
What do you mean by "before relocation"?
Are the libraries used to create the core dump prelinked in exactly the same way as the libraries on the host during debug, or not? It should work either way, but they're different cases.
If both libraries are identically prelinked, then I would have expected the prelinked libraries to not require relocation. prelink includes code to manipulate the contents of the debug info.
I don't know if prelink follows things across to separate debug info files. It doesn't look like it. So if you have that, too, then the separate debug info file should be treated as a not-prelinked copy of the shared library.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |