>Thanks for the answer. In the meantime I have found a partial solution
>to this problem. I set
>ulimit -c ulimited
>run my program under helgrind and then kill it with SIGABRT when it
>hangs. Using gdb I can then get the stack trace from the vgcore.xxxx
>file generated.
>Still it would be a nice feature if Valgrind could just print the stack
>trace without quitting, for example after being sent SIGUSR signal.

If you use a recent 3.7.0 svn version, you can use gdb to interactively
connect at any time to the process running under Valgrind (as Valgrind
now has an integrated gdbserver).

You can then put breakpoints, "continue", and then use the normal gdb
commands
to look at the threads. E.g. to have a stack trace of all threads,
you can do:
 (gdb) thread apply all bt
or (to have all the local variables)
 (gdb) thread apply all bt full
The interactive gdb usage might help you to understand what is going
wrong when running under Valgrind.


Alternatively, a patch (not reviewed/not checked in yet) is attached
to bug  http://bugs.kde.org/show_bug.cgi?id=279212

With this patch, from a shell, you can use the command
  vgdb v.info scheduler
to have valgrind scheduler unwinder printing a stack trace for each
thread.
(this patch is to be applied on a 3.7.0 svn).

Philippe



------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to