سؤال

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

هل كانت مفيدة؟

المحلول

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top