Re: [DynInst_API:] BPatch_object


Date: Mon, 30 Apr 2012 16:00:48 -0700
From: Josh Stone <jistone@xxxxxxxxxx>
Subject: Re: [DynInst_API:] BPatch_object
On 04/30/2012 03:27 PM, Andrew Bernat wrote:
> The reason I bring it up is because it has bitten us in the posterior
> many times. Once we build a "return one" interface, it's _really_
> hard to generalize it.

Ok, makes sense.

> We can turn a file, offset pair into an address with complete
> accuracy; this is making some assumptions about how static libraries
> work, but I think they can be worked out. For non-static-libraries,
> the offset has to tell us where in the file we are (text, some other
> code, data, etc.) and we can use that to distinguish which load
> address we want.

What do you mean by "the offset has to tell us where ..."?  Just that
the offset provided has to make sense for one of those locations?  Or
must the caller specify some context along with the offset?

If you need some context, like which PT_LOAD segment, that might be hard
for me to know.  Whatever's executable at that offset, I suppose. :)

> BTW, SymtabAPI is working on disk, and so has no concept of a "loaded
> at" address. There is a wrapper provided for that, but that is a
> logical thing to expose through BPatch.

Great.


Josh
[← Prev in Thread] Current Thread [Next in Thread→]