This is the mail archive of the systemtap@sources.redhat.com mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

argument values at function return


> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]