This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: stack_used() not accurate?
Jim Keniston <jkenisto@us.ibm.com> writes:
> That's certainly a reasonable interpretation of what REG_SP is supposed
> to mean.
This makes sense to me.
> Another reasonable interpretation is "the stack-pointer member
> of pt_regs."
If they knew the member per se, they could just use it.
> The latter interpretation actually has more subscribers in the
> SystemTap source, as indicated by the use of ®_SP(regs) in
> stack-*.c.
I don't understand these. Do ia64, ppc64, and s390 have the same
peculiarity as x86 in the pt_regs->*sp not actually containing the
trap-time stack pointer value? Or is it just a coincidence that it
works, as in having the pt_regs structure itself be physically
allocated/placed on the probe context stack, so that the address
of any field will point somewhere into the stack?
- FChE