<div dir="ltr">Hello all,<br><br>I am examining the issue of debugging multi-threaded (specifically using pthreads, and written in C or C++) applications in Linux. The basic tools, as far as I can tell, are somewhat lacking; while the DDD documentation does have a screenshot showing a &quot;suspend&quot; button in Status-&gt;Threads, this does not show up in my version of ddd (3.3.11), and I can&#39;t really figure out how to do this from within gdb. Is it even possible? As far as I know, this is possible with Java, and I&#39;m guessing that it has to do with additional JRE instrumentation (the debugger tells JRE to suspend the thread, and while the Linux thread is running, the JRE code therein does a sched_yield).<br>
<br>So my question are:<br>1. Am I missing something, and this is in fact possible with GDB? If so, is there a graphical interface (my coworkers are fond of those...) which supports this?<br>2. Is there a different Linux (on x86) debugger which does support this?<br>
3. What is the situation of this problem on other OSes?<br>4. What other neat thread-related debugging tools (other than suspending individual threads, that is) are there, and which debuggers support them?<br><br>I&#39;ve been trying to google the answers to these questions, but so far I&#39;ve come up short. Any wise keywords would be appreciated :)<br clear="all">
<br>-- <br>Man is the only animal that laughs and weeps, for he is the only animal that is struck with the difference between what things are and what they ought to be.<br> - William Hazlitt<br><br>Ohad Lutzky<br>
</div>