From patchwork Fri Jul 15 09:06:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 13808 Received: (qmail 127887 invoked by alias); 15 Jul 2016 09:06:22 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 127877 invoked by uid 89); 15 Jul 2016 09:06:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy= 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, 15 Jul 2016 09:06:11 +0000 Received: by mail-pa0-f47.google.com with SMTP id dx3so37850715pab.2 for ; Fri, 15 Jul 2016 02:06:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=8vIbuzWDLfcLx8Nc3W1eKGIQq/G2hjof8ZxiAAawvys=; b=HaQC9cPjbHXJYQXJiqcdez2hDJwG3Tu13bOmnDnsTwh6wON06NhHSIPFin0VfQ5Bpp WJtjdGSISZL/YoUdM8aojL476zpB11KZIVmRwrU1lIep/KXJiFg5wOGAXXH+1tJXUVHC dbOHfWgxXbIKO0hlgoJ8x5/xDKUgO25OwEmTB3JpCNAJ71IQ9xO7hcXqD3K8Kpacfhzd cEoQNrXRoDBl7I8BOq8nilh0fnebLAH1XZtGHP9FO3DdZY2df2deHKbBJ8Z7kV7PO//R nIM13+/CF0WiNkfXTnMPWMfkFdlTnVzIvg1Y1KjJoTI81n4oKN2OiZfYWjtqN/9oa8mq vAGQ== X-Gm-Message-State: ALyK8tLtztfcOZvGilORTSnAhQEo/iKfSh1OqWRpRikZhOUKHrBQdWVhcHsQx6x90HEq1g== X-Received: by 10.66.47.133 with SMTP id d5mr29660511pan.48.1468573569895; Fri, 15 Jul 2016 02:06:09 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id v126sm1182285pfb.60.2016.07.15.02.06.07 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 15 Jul 2016 02:06:09 -0700 (PDT) From: Yao Qi To: Yao Qi Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Fix fail in gdb.server/solib-list.exp References: <1468511574-7802-1-git-send-email-yao.qi@linaro.org> Date: Fri, 15 Jul 2016 10:06:03 +0100 In-Reply-To: <1468511574-7802-1-git-send-email-yao.qi@linaro.org> (Yao Qi's message of "Thu, 14 Jul 2016 16:52:54 +0100") Message-ID: <86k2gn6zk4.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes Yao Qi writes: > + # Unset last_loaded_file because we want GDBserver spawn > + # ${interp_system} not ${last_loaded_file}. > + global last_loaded_file > + if { [info exists last_loaded_file] } { > + unset last_loaded_file > + } Keith told me that I can use "-nocomplain" to avoid "info exists". Patch is updated below, diff --git a/gdb/testsuite/gdb.server/solib-list.exp b/gdb/testsuite/gdb.server/solib-list.exp index 5347f18..57647e1 100644 --- a/gdb/testsuite/gdb.server/solib-list.exp +++ b/gdb/testsuite/gdb.server/solib-list.exp @@ -71,6 +71,11 @@ foreach nonstop { 0 1 } { with_test_prefix "non-stop $nonstop" { # displaced-stepping buffer at unmapped that time address _start. gdb_test "set displaced-stepping off" + # Unset last_loaded_file because we want GDBserver spawn + # ${interp_system} not ${last_loaded_file}. + global last_loaded_file + unset -nocomplain last_loaded_file + # Note we pass ${interp_system}, the program gdbserver spawns, as # argument here, instead of using gdb_load, because we don't want # to download the interpreter to the target (it's already there)