On 02/20/2011 02:52 AM, zhouxu(NUDT) wrote:
> Hi everyone,
>   I am new to Valgrind. I want to log an program's every memory
> access. Each log entry should contain "thread id", "memory address",
> "read or write". I want to know if Valgrind can do this job and how? Thank 
> you!
> 

Yes that can be done. You need to instrument the intermediate representation.
A memory read will be represented by an Iex_Load expression and a memory write
will be represented by a Ist_Store statement. Take a look at libvex_ir.h for a
description of the IR and at the lackey tool for a simple instrumentation 
example.

Good luck, Florian

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to