From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31211 invoked by alias); 13 Feb 2006 17:54:20 -0000 Received: (qmail 31203 invoked by uid 22791); 13 Feb 2006 17:54:20 -0000 X-Spam-Check-By: sourceware.org Received: from zproxy.gmail.com (HELO zproxy.gmail.com) (64.233.162.206) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 13 Feb 2006 17:54:18 +0000 Received: by zproxy.gmail.com with SMTP id l1so1091821nzf for ; Mon, 13 Feb 2006 09:54:16 -0800 (PST) Received: by 10.36.220.37 with SMTP id s37mr3425065nzg; Mon, 13 Feb 2006 09:54:16 -0800 (PST) Received: by 10.37.2.63 with HTTP; Mon, 13 Feb 2006 09:54:16 -0800 (PST) Message-ID: <8f2776cb0602130954h5fb8a8d4w1c302f80e06cf1ab@mail.gmail.com> Date: Mon, 13 Feb 2006 17:54:00 -0000 From: Jim Blandy To: Mark Kettenis Subject: Re: [PATCH] Fix problem with scope.exp test, skipping past init0 call Cc: fnf@specifix.com, drow@false.org, gdb-patches@sourceware.org In-Reply-To: <8f2776cb0602130947s56ed2f8bs3b66049e8e4c89a3@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <200602121510.01657.fnf@specifix.com> <200602131047.30428.fnf@specifix.com> <200602131604.k1DG4n9Y025733@elgar.sibelius.xs4all.nl> <200602131118.49981.fnf@specifix.com> <200602131648.k1DGmUqx009322@elgar.sibelius.xs4all.nl> <8f2776cb0602130947s56ed2f8bs3b66049e8e4c89a3@mail.gmail.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00284.txt.bz2 On 2/13/06, Jim Blandy wrote: > Actually, having seen other's responses here, I'm inclined to say that > the proper fix is to simply drop the code in scope.exp for getting > from the opening brace to the first line. Setting a breakpoint on > main simply shouldn't leave you on the opening brace, and that test > suite logic has always been papering over a bug. > > If prologues contain calls to __main, then the prologue analyzers > should skip them. My penance; scope.exp still has no failures on x86_64-unknown-linux-gnu. gdb/testsuite/ChangeLog: 2006-02-13 Jim Blandy * gdb.base/scope.exp (test_at_main): Remove logic to handle the case where it takes two "next" commands to skip past the init call. Index: gdb/testsuite/gdb.base/scope.exp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/testsuite/gdb.base/scope.exp,v retrieving revision 1.10 diff -c -p -r1.10 scope.exp *** gdb/testsuite/gdb.base/scope.exp 13 Feb 2006 10:41:26 -0000 1.10 --- gdb/testsuite/gdb.base/scope.exp 13 Feb 2006 17:52:39 -0000 *************** proc test_at_main {} { *** 61,82 **** global subdir global hp_cc_compiler ! # skip past init. There may be a call to __main at the start of ! # main, so the first next may only get us to the init0 call. ! gdb_test_multiple "next" "next over init0() in main" { ! -re "$decimal.*foo \\(\\).*$gdb_prompt $" { ! pass "next over init0() in main" ! } ! -re "$decimal.*init0 \\(\\).*$gdb_prompt $" { ! send_gdb "next\n" ! exp_continue ! } ! -re ".*$gdb_prompt $" { ! fail "next over init0() in main" ! gdb_suppress_tests ! } ! } ! # Print scope0.c::filelocal, which is 1 --- 61,72 ---- global subdir global hp_cc_compiler ! # skip past init0. ! # This used to do an extra "next" if the first one didn't get us ! # over the call to init0, to handle calls to __main in the ! # prologue, etc. But if a breakpoint at main doesn't leave us on ! # the first line of real code in the function, that's a GDB bug. ! gdb_test "next" "$decimal.*foo \\(\\);" "next over init0() in main" # Print scope0.c::filelocal, which is 1