|
From: Zvi V. <ver...@gm...> - 2012-07-06 10:50:32
|
Hello, Is it possible to stop running an application with valgrind upon the first error valgrind finds ? Thanks, Zvika |
|
From: Philippe W. <phi...@sk...> - 2012-07-06 22:10:19
|
On Fri, 2012-07-06 at 13:50 +0300, Zvi Vered wrote: < Hello, < Is it possible to stop running an application with valgrind upon the < first error valgrind finds ? < If 'stop running' so that you can examine in depth what is the cause of the error, then you can use Valgrind gdbserver (you need Valgrind >= 3.7.0) for that. Give the option --vgdb-error=1, and then you can connect with gdb to the Valgrind embedded gdbserver. If by 'stop running', you mean kill your application so that it exits with error, then I think you might be able to obtain that by using --db-attach=yes and "--db-command=kill -9 %p" or something like that (not tried). Philippe |
|
From: Zvi V. <ver...@gm...> - 2012-07-06 23:57:01
|
Dear Philippe, You help is highly appreciated. Best regards, Zvika. On 7/7/12, Philippe Waroquiers <phi...@sk...> wrote: > On Fri, 2012-07-06 at 13:50 +0300, Zvi Vered wrote: > < Hello, > < Is it possible to stop running an application with valgrind upon the > < first error valgrind finds ? > < > > If 'stop running' so that you can examine in depth what > is the cause of the error, then you can use Valgrind gdbserver > (you need Valgrind >= 3.7.0) for that. > Give the option --vgdb-error=1, and then you can connect > with gdb to the Valgrind embedded gdbserver. > > If by 'stop running', you mean kill your application so that it > exits with error, then I think you might be able to obtain > that by using --db-attach=yes and > "--db-command=kill -9 %p" > or something like that (not tried). > > Philippe > > > |