On Wed, Mar 26, 2008 at 02:25:10PM -0700, Adam Leventhal wrote:
> As for why you're seeing the old program counter, the D program effectively
> executes after the other effects of the instruction have been processed, but
> before the program counter has advanced. This is by design so that tracing the
> program counter or stack trace matches the location at which the probe was
> placed.

I found a reference to a DTrace script which seems to have worked in the way
that you had anticipated by expecting to the see the value of the program
counter after the ret instruction had executed. Looking into this a bit more,
I changed this behavior in March 2005 to fix this bug:

  6236726 ustack() at pid provider return probes can be confusing

There's an existing RFE to expose the true value of the traced instruction:

  5106439 pidprovider instrumentation obscures original instruction

It would be a good idea to also expose the pending program counter update.

Adam

-- 
Adam Leventhal, Fishworks                        http://blogs.sun.com/ahl
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to