|
From: Jersey <luc...@gm...> - 2013-11-26 16:02:22
|
> Hi, all: > > I am trying to use valgrind to do value profiling at specified address of guest instruction. > > By adding my own instrumentation codes for each Ist_Mark in the MC_(instrument) function, as the way Lackey does, I am able to pause the guest program at specific instruction address and then do value profiling thanks to Memcheck . > > However, in this way, the instrumentation codes RUNS BEFORE the corresponding guest instructions. for example: > int j=10; > 8048416: ... movl $0xa,0x18(%esp) > 8048416 is the address of guest instruction.If I check the value of j in the instrumentation codes, i will get a garbage value instead of 10, because the movl instruction has not executed yet. > I want to check the value of j, AFTER this instruction(movl) executed. But I don't know how? > > My guess is it has something to do with the JIT dispatcher, is there an command option that I could use or there is a better way to add instrumentation code? > > Thanks a lot for your time and efforts. > > -- > Regards > Jersey Zhang |