Re: [DynInst_API:] Accessing more x86 registers


Date: Mon, 10 Sep 2012 15:17:02 -0700
From: Josh Stone <jistone@xxxxxxxxxx>
Subject: Re: [DynInst_API:] Accessing more x86 registers
On 09/08/2012 09:12 AM, Andrew Bernat wrote:
> What are you trying to accomplish with this? The SPRs are not accessible
> via instrumentation, which is why the BPatch registers method didn't
> return them. 

Hmm - well as I said, I haven't tried it yet, but I assumed the SPRs
must be working for Mike at least for him to have this patch.

My intent is to allow systemtap scripts to access program state, like
parameters and locals near the place they choose to probe.  GPRs are
good for a lot of this, but stack and frame registers are also commonly
needed in DWARF expressions.

I suppose it's possible, but I hope unlikely, that the IP could be
referenced too, but I can see how that would especially challenging to
reason about under Dyninst.  We do have our own unwinding runtime code
which would need the IP, and almost certainly wouldn't work here; I have
yet to consider this much.  I remember that Dyninst has an unwinder, but
that's all mutator-side, right?

Anyway, just adding %rbp and %rsp to the available x86 register set
would go a long way toward completeness.  Could those be made accessible?

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