Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Simon Marchi <simon.marchi@ericsson.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH v5] Introduce target_is_gdbserver
Date: Wed, 10 Dec 2014 19:29:00 -0000	[thread overview]
Message-ID: <54889CDA.3070300@redhat.com> (raw)
In-Reply-To: <5481FAB2.9070105@ericsson.com>

On 12/05/2014 06:34 PM, Simon Marchi wrote:

> diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
> index a29b661..b420e00 100644
> --- a/gdb/testsuite/lib/gdb.exp
> +++ b/gdb/testsuite/lib/gdb.exp
> @@ -5004,5 +5004,30 @@ proc capture_command_output { command prefix } {
>      return $output_string
>  }
> 
> +# Return 1 if the current remote target is an instance of our GDBserver, 0
> +# otherwise.  Return -1 if there was an error and we can't tell.
> +
> +gdb_caching_proc target_is_gdbserver {
> +    global gdb_prompt
> +
> +    set is_gdbserver -1
> +    set test "Probing for GDBserver"
> +
> +    gdb_test_multiple "monitor help" $test {
> +	-re "The following monitor commands are supported.*Quit GDBserver.*$gdb_prompt $" {
> +	    set is_gdbserver 1
> +	}
> +	-re "$gdb_prompt $" {
> +	    set is_gdbserver 0
> +	}
> +    }
> +
> +    if { $is_gdbserver == -1 } {
> +	verbose -log "Unable to tell whether we are using GDBserver or not."
> +    }
> +
> +    return $is_gdbserver
> +}
> +

I think it'd be nice to have this close to gdb_is_target_remote.
How about moving it just below that one?

Anyway, this is OK.  Please push.

Thanks,
Pedro Alves


  reply	other threads:[~2014-12-10 19:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-23 15:19 [PATCH v4] " Simon Marchi
2014-10-02 17:54 ` Simon Marchi
2014-10-20 17:49   ` Simon Marchi
2014-12-01 13:37     ` Simon Marchi
2014-12-04 16:52 ` Pedro Alves
2014-12-05 18:34   ` [PATCH v5] Introduce target_is_gdbserver (was: v4) Simon Marchi
2014-12-10 19:29     ` Pedro Alves [this message]
2014-12-10 20:16       ` [PATCH v5] Introduce target_is_gdbserver Simon Marchi

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=54889CDA.3070300@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@ericsson.com \
    /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