Search code examples
debuggingvalgrindtrace

Can valgrind output an execution trace in VEX IR?


I am new to valgrind. My understanding is that valgrind is similar to Intel PIN, i.e., it is a binary instrumentation tool.

Is it possible to make valgrind output a full execution trace, i.e. a long list of all executed instructions (translated to vex IR)? It seems basic to me but I could not find any info about how to do this.

The closest I could find was the possible gdb integration described here. Using gdb to generate the trace seems to be not a good approach as valgrind must have the IR instructions anyway when they are executed.


Solution

  • valgrind has various tracing options of the VEX IR.

    See valgrind --help-debug

    Maybe also the -tool=lackey might be useful.