This is the mail archive of the systemtap@sourceware.org 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]

Re: function parameter access in kretprobe handler


> Frank was lukewarm regarding this idea, I think mostly because DWARF can
> tell you how to find arg values at the end of the function prolog, but
> not right at entry to the function:
> http://sourceware.org/ml/systemtap/2005-q3/msg00599.html

This is the case with older compilers and due to bugs perhaps still the
case in gcc 4.0.x.  At least as of gcc 4.1, we think that the DWARF info is
correct throughout the prologue and epilogue regions.  But this is indeed a
problem for practical needs today.

> Finding the arg values on function entry is theoretically very
> straightforward -- each architecture's ABI spells it out -- except that
> for some architectures, declarations such as fastcall and asmlinkage map
> to regparm attributes that alter where args are passed.  And it's my
> understanding that DWARF doesn't provide a function's regparm value. 

That is all correct.  We may well extend the DWARF info in future to
indicate the calling convention selection, but so far it is not knowable
after compile time.  


Thanks,
Roland


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