0

While using GDB MI instruction I found that in case a program forks to create child process it starts debugging the last child only. So if I try to debug break in parent it does not breaks at that point:

I found this valuable reference in stackoverflow.com:

How do I debug the child process after fork() in gdb?

My question is that how I can set the follow-fork-mode mode and via which GBD MI API?

http://src.gnu-darwin.org/ports/editors/setedit/work/setedit/libmigdb/doc/reference.html

Community
  • 1
  • 1
Programmer
  • 7,863
  • 20
  • 72
  • 148

1 Answers1

0

It would be something like 123-gdb-set follow-fork parent.

But you can also look into something like: gdb-set detach-on-fork off

dbrank0
  • 8,606
  • 2
  • 39
  • 55