On Thursday 07 July 2011, pankaj pawan wrote:
> Hi all,
> 
> I had doubt regarding the flattened IR for a call instruction. When I try
> and print the IR statements for call instructions, i can see the return
> instruction being written on the stack but i am unable to see how the
> branching is being done.
> I can't capture it in Ist_Exit .

A call is nothing more than an unconditional jump with putting a return address
on the stack. As such, the call will disappear in the middle of a superblock.
You could detect that there is a jump in the addresses of subsequent guest
instructions, but AFAIK, there is no way to detect whether
it just was a jump or a call (*).

Instead, you can prohibit the building of superblocks by setting VEX attributes

   VG_(clo_vex_control).iropt_unroll_thresh = 0;
   VG_(clo_vex_control).guest_chase_thresh = 0;

in your tool initialization (as callgrind does).
Then, a call should end a BB, and IRSB attribute jumpkind should be Ijk_Call
if the BB ends in a guest call instruction.

Josef

(*) It can make sense to add a VEX noop IR hint about that there was a given
call/jump in the middle of a superblock translation. But only if a tool really
would need it...


> 
> Can someone explain me what am I missing.
> 
> Thanks,
> pankaj
> 



------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to