|
From: Yang Z. <yan...@gm...> - 2008-04-24 23:21:07
|
Hi, valgrind doesn't seem to be attaching the debugger to a particular
program of mine. Attach works fine with a simple minimal test program I
created that performs an invalid write, but not with this program:
$ valgrind --db-attach=yes test/dtxn/ordered/orderedclient_test
==1402== Memcheck, a memory error detector.
==1402== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==1402== Using LibVEX rev 1804, a library for dynamic binary translation.
==1402== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==1402== Using valgrind-3.3.0, a dynamic binary instrumentation framework.
==1402== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==1402== For more details, rerun with: -v
==1402==
OrderedClient:
BadCreate: ==1403== Invalid write of size 8
==1403== at 0x406785:
dtxn::OrderedClient::OrderedClient(MessageConnection*)
(messageconnection.h:75)
==1403== by 0x402D16: OrderedClient_BadCreate::run()
(orderedclient_test.cpp:33)
==1403== by 0x404B72: TestSuite::runAll() (harness.cpp:82)
==1403== by 0x57E6B43: (below main) (in /lib/libc-2.6.1.so)
==1403== Address 0x8 is not stack'd, malloc'd or (recently) free'd
==1403==
==1403== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- y
==1403== starting debugger with cmd: /usr/bin/gdb -nw /proc/1406/fd/1014
1406
Then nothing happens, and no system resources are being consumed. If I
hit ctrl-c, then I get prompted again immediately:
==1402==
==1402== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ----
And subsequently, nothing I press (ctrl-c, ctrl-\, ctrl-z) will get me
out, but only bring up further prompts (every 3 keystrokes).
I don't have a .valgrindrc or env var set, and I'm using 3.3.0. This is
on Ubuntu 7.10. Perhaps it's something in the way I compiled the
program - any hints? Thanks in advance for any help!
--
Yang Zhang
http://www.mit.edu/~y_z/
|