From: Xingxing Pan <forandom@gmail.com>
To: gdb <gdb@sourceware.org>
Subject: gdbserver multiprocess debugging
Date: Mon, 24 Dec 2012 08:03:00 -0000 [thread overview]
Message-ID: <CANB_Exkc_=ey1KwJkWL11j3y6-piO=13xp0iPW_1LR4o9SPnXg@mail.gmail.com> (raw)
Hi all,
I'm using gdbserver in gdb 7.5 to debug a program which calls fork(),
but gdbserver cannot stop the child.
1 #include <unistd.h>
2 #include <stdio.h>
3 #include <stdlib.h>
4
5 void main()
6 {
7 pid_t pid;
8 if((pid = fork()) == 0) {
9 printf("child\n");
10 exit(0);
11 }
12 printf("parent\n");
13 while(1);
14 }
gdb>break 9
gdb>set follow-fork-mode child
gdb>continue
I'm using gcc 4.6.3 on x86_64 ubuntu 12.04.
Did I miss anything?
Thanks,
Xingxing
next reply other threads:[~2012-12-24 8:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-24 8:03 Xingxing Pan [this message]
2012-12-24 10:18 ` Yao Qi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CANB_Exkc_=ey1KwJkWL11j3y6-piO=13xp0iPW_1LR4o9SPnXg@mail.gmail.com' \
--to=forandom@gmail.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox