From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6886 invoked by alias); 5 Feb 2003 08:28:07 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 6090 invoked from network); 5 Feb 2003 08:24:17 -0000 Received: from unknown (HELO molenda.com) (192.220.74.81) by 172.16.49.205 with SMTP; 5 Feb 2003 08:24:17 -0000 Received: (qmail 76366 invoked by uid 19025); 5 Feb 2003 08:24:16 -0000 Date: Wed, 05 Feb 2003 08:28:00 -0000 From: Jason Molenda To: David Carlton , Andrew Cagney , gdb-patches@sources.redhat.com, jjohnstn@redhat.com Subject: Re: PATCH RFA: Fix MI stack frame output for synthetic frames Message-ID: <20030205002416.A75501@molenda.com> References: <20021108142248.A65720@molenda.com> <3DCC3CEE.5040902@redhat.com> <20021109004723.A20334@molenda.com> <3E3CB218.1020706@redhat.com> <20030203102748.A75701@molenda.com> <20030203183441.GA27429@nevyn.them.org> <20030204000936.A19984@molenda.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030204000936.A19984@molenda.com>; from jason-swarelist@molenda.com on Tue, Feb 04, 2003 at 12:09:36AM -0800 X-SW-Source: 2003-02/txt/msg00180.txt.bz2 On Tue, Feb 04, 2003 at 12:09:36AM -0800, Jason Molenda wrote: > On Mon, Feb 03, 2003 at 01:34:41PM -0500, Daniel Jacobowitz wrote: > > On Mon, Feb 03, 2003 at 10:27:48AM -0800, Jason Molenda wrote: > > > On Mon, Feb 03, 2003 at 10:15:20AM -0800, David Carlton wrote: > > > > > > > > > > > On i686-pc-linux-gnu/GCC3.1/DWARF2, I get the following: > > > > > > > > > > > PASS: gdb.mi/mi-syn-frame.exp: 407-stack-list-frames > > > > FAIL: gdb.mi/mi-syn-frame.exp: 408-exec-continue > > > The exec-continue failure seems to be a bad regular expression - it's > > expecting "*stopped[\r\n]+", not any of the things which follow > > *stopped. It's not really a compiler bug and not really a debugger bug. For this function - > void > subroutine (int in) > { > while (in < 100) > in++; > } gcc 3.2 is outputting debug info like this - .stabs "subroutine:F(9,7)",36,0,0,subroutine .stabs "in:p(0,1)",160,0,0,8 .globl subroutine .type subroutine,@function subroutine: .stabn 68,0,48,.LM18-subroutine .LM18: pushl %ebp movl %esp, %ebp nop .stabn 68,0,49,.LM19-subroutine ; line #49 is the while (...) .LM19: .L6: cmpl $99, 8(%ebp) jle .L8 jmp .L5 .L8: The compiler is correct to put the line stab there (it does the equivalent for DWARF2), and gdb is correct in putting the breakpoint on the cmpl insn, but the unfortunate end result of these two is that a user putting a breakpoint on the subroutine will have a breakpoint that's tripped each iteration of the loop. Given all that, I'll check in a change to mi-syn-frames.c so this function reads void subroutine (int in) { int count = in; while (count < 100) count++; } The assignment gives us two assembly instructions after the end of the prologue for a breakpoint that won't be hit at each iteration. It's stupid, I know. I'll make that change and run it through the testsuites tomorrow night. If I get approval for the change before then (hint hint :) I'll check it in, else I'll post a patch. J