From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 67984 invoked by alias); 7 Apr 2015 17:35:39 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 67975 invoked by uid 89); 7 Apr 2015 17:35:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 07 Apr 2015 17:35:37 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 792A98E744; Tue, 7 Apr 2015 17:35:36 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t37HZYNC032744; Tue, 7 Apr 2015 13:35:35 -0400 Message-ID: <55241566.2050606@redhat.com> Date: Tue, 07 Apr 2015 17:35:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Don Breazeal , gdb-patches@sourceware.org Subject: Re: [PATCH v6 3/6] Extended-remote Linux follow fork References: <1424997977-13316-1-git-send-email-donb@codesourcery.com> <1426625788-4469-1-git-send-email-donb@codesourcery.com> <1426625788-4469-4-git-send-email-donb@codesourcery.com> <551155B8.2080707@redhat.com> In-Reply-To: <551155B8.2080707@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-04/txt/msg00239.txt.bz2 On 03/24/2015 12:16 PM, Pedro Alves wrote: >> > diff --git a/gdb/testsuite/gdb.base/multi-forks.exp b/gdb/testsuite/gdb.base/multi-forks.exp >> > index e95cb4b..2a71e63 100644 >> > --- a/gdb/testsuite/gdb.base/multi-forks.exp >> > +++ b/gdb/testsuite/gdb.base/multi-forks.exp >> > @@ -62,6 +62,23 @@ proc continue_to_exit_bp_loc {} { >> > set seen_break 0 >> > set seen_prompt 0 >> > set seen_timeout 0 >> > + >> > + # If we are running with a native gdbserver, the output ($decimal done) >> > + # will come via the spawn_id of gdbserver, not the spawn_id of gdb (the >> > + # default). So we grab the spawn_id of gdbserver, if it exists, and >> > + # add it to the gdb_expect statement below using "-i", allowing us to >> > + # apply the expect statement to the output of both spawn_ids. >> > + # >> > + # If we are running with a truly remote gdbserver (gdb,noinferiorio), >> > + # the output of the program will be inaccessible. In this case we do >> > + # not check for the ($decimal done) output, but just look for the gdb >> > + # prompt. >> > + global server_spawn_id >> > + set current_spawn_id [board_info host fileid] >> > + if {![info exists server_spawn_id]} { >> > + set server_spawn_id "" >> > + } >> > + >> > while { ($seen_done < 16 || ! $seen_prompt) && ! $seen_timeout } { >> > # We don't know what order the interesting things will arrive in. >> > # Using a pattern of the form 'x|y|z' instead of -re x ... -re y >> > @@ -70,7 +87,8 @@ proc continue_to_exit_bp_loc {} { >> > # first in the script that occurs anywhere in the input, so that >> > # we don't skip anything. >> > gdb_expect { >> > - -re "($decimal done)|(Breakpoint)|($gdb_prompt)" { >> > + -i "$current_spawn_id $server_spawn_id" \ > > Note this is currently working by chance. We need this one in: > > https://sourceware.org/ml/gdb-patches/2015-02/msg00659.html > > in order to safely be able to do '-i "$server_spawn_id"'. FYI, I now pushed that series in. Please update this to use $inferior_spawn_id instead. Thanks, Pedro Alves