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: jprobe question


On Mon, Nov 28, 2005 at 07:53:12PM -0800, Zhang, Yanmin wrote:
> 
>    Mostly,  jprobe  handler has parameters. If the parameters are changed
>    in  the  jprobe  handler, should the original function use the changed
>    values?

 Good question.

>    My  answer is no. Because c compiler might change the parameter values
>    even though we don't change them in c codes sometimes.
> 
>    What's your idea?
> 

You are correct, gcc assumes that the callee owns the argument space and
could overwrite it. If you see the code in function setjmp_pre_handler()
(for i386 & x86_64), we are saving this area and restoring it back before 
passing the control back to the probed(original) function.

For Ia64, I was under the assumption that this might not be the case, but
you proved it wrong. So for Ia64 also we need to implement the similar logic of
saving and restoring the register stack space.

Will open a bugzilla entry for this to track this bug.

Patch welcome.

Thanks,
-Anil Keshavamurthy


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