Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* How to switch threads in gdb while a thread is being blocked
@ 2011-03-28 20:45 Alexandru Sutii
  2011-03-29 15:05 ` Tom Tromey
  0 siblings, 1 reply; 6+ messages in thread
From: Alexandru Sutii @ 2011-03-28 20:45 UTC (permalink / raw)
  To: gdb

Hello!

I am developing a GUI application that uses gdb. The purpose of the
application is
to give the user the chance to graphically see what happens when processes
communicate using IPC, or when a process blocks when taking a mutex, and so on.

I have a problem with processes that block waiting for another process
to take an action.
For instance, say I have the following situation: A process P creates
a child process C.
The child and the parent communicate through a pipe. After fork() the
parent waits for the
child to write something in the pipe. If debugging this in gdb the
parent blocks when waiting
for the child to write in the pipe. As a result gdb freezes and I
cannot switch to the child
process in order to make it write in the pipe, so the parent could
continue. I mention that
I set detach-on-fork off.

Is there a way to switch threads in gdb after the current
thread/process blocks? I have also
thought of setting detach-on-fork on and try to attache to the newly
created process with
another gdb instance, but I didn't manage to accomplish this. Any
advices are welcome.

Thanks in advance.
--Alex.


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

end of thread, other threads:[~2011-03-30 15:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-28 20:45 How to switch threads in gdb while a thread is being blocked Alexandru Sutii
2011-03-29 15:05 ` Tom Tromey
2011-03-29 21:59   ` Alexandru Sutii
2011-03-30  0:03   ` chris.hall.list
2011-03-30 13:58     ` Tom Tromey
2011-03-30 15:16       ` 'Chris Hall'

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