|
From: Ali K. <akh...@in...> - 2010-04-24 22:36:43
|
Hi,
I'm trying to store the address of every return call from a program to a
buffer. I've managed to check the statementblocks of every instructions
and then print the statements in that block
//bb is an IRSB type
if (bb->jumpkind ==Ijk_Ret)
{
for (i = 0; i < bb->stmts_used; i++) {
st = bb->stmts[i];
ppIRStmt(st);
VG_(printf)("\n");
}
VG_(printf)("THIS IS A RETURN\n");
}
part of the output of the supuerblock i get is :
------ IMark(0x1BFF69, 5) ------
PUT(60) = 0x1BFF69:I32
t28 = Sub32(t9,0x4:I32)
PUT(16) = t28
STle(t28) = 0x1BFF6E:I32
------ IMark(0x1D4EBB, 3) ------
PUT(60) = 0x1D4EBB:I32
t30 = LDle:I32(t28)
PUT(12) = t30
------ IMark(0x1D4EBE, 1) ------
PUT(60) = 0x1D4EBE:I32
t15 = LDle:I32(t28)
t31 = Add32(t28,0x4:I32)
PUT(16) = t31
THIS IS A RETURN
Now I'm assuming that t31 right before the "THIS IS A RETURN" statement
is actually the address of the return,
is there a way I could obtain the address of t31 so that I could store
it somewhere (e.g. an array)?
Thanks,
|