From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30504 invoked by alias); 6 Feb 2015 08:45:57 -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 30486 invoked by uid 89); 6 Feb 2015 08:45:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f47.google.com Received: from mail-pa0-f47.google.com (HELO mail-pa0-f47.google.com) (209.85.220.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 06 Feb 2015 08:45:56 +0000 Received: by mail-pa0-f47.google.com with SMTP id lj1so15911605pab.6 for ; Fri, 06 Feb 2015 00:45:54 -0800 (PST) X-Received: by 10.66.255.33 with SMTP id an1mr4078785pad.42.1423212354359; Fri, 06 Feb 2015 00:45:54 -0800 (PST) Received: from seba.sebabeach.org.gmail.com (173-13-178-53-sfba.hfc.comcastbusiness.net. [173.13.178.53]) by mx.google.com with ESMTPSA id b1sm7343258pdi.10.2015.02.06.00.45.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Feb 2015 00:45:53 -0800 (PST) From: Doug Evans To: Pedro Alves Cc: Sergio Durigan Junior , GDB Patches , Mark Wielaard Subject: Re: [PATCH] Implement ${board}_{exec,spawn} for native-extended-gdbserver References: <1423005658-31405-1-git-send-email-sergiodj@redhat.com> <54D21931.8040806@redhat.com> Date: Fri, 06 Feb 2015 08:45:00 -0000 In-Reply-To: <54D21931.8040806@redhat.com> (Pedro Alves's message of "Wed, 04 Feb 2015 14:05:53 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00150.txt.bz2 Pedro Alves 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.