|
From: Philippe W. <phi...@sk...> - 2013-04-14 20:47:24
|
On Fri, 2013-04-12 at 11:03 +0200, MOULINIER Luc (UDS) wrote: > As my program is multi-threaded, a normal run of valgrind doesn't work. Valgrind is able to run a multi-thread program (even if it serialises the execution, i.e. even on a multi-cpu, only one thread runs at a single time). However, if you want to debug your program when Valgrind encounters an error, then effectively you have to use GDB+vgdb. > > gdb /usr/local/ActiveTcl/bin/tclsh > and then > target remote | vgdb > > but then I can't give a "run /home/moumou/ordali/src/ordali.tcl exe ThrSco" command to gdb ! "run is not allowed using vgdb" Effectively, the GDB command "run" cannot be used with the Valgrind gdbserver : you must first launch your program using valgrind --vgdb-error=0 your_program your_program_args then connect GDB to the valgrind gdbserver using vgdb. You then use the GDB commands "continue", or "next", or "step" to allow the execution of your_program to proceed. Philippe |