On Saturday 28 February 2009, Trevor Alexander HANSEN wrote:
> Hi,
> 
> I'm making a Valgrind tool that reconstructs a binary's control flow graph.
> 
> I'd like there to be no duplicate instructions in the CFG.
> ...

Valgrind works on dynamic basic/superblocks, not static ones.
There can be blocks overlapping each other, resulting in the same
instruction existing in multiple instrumented blocks.
I think you have to cope with this.

Your approach never would work with something like this:

        b1
 label: b2
        if (guard) { jump label; }

b1 & b2 always will show up combined in Valgrind. Lets say that
guard at the beginning always is false, so it does not matter.
But at one point, when guard happens to be true, do you want to split
up the already executed block b1&b2 into two blocks?

Josef


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to