From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22171 invoked by alias); 16 Sep 2002 17:12:13 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 22163 invoked from network); 16 Sep 2002 17:12:12 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 16 Sep 2002 17:12:12 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 17r0Ls-0002HO-00; Mon, 16 Sep 2002 13:12:05 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17qzPb-00065r-00; Mon, 16 Sep 2002 13:11:51 -0400 Date: Mon, 16 Sep 2002 10:12:00 -0000 From: Daniel Jacobowitz To: David Carlton Cc: Fernando Nasser , Michael Elizabeth Chastain , gdb@sources.redhat.com, Andrew Cagney Subject: Re: Pinging Michael C Message-ID: <20020916171150.GA23271@nevyn.them.org> Mail-Followup-To: David Carlton , Fernando Nasser , Michael Elizabeth Chastain , gdb@sources.redhat.com, Andrew Cagney References: <20020914045436.GA22119@nevyn.them.org> <3D85F0F3.5060108@redhat.com> <20020916150921.GA9184@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2002-09/txt/msg00206.txt.bz2 On Mon, Sep 16, 2002 at 10:03:16AM -0700, David Carlton wrote: > On Mon, 16 Sep 2002 11:09:21 -0400, Daniel Jacobowitz said: > > On Mon, Sep 16, 2002 at 10:55:47AM -0400, Fernando Nasser wrote: > >> Daniel Jacobowitz wrote: > > >>> http://sources.redhat.com/ml/gdb-patches/2002-08/msg00695.html > > >> I wonder if next will relly be more reliable. Anyway, we can try > >> -- the test is not about breakpoints. > > > I hadn't actually looked at this one. David, there's an easier way > > - if you look in lib/gdb.exp, gdb_get_line_number. Is that closer > > to what you want? It should be more reliable than 'next'ing. > > Honestly, I don't know if either of them is reliable, as is written. > The situation is that m-static.cc constructs a bunch of objects that > it doesn't do anything with; m-static.exp tries to stop after each > object is constructed, and then examine what the object looks like. > > And it seems to me that, whether you use next or breakpoints (and > whether you do the latter with hard-coded numbers (blech), relative > offsets, or with gdb_get_line_number), you're going to run into > problems in that GDB might not be willing to stop at every line, and > that whether or not it is willing might depend on the specific > compiler, compiler options, etc. that are being used. > > Personally, I don't see any reason why the test shouldn't just > construct all the objects before inspecting any of them with GDB. So > what makes sense to me would be to put a breakpoint on the return line > (using gdb_get_line_number, presumably), run until that, and only then > inspect all the objects that have been constructed. I like this. Would you mind doing it that way? It's much less error-prone. > So would it be okay if I changed the test with all the next's to > construct all the objects before examining any of them, updated the > comments on the one test to reflect the fact that the bug has been > fixed, and then check them in? Well, I think Fernando has approved the testsuite-side and I'm fine with the C++ of the tests. I'd say yes. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer