From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5171 invoked by alias); 6 Nov 2012 17:30:47 -0000 Received: (qmail 5156 invoked by uid 22791); 6 Nov 2012 17:30:45 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO,TW_VH X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 06 Nov 2012 17:30:36 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id B72282E01E; Tue, 6 Nov 2012 12:30:35 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id LH0Pl7hfS9nr; Tue, 6 Nov 2012 12:30:35 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 835192E01D; Tue, 6 Nov 2012 12:30:35 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 4EC89C54B3; Tue, 6 Nov 2012 09:30:29 -0800 (PST) Date: Tue, 06 Nov 2012 17:30:00 -0000 From: Joel Brobecker To: Luis Machado Cc: gdb-patches@sourceware.org Subject: Re: [PATCH,tests] Run to main before doing any tests in structs3.exp Message-ID: <20121106173029.GC5103@adacore.com> References: <50994431.1040405@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50994431.1040405@codesourcery.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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 X-SW-Source: 2012-11/txt/msg00121.txt.bz2 > On remote targets, we don't always start at the entry point. Thus, > it is safer to get to main and do the tests from that point onwards. Can you elaborate more? Your patch looks reasonable at first sight, but then at the same time now introduces a new requirement that it needs to be run on the target, whereas that was not the case before. The testcase only prints global variables. I don't suppose there is much of a guaranty that you could print global variables without starting the program first, but it's been generally working. So I am curious as to why it isn't working in your case. > 2012-11-06 Luis Machado > > * gdb.base/structs3.exp: Run to main before doing any tests. > > Index: gdb-trunk/gdb/testsuite/gdb.base/structs3.exp > =================================================================== > --- gdb-trunk.orig/gdb/testsuite/gdb.base/structs3.exp 2012-11-02 17:29:00.801049370 -0200 > +++ gdb-trunk/gdb/testsuite/gdb.base/structs3.exp 2012-11-02 17:29:57.401050043 -0200 > @@ -23,6 +23,11 @@ if { [prepare_for_testing structs3.exp " > return -1 > } > > +if ![runto_main] { > + untested "could not run to main" > + return -1 > +} > + > set vhn "\\$\[0-9\]+" > > # Check the real contents. -- Joel