c++ - How to make Valgrind debugger step through a program -
good morning, trying use valgrind debugger step through program.
my valgrind command line valgrind -tool memcheck --leak-check=full --db-enable=yes ./matchupacurate.exe.
i using valgrind-3.5.0 on centos linux release 5.5 gdb version 7,0.1-23.el5_5.2.
i enter yes when valgrind asks question attach debugger. then, valgrind debugger returns with: 4428: return new tuple2<int,a>(2, i++, p->next());
when try use gdb step or continue command, valgrind says
[new thread 0x410fd10 (lwp 6548] cannot find user-level thread lwp 6551: generic error.
when try use valgrind --single-step=yes
debugger option on valgrind command-line, valgriind says bad option aborting
.
could valgrind users show me how step through c++ source code or continue through program? thank you.
you can vgdb in 3.7.0 release. release notes:
- gdb server: valgrind has embedded gdb server. means possible control valgrind run gdb, doing usual things gdb can (single stepping, breakpoints, examining data, etc). tool-specific functionality available. example, possible query definedness state of variables or memory within gdb when running memcheck; arbitrarily large memory watchpoints supported, etc. use gdb server, start valgrind flag --vgdb-error=0 , follow on-screen instructions.
there's more info in valgrind online manual.
Comments
Post a Comment