Don't pause GDB on child process exit

20 Views Asked by At

I am debugging a program which creates multiple processes (it mostly calls a shell script which sets up environment and then calls the target program). I have the following in my .gdbinit:

set schedule-multiple on
set follow-exec-mode same
set detach-on-fork off
set breakpoint pending on
set follow-fork-mode parent

and a breakpoint that I want to be set at the very start. Then I run the program with r command. When child processes exit, gdb keeps pausing, so I have to switch inferiors and do continue, which is slowing down my debug flow.

Is there a way to tell gdb to not pause on child process exit?

I read the fork section in gdb manual and debugging multiple processes, but did not find a command I am searching for. My understanding is that gdb catches a signal of process exit by default, but I am not sure where to start searching for that.

0

There are 0 best solutions below