|
From: Alex B. <ker...@be...> - 2006-09-07 15:00:52
|
On Thu, 2006-09-07 at 15:32 +0100, Tom Hughes wrote: > In message <115...@ok...> > Alex Bennee <ker...@be...> wrote: > > >> > Is there a way to log the loads and stores valgrind makes? > >> > >> No. I'm not even entirely sure what loads and stores you are talking > >> about, but the answer is no anyway. > > > > Well something is writing the memory. As we known the address of the > > memory in question is there a way to hook into valgrind and ask it "let > > me know the 2nd time a value is written to this address"? > > There's the old watchpoint patch somewhere but I have no idea if > it still applies... That will only catches writes made by your > code though. I'll give that a try and see it I can get it to apply. How come it never got merged in the first place? It does seem like quite a useful facility > There is no way to spot writes made by valgrind itself other than > by running it under gdb and using the normal gdb watchpoint support. (gdb) r --smc-check=all dynamite -z config applu < applu.test.in Starting program: /usr/local/bin/valgrind --smc-check=all dynamite -z config applu < applu.test.in ==6286== Memcheck, a memory error detector. ==6286== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al. ==6286== Using LibVEX rev 1426, a library for dynamic binary translation. ==6286== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP. ==6286== Using valgrind-3.3.0.SVN, a dynamic binary instrumentation framework. ==6286== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al. ==6286== For more details, rerun with: -v ==6286== Program received signal SIGSEGV, Segmentation fault. 0x00000004033d2f66 in ?? () (gdb) x/i $pc 0x4033d2f66: mov %ebx,0x0(%r12) (gdb) p/x $r12 $1 = 0x7feffef7c (gdb) x/w $1 0x7feffef7c: Cannot access memory at address 0x7feffef7c (gdb) Hmmm not a good sign that it doesn't get as far in gdb as running from the command line. Now our app does move around in memory, I wonder if the combination of Valgrind, Our app and gdb's memory demands are just too much to handle? > Tom > -- Alex, homepage: http://www.bennee.com/~alex/ Kansas state law requires pedestrians crossing the highways at night to wear tail lights. |