public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Don Breazeal <donb@codesourcery.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH v6 3/6] Extended-remote Linux follow fork
Date: Tue, 07 Apr 2015 17:35:00 -0000	[thread overview]
Message-ID: <55241566.2050606@redhat.com> (raw)
In-Reply-To: <551155B8.2080707@redhat.com>

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

  reply	other threads:[~2015-04-07 17:35 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201501252151.t0PLo3jE018308@mx0b-0013c101.pphosted.com>
2015-01-26  4:43 ` [PATCH v4 0/7] Remote fork events Breazeal, Don
2015-02-06 20:02   ` Breazeal, Don
2015-02-27  0:46   ` [PATCH v5 0/6] " Don Breazeal
2015-02-27  0:46     ` [PATCH v5 01/06] Identify remote fork event support Don Breazeal
2015-02-27  0:47     ` [PATCH v5 02/06] Clone remote breakpoints Don Breazeal
2015-02-27  0:47     ` [PATCH v5 05/06] Remote follow vfork Don Breazeal
2015-02-27  0:47     ` [PATCH v5 03/06] Extended-remote Linux follow fork Don Breazeal
2015-02-27  0:47     ` [PATCH v5 04/06] Arch-specific remote " Don Breazeal
2015-02-27  7:37       ` Eli Zaretskii
2015-02-27  0:48     ` [PATCH v5 06/06] Remote fork catch Don Breazeal
2015-03-02 18:29     ` [PATCH v5 0/6] Remote fork events Pedro Alves
2015-03-02 20:18     ` [PATCH] Tighten gdb.base/disp-step-syscall.exp (was: Re: [PATCH v5 0/6] Remote fork events) Pedro Alves
2015-03-03  6:20       ` [PATCH] Tighten gdb.base/disp-step-syscall.exp Breazeal, Don
2015-03-03 15:01         ` Pedro Alves
2015-03-17 21:18       ` Breazeal, Don
2015-03-18 19:37         ` Pedro Alves
2015-03-17 20:56     ` [PATCH v6 0/6] Remote fork events Don Breazeal
2015-03-17 20:56       ` [PATCH v6 1/6] Identify remote fork event support Don Breazeal
2015-03-24 10:57         ` Pedro Alves
2015-03-26 19:00           ` [PATCH v5 01/06] " Don Breazeal
2015-03-27 11:14             ` Pedro Alves
2015-03-17 20:57       ` [PATCH v6 2/6] Clone remote breakpoints Don Breazeal
2015-03-17 20:57       ` [PATCH v6 4/6] Arch-specific remote follow fork Don Breazeal
2015-03-17 20:57       ` [PATCH v6 3/6] Extended-remote Linux " Don Breazeal
2015-03-24 12:17         ` Pedro Alves
2015-04-07 17:35           ` Pedro Alves [this message]
2015-03-17 20:58       ` [PATCH v6 6/6] Remote fork catch Don Breazeal
2015-03-24 12:47         ` Pedro Alves
2015-03-17 20:58       ` [PATCH v6 5/6] Remote follow vfork Don Breazeal
2015-03-24 12:28         ` Pedro Alves

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=55241566.2050606@redhat.com \
    --to=palves@redhat.com \
    --cc=donb@codesourcery.com \
    --cc=gdb-patches@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).