|
From: Iain <ia...@gn...> - 2009-08-02 00:28:34
|
I've been hacking a simple valgrind tool that tracks calls to certain functions, and I was able to use the lackey code to work out how to do that, but I can't work out how to get the parameters the the function is called with. To be honest, I'm not even sure if this information is stored in the VEX IR stuff anyway, or if I'm going about this in completely the wrong way. iain |
|
From: Julian S. <js...@ac...> - 2009-08-02 07:41:16
|
On Sunday 02 August 2009, Iain wrote: > I've been hacking a simple valgrind tool that tracks calls to certain > functions, and I was able to use the lackey code to work out how to do > that, > but I can't work out how to get the parameters the the function is called > with. > > To be honest, I'm not even sure if this information is stored in the > VEX IR stuff anyway, or if I'm going about this in completely the > wrong way. It's not in there. If you want to see an example of an API checker (something that intercepts functions, checks their args somehow, and calls onwards to the intercepted function) have a look at auxprogs/libmpiwrap.c. J |
|
From: Iain <ia...@gn...> - 2009-08-02 21:07:37
|
On Sun, Aug 2, 2009 at 8:47 AM, Julian Seward<js...@ac...> wrote: > On Sunday 02 August 2009, Iain wrote: >> I've been hacking a simple valgrind tool that tracks calls to certain >> functions, and I was able to use the lackey code to work out how to do >> that, >> but I can't work out how to get the parameters the the function is called >> with. >> >> To be honest, I'm not even sure if this information is stored in the >> VEX IR stuff anyway, or if I'm going about this in completely the >> wrong way. > > It's not in there. If you want to see an example of an API > checker (something that intercepts functions, checks their > args somehow, and calls onwards to the intercepted function) > have a look at auxprogs/libmpiwrap.c. Ah, thanks, I was way off. Whoops. iain |