From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20763 invoked by alias); 2 May 2016 18:20:01 -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 20718 invoked by uid 89); 2 May 2016 18:20:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=c_global, launches, connects, H*r:112 X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 02 May 2016 18:19:49 +0000 Received: by simark.ca (Postfix, from userid 112) id B27DD1E864; Mon, 2 May 2016 14:19:47 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 8CD2F1E822; Mon, 2 May 2016 14:19:46 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 02 May 2016 18:20:00 -0000 From: Simon Marchi To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 4/4] Fix solib-display.exp remote check In-Reply-To: <570BECA8.3050801@redhat.com> References: <1459912543-15328-1-git-send-email-simon.marchi@polymtl.ca> <1459912543-15328-4-git-send-email-simon.marchi@polymtl.ca> <570BECA8.3050801@redhat.com> Message-ID: <581c3da12dacfd50cfbbe4dbd31a981a@simark.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.1.3 X-SW-Source: 2016-05/txt/msg00020.txt.bz2 On 2016-04-11 14:27, Pedro Alves wrote: > On 04/06/2016 04:15 AM, Simon Marchi wrote: > >> The test uses "run" > > Does it have to? Can't we use "kill" followed by runto_main > again, instead of gdb_start_cmd ? I tried to change the test so that it uses kill, followed with gdb_run_cmd combined with a breakpoint at main (runto_main wouldn't work, since it doesn't expect the variable display before the prompt). The problem with native-gdbserver (and probabley any stub target) is that when you run again, it launches a new gdbserver and connects to it. Right after connecting, gdb tries to display the variables, but since we're stopped before the libs are loaded, we get: warning: Unable to display "a_global": No symbol "a_global" in current context. warning: Unable to display "b_global": No symbol "b_global" in current context. warning: Unable to display "c_global": No symbol "c_global" in current context. and gdb trashes the displays. The rest of the test fails because it expects the displays to be there (I think that's the point of that test). So for now at least, I'd keep the test like this, disabled for stub targets. > Why did you move the check to within the loop? I thought one > could check [target_info exists use_gdb_stub] at the top? > I'd find the patch OK with that. It'd be nicer to avoid > gdb_start_cmd in the first place, but use_gdb_stub is still > an improvement. I have sent a mini-series as an update, including your use_gdb_stub procedure suggestion. https://sourceware.org/ml/gdb-patches/2016-05/msg00018.html Thanks, Simon