This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
About function parameter access
- From: "Mao, Bibo" <bibo dot mao at intel dot com>
- To: <fche at sourceware dot org>
- Cc: <systemtap at sources dot redhat dot com>, "Keshavamurthy, Anil S" <anil dot s dot keshavamurthy at intel dot com>, "Zhang, Yanmin" <yanmin dot zhang at intel dot com>
- Date: Thu, 17 Nov 2005 13:30:13 +0800
- Subject: About function parameter access
Hi all,
I find that there maybe exists one problem when accessing function
parameter. From the translated script, we can see that it uses MACRO
fetch_register to parameter value. Always in IA32 the first parameter is
placed in EAX register, and the macro is fetch_register(0).
But when function is with asmlinkage prefix, it is stored in stack, but
not in register. Maybe it the same reason with what has been reported
as: http://sourceware.org/bugzilla/show_bug.cgi?id=1868
And I has tested systemtap.samples/sysopen.stp, this function is
prefixed with asmlinkage, filename parameter is accessed by MACRO
fetch_register(0).
Regards
Bibo,mao