Debugging with GDB across multiple processes

Without going into details, I am working on a program consisting of several separate processes running on embedded QNX RTOS. They do not have a parent-child relationship, they are all generated using spawnlp(P_NOWAIT, ...), and they all communicate with each other using the IPC mechanism provided by the OS.

When I debug GDB and I hit a breakpoint in the process, all of my threads are paused, which is great. But is there a way to make it pause my other processes? Right now, what happens, all other processes continue to work while my process is pausing, and so all IPC queues are filling up, etc. Etc.

Thanks in advance,

HF

+3
source share
1

GDB . , A, , , SIGTRAP B, :

(gdb) b main
Breakpoint 1 at 0x804834a: file testA.c, line 40.
(gdb) command
Type commands for when breakpoint 1 is hit, one per line.
End with a line saying just "end".
>shell kill -s TRAP `pidof testB`
>end
(gdb) 

+1

All Articles