public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Doug Evans <xdje42@gmail.com>
To: Pedro Alves <palves@redhat.com>
Cc: Sergio Durigan Junior <sergiodj@redhat.com>,
	 GDB Patches <gdb-patches@sourceware.org>,
	 Mark Wielaard <mark@klomp.org>
Subject: Re: [PATCH] Implement ${board}_{exec,spawn} for native-extended-gdbserver
Date: Fri, 06 Feb 2015 08:45:00 -0000	[thread overview]
Message-ID: <m3mw4rjung.fsf@sspiff.org> (raw)
In-Reply-To: <54D21931.8040806@redhat.com> (Pedro Alves's message of "Wed, 04	Feb 2015 14:05:53 +0100")

Pedro Alves <palves@redhat.com> writes:
> On 02/04/2015 12:20 AM, Sergio Durigan Junior wrote:
>
>> diff --git a/gdb/testsuite/boards/native-extended-gdbserver.exp b/gdb/testsuite/boards/native-extended-gdbserver.exp
>> index 57503db..0059c4e 100644
>> --- a/gdb/testsuite/boards/native-extended-gdbserver.exp
>> +++ b/gdb/testsuite/boards/native-extended-gdbserver.exp
>> @@ -23,12 +23,6 @@
>>  load_generic_config "extended-gdbserver"
>>  load_board_description "gdbserver-base"
>>  
>> -# By default, dejagnu makes the board remote unless the board name
>> -# matches localhost.  Force it to be NOT remote.
>> -global board
>> -global board_info
>> -set board_info($board,isremote) 0
>
> I don't think we can/should remove this.  That'll make
> "is_remote" checks all over the testsuite return true,
> and thus skip tests that weren't skipped before.  E.g.,
> solib-display.exp.
>
> I think we need to instead do here what ${board}_spawn
> is already doing.  That is, remove any target variant
> specifications from $board, like:
>
>  --- a/gdb/testsuite/boards/native-extended-gdbserver.exp
>  +++ b/gdb/testsuite/boards/native-extended-gdbserver.exp
>  @@ -27,7 +27,9 @@ load_board_description "gdbserver-base"
>   # matches localhost.  Force it to be NOT remote.
>   global board
>   global board_info
>  -set board_info($board,isremote) 0
>  +# Remove any target variant specifications from the name.
>  +set baseboard [lindex [split $board "/"] 0]
>  +set board_info($baseboard,isremote) 0
>
> I'm testing that.

Eewwww....

[not your patch, just the fact that $board ends up with entire string,
including, e.g., /-m32]

We should document this somewhere, as I can imagine it being
all too easy to continue to just use $board without realizing this.
A little grepping makes me wonder.
E.g., all the procs with ${board} as a prefix.
bash$ grep -F '${board}' */*.exp
proc ${board}_file { dest op args } {
...

and sure enough, those procs get "/-m32" in the name too.
I added
verbose -log "[info procs *${board}*]" to gdbserver-base.exp
and got
native-gdbserver/-m32_file native-gdbserver/-m32_download native-gdbserver/-m32_upload

Yikes.

btw, The name "baseboard" is a bit confusing because I immediately
think of /usr/share/dejagnu/baseboards, which is a different thing.

      parent reply	other threads:[~2015-02-06  8:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-03 23:21 Sergio Durigan Junior
2015-02-04 13:06 ` Pedro Alves
2015-02-04 13:59   ` Pedro Alves
2015-02-06  8:45   ` Doug Evans [this message]

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=m3mw4rjung.fsf@sspiff.org \
    --to=xdje42@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=mark@klomp.org \
    --cc=palves@redhat.com \
    --cc=sergiodj@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).