Re: Debugging multithreaded application with GDB

Daniel Jacobowitz
2008-08-03T14:11:43Z

On Sun, Aug 03, 2008 at 03:40:28PM +0300, Alan Turing wrote:
> My problem:
> I need to catch the thread as close to its starting point as possible.
> Setting a break point after the thread is already running means it's
> way past the desired break point.

You can't set thread-specific breakpoints before a thread is running,
because the ID of the thread is not known yet. But normal
breakpoints affect all threads. Can you set a breakpoint at the
thread entry function without specifying the thread?

--
Daniel Jacobowitz
CodeSourcery