Hi everyone,

I tried to use lackey to record every memory access made by program. I
wrote very simple Hello Word program and used lackey to trace.
Unfortunately, lackey couldn't finish this job and I got very huge log file
(>100M) so I had to stop it.

After checked log file, lackey recorded a lot of following repeat
information:
I  04853198,2
I  0485319a,2
I  0485319c,4
 S 0490c0bc,4
I  048531a0,4
I  048531a4,2
I  04853194,4
 L 0490c0bc,4
I  04853198,2
I  0485319a,2
I  0485319c,4
 S 0490c0bc,4
I  048531a0,4
I  048531a4,2
I  04853194,4
 L 0490c0bc,4

My environment:
uname -r : 3.9.0-1-linaro-omap
Pandaboard ES, I also checked on OMAP 5432 Evm Board.


Steps to Reproduce:
Setp 1. Write test.c
#include <stdio.h>
int main()
{
    printf("Hello\n");
    return 0;
}

Step 2. Compile program.
    arm-linux-gnueabihf-gcc ./test.c

Step 3. valgrind --log-file="log.txt" --tool=lackey --trace-mem=yes ./a.out



After checked the code (lk_main.c), I found that the problem may be dirty
helper. I only call addStmtToIRSB when "ev->addr->tag" is "Iex_RdTmp",
Endless loop never happens.

I modified the "addStmtToIRSB( sb, IRStmt_Dirty(di) );" (in flushEvents
function) code into following codes:

      switch (ev->addr->tag) {
      case Iex_Const:
           VG_(printf)("L %08lx\n", ev->addr->Iex.Const.con->Ico.U32);
           break;
      case Iex_RdTmp:
           addStmtToIRSB( sb, IRStmt_Dirty(di) );
           VG_(printf)("Iex_RdTmp %lu\n", ev->addr->Iex.RdTmp.tmp);
           break;
      }


Does anyone can help me? Thanks!

Best Regards.
------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to