hi, i'd like to debug a program with multiple threads created with commonc++.
but after creating those threads gdb does not show them. i can only view and manipulate the main thread.
how do i debug other threads??
thanks in advance
pilux
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2001-02-05
I use a combination of four things:
* ddd and gdb. My gdb came with RedHat 6.2 and seems to be thread aware. Asking it for a version it simply prints out "GNU gdb 19991004". If your gdb isn't thread aware, there seem to be a few patches around - you can search with google for them. But I think the current gdb should have thread support.
* a patched kernel, using the patch mentioned at http://www.uwsg.iu.edu/hypermail/linux/kernel/0003.1/1539.html. This patch causes the kernel to dump the core of the causing process instead of the main process.
* many, many asserts and trace outputs
* the dmalloc debugging library, available at http://dmalloc.com. This library kepps track of memory leaks, invalid allocation/freeing operations and so on and it is able to handle multi-threaded applications.
With this four tools, I was able to analyze and debug my applications pretty fast.
Good luck
Stefan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi, i'd like to debug a program with multiple threads created with commonc++.
but after creating those threads gdb does not show them. i can only view and manipulate the main thread.
how do i debug other threads??
thanks in advance
pilux
I use a combination of four things:
* ddd and gdb. My gdb came with RedHat 6.2 and seems to be thread aware. Asking it for a version it simply prints out "GNU gdb 19991004". If your gdb isn't thread aware, there seem to be a few patches around - you can search with google for them. But I think the current gdb should have thread support.
* a patched kernel, using the patch mentioned at http://www.uwsg.iu.edu/hypermail/linux/kernel/0003.1/1539.html. This patch causes the kernel to dump the core of the causing process instead of the main process.
* many, many asserts and trace outputs
* the dmalloc debugging library, available at http://dmalloc.com. This library kepps track of memory leaks, invalid allocation/freeing operations and so on and it is able to handle multi-threaded applications.
With this four tools, I was able to analyze and debug my applications pretty fast.
Good luck
Stefan