Quick reply :)
Those two definitely should be in the list; I know we can access them internally. The flags registers would be weirder.
And you can get the original pc with a snippet type, so hopefully that will work for you.
Drew
--
Drew Bernat
bernat@xxxxxxxxxxx
abernat@xxxxxxxxxxx
On Sep 10, 2012, at 5:17 PM, Josh Stone <jistone@xxxxxxxxxx> wrote:
> 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
|