|
From: Josef W. <Jos...@gm...> - 2011-07-08 13:06:05
|
On Thursday 07 July 2011, pankaj pawan wrote: > Hi Josef, > > Thanks for your reply. I did run valgrind with > guest_chase_thresh = 0 and was able to do capture the calls. > > But my doubt was that I can't see the jump statement(is it that > unconditional jumps are not displayed in IR) > Sorry I am new, but an unconditional branch we should just set the IP to the > called location?Am I right? > How it this being taken care of in the IR? See the IRSB structure definition in "libvex_ir.h". The final jump is specified there by jumpkind/next. > I also had another question : > > Can we read the values written on stack. For example if I want to get the > arguments being passed to a certain function? > > I have been able to intercept the calls to that particular function and get > the Stack Pointer. How do I read the stack values? If you know that a given function uses the calling conventions of a given ABI, and you know the number of arguments and types, you can directly access the stack to get at parameter values. Otherwise, you need to parse debug information. I suppose you need to extend the debug info reader to be able to forward such information to tools. Josef |