From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10277 invoked by alias); 2 Mar 2006 06:09:18 -0000 Received: (qmail 10269 invoked by uid 22791); 2 Mar 2006 06:09:16 -0000 X-Spam-Check-By: sourceware.org Received: from xproxy.gmail.com (HELO xproxy.gmail.com) (66.249.82.205) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 02 Mar 2006 06:09:15 +0000 Received: by xproxy.gmail.com with SMTP id h29so218577wxd for ; Wed, 01 Mar 2006 22:09:13 -0800 (PST) Received: by 10.70.65.5 with SMTP id n5mr1423138wxa; Wed, 01 Mar 2006 22:09:12 -0800 (PST) Received: by 10.70.125.17 with HTTP; Wed, 1 Mar 2006 22:09:12 -0800 (PST) Message-ID: <8f2776cb0603012209y5bab7cbai73eaf637af291f@mail.gmail.com> Date: Thu, 02 Mar 2006 06:09:00 -0000 From: "Jim Blandy" To: "Michael Snyder" Subject: Re: [PATCH] Fix problem with scope.exp test, skipping past init0 call Cc: "Mark Kettenis" , fnf@specifix.com, drow@false.org, gdb-patches@sourceware.org In-Reply-To: <440635D0.1050704@redhat.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> <440635D0.1050704@redhat.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-03/txt/msg00045.txt.bz2 On 3/1/06, Michael Snyder wrote: > 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. > > Are you sure? If skipping __main involves overhead, > do you want to incur that overhead every time we want > to skip a prologue? Do you mean overhead in the analysis of the prologue to find its end, or overhead in allowing the program to continue to the end of a prologue that contains a call to __main? If the first, I don't think it's a big deal. If we don't see a jsr, we won't incur any overhead. If the second, the skip_prologue gdbarch method gets used in the following situations: - When we're stepping into a function. Here, we use the step-resume breakpoint to step when we get to the end of the prologue, so there's no overhead that I see to skipping over __main. We're not single-stepping over the call. - When we're setting a breakpoint at a function start. Obviously, no special run-time overhead here; you can set the breakpoint anywhere you like. - When we're trying to decide if a given address is in a prologue.=20 Again, I don't see any impact. I think this is a correctness issue anyway, not a performance issue.=20 If a prologue contains a call to __main, it's our job to make sure that works efficiently; we shouldn't change the behavior of skip_prologue.