|
From: <sv...@va...> - 2009-05-21 23:40:38
|
Author: sewardj Date: 2009-05-22 00:40:31 +0100 (Fri, 22 May 2009) New Revision: 10082 Log: This should have been part of r10081 (which was: In the core/tool iface, VG_TDICT_CALL(tool_pre_syscall, ...) and VG_TDICT_CALL(tool_post_syscall, ...), also pass the arguments to syscall, for the tool to inspect if it wants.) Modified: branches/DCAS/include/pub_tool_tooliface.h Modified: branches/DCAS/include/pub_tool_tooliface.h =================================================================== --- branches/DCAS/include/pub_tool_tooliface.h 2009-05-21 23:35:43 UTC (rev 10081) +++ branches/DCAS/include/pub_tool_tooliface.h 2009-05-21 23:40:31 UTC (rev 10082) @@ -386,9 +386,19 @@ /* Tool does stuff before and/or after system calls? */ // Nb: If either of the pre_ functions malloc() something to return, the // corresponding post_ function had better free() it! +// Also, the args are the 'original args' -- that is, it may be +// that the syscall pre-wrapper will modify the args before the +// syscall happens. So these args are the original, un-modified +// args. Finally, nArgs merely indicates the length of args[..], +// it does not indicate how many of those values are actually +// relevant to the syscall. args[0 .. nArgs-1] is guaranteed +// to be defined and to contain all the args for this syscall, +// possibly including some trailing zeroes. extern void VG_(needs_syscall_wrapper) ( - void (* pre_syscall)(ThreadId tid, UInt syscallno), - void (*post_syscall)(ThreadId tid, UInt syscallno, SysRes res) + void (* pre_syscall)(ThreadId tid, UInt syscallno, + UWord* args, UInt nArgs), + void (*post_syscall)(ThreadId tid, UInt syscallno, + UWord* args, UInt nArgs, SysRes res) ); /* Are tool-state sanity checks performed? */ |