Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Debugging multithreaded application with GDB
@ 2008-08-03 12:41 Alan Turing
  2008-08-03 14:11 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Turing @ 2008-08-03 12:41 UTC (permalink / raw)
  To: gdb

Hi Anyone,
I have encountered a problem using GDB for stepping through execution
threads, and hope someone out there has the proper experience to guide
me through:
1. GDB would set a breakpoint in a thread only if it already exists
2. In most cases, once a thread is launched, it would start executing
almost imemdiately.

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.

Anyone?

Much Obliged,
Mashkochit


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Debugging multithreaded application with GDB
  2008-08-03 12:41 Debugging multithreaded application with GDB Alan Turing
@ 2008-08-03 14:11 ` Daniel Jacobowitz
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2008-08-03 14:11 UTC (permalink / raw)
  To: Alan Turing; +Cc: gdb

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-08-03 14:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-03 12:41 Debugging multithreaded application with GDB Alan Turing
2008-08-03 14:11 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox