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 3/3] Implement qXfer:libraries for Linux/gdbserver #2


On Mon, 10 Oct 2011 04:43:36 +0200, Daniel Jacobowitz wrote:
> I would be a whole lot happier if we could use the same <library-list>
> elements for SVR4.  There may be some creative interpretations we can
> use to make it work... yes, we'd likely have to pass the link map
> addresses as additional information; fortunately that's easy.  I'm not
> sure I understand the issue with dealing with absolute library base
> addresses.

> But in short, the way to think about this is to move all
> the complicated bits of library processing to the target agent, and
> give GDB a simplified view of what's really going on.

The problem is the host symbol file may be also prelinked, therefore there
still needs to be the relocation on gdb side, whether the single number covers
just the host displacement or a sum of both the host and target displacement
does not matter much.

Just this case:
	[patch] [i386] Fix {,un}prelinked libraries for attach/core-load
	http://sourceware.org/ml/gdb-patches/2011-02/msg00630.html

had to be made in a heuristic way while with using /proc/PID/maps on the
gdbserver Linux side for absolute addresses normalization it could be made
reliable.  Going to try it.


> If that's not practical, then +1 to Pedro's suggestion; if you're
> bulk-reading the link maps, or doing some svr4-specific semantics, we
> should express it that way.

If the addresses are absolute then we can just add new attributes to the
current <library-list/> format and I assume the Pedro's suggestion for an
incompatible format is no longer valid then.



Thanks,
Jan


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