|
From: Nicholas N. <n.n...@gm...> - 2009-11-05 00:41:11
|
On Wed, Nov 4, 2009 at 5:18 PM, tejas <kk...@gm...> wrote: > Hi, > > I am writing a tool to extract dynamic trace from a program run using > valgrind. I am using a modified version of lackey to accomplish this. I > understand that valgrind prints out the assembly or x86(in this case) > instructions of the program when the --profile-flags option is used. I > was wondering if there is a way to know what the guest instruction is > (like addl $2, %eax), given a particular Imark? Is there a function that > can do this? If yes, can i call this function, giving the IMARK > information as input, from the instrumentation code? The Imark contains the address of the original instruction. If you want to do anything with the original instruction you have to look at the memory and decode it yourself. Valgrind is really targeted towards tools that don't need to know about the exact original instructions but are happy to work with a platform-independent representation. Nick |