On Wed, 20 Feb 2008, Olivier Sarrouy wrote: > But how can i, at run-time, access the content of temporaries (for example > to obtain the result of an Add32) ?
Temporaries don't exist at run-time as such -- they all get converted into real registers. But, at instrumentation time that isn't relevant... if you want the value in a temporary, you just use it. Eg. if you have t3 = Add32(t1, t2) the result in t3 is accessed simply by using t3. So you can pass it into a helper function, for example. Look at Memcheck's code, and also the code after it has instrumented it (using --trace-flags). Or you might find the example in http://www.valgrind.org/docs/valgrind2007.pdf useful. Nick ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Valgrind-developers mailing list Valgrind-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-developers