argument values at function return
Roland McGrath
roland@redhat.com
Fri Jul 29 21:49:00 GMT 2005
> Anil reported that Bert Hubert would like to see arg values upon
> return from a function. Jim pointed out that this would be tough to
> do reliably in kprobes, since the ABIs specify where the args live
> on entry to the function, but not on exit. It could perhaps be done
> in SystemTap, which has access to the debug info.
It's not purely an issue of knowing where to look. The locations where
arguments are passed are available to the callee to reuse. On machines
with register arguments, they always do. On stack-passing machines, they
do at least for tail calls. Simply put, the argument values are not
reliably still stored anywhere at all by function return time. What
systemtap can do, and I would think can be made to do in a mostly automatic
fashion, is to save argument values in a function entry probe and then use
those saved values in an exit probe.
More information about the Systemtap
mailing list