From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17915 invoked by alias); 24 Dec 2012 08:03:52 -0000 Received: (qmail 17904 invoked by uid 22791); 24 Dec 2012 08:03:51 -0000 X-SWARE-Spam-Status: No, hits=-4.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-ee0-f51.google.com (HELO mail-ee0-f51.google.com) (74.125.83.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 24 Dec 2012 08:03:46 +0000 Received: by mail-ee0-f51.google.com with SMTP id d4so3345835eek.10 for ; Mon, 24 Dec 2012 00:03:44 -0800 (PST) MIME-Version: 1.0 Received: by 10.14.174.132 with SMTP id x4mr52942552eel.39.1356336224646; Mon, 24 Dec 2012 00:03:44 -0800 (PST) Received: by 10.14.123.146 with HTTP; Mon, 24 Dec 2012 00:03:44 -0800 (PST) Date: Mon, 24 Dec 2012 08:03:00 -0000 Message-ID: Subject: gdbserver multiprocess debugging From: Xingxing Pan To: gdb Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-12/txt/msg00076.txt.bz2 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 2 #include 3 #include 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