From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22847 invoked by alias); 13 Feb 2006 15:47:38 -0000 Received: (qmail 22839 invoked by uid 22791); 13 Feb 2006 15:47:37 -0000 X-Spam-Check-By: sourceware.org Received: from w099.z064220152.sjc-ca.dsl.cnc.net (HELO duck.specifix.com) (64.220.152.99) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 13 Feb 2006 15:47:36 +0000 Received: from [::1] (duck.specifix.com [64.220.152.99]) by duck.specifix.com (Postfix) with ESMTP id 6E430FC47; Mon, 13 Feb 2006 07:47:33 -0800 (PST) From: Fred Fish Reply-To: fnf@specifix.com To: Daniel Jacobowitz Subject: Re: [PATCH] Fix problem with scope.exp test, skipping past init0 call Date: Mon, 13 Feb 2006 15:47:00 -0000 User-Agent: KMail/1.9.1 Cc: gdb-patches@sourceware.org References: <200602121510.01657.fnf@specifix.com> <20060213153903.GA26349@nevyn.them.org> In-Reply-To: <20060213153903.GA26349@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200602131047.30428.fnf@specifix.com> 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/msg00276.txt.bz2 On Monday 13 February 2006 10:39, Daniel Jacobowitz wrote: > What platform and compiler version is this? It doesn't fail for me. Fedora Core 4, using the latest development gcc while running the] gdb testsuite. > Well, that's supposed to skip a call to __main(), which GCC generates > on very few platforms... stopping at the opening brace is definitely > a bug in its own right, in the debug info or in the prologue skipper. The problem is that gcc now generates prologues that the prologue skipper isn't prepared to handle. The latest gcc generates prologues like: main: leal 4(%esp), %ecx andl $-16, %esp pushl -4(%ecx) pushl %ebp movl %esp, %ebp pushl %ecx call foo While older gcc's generate a prologue that gdb understands, like: main: pushl %ebp movl %esp, %ebp subl $8, %esp andl $-16, %esp movl $0, %eax addl $15, %eax addl $15, %eax shrl $4, %eax sall $4, %eax subl %eax, %esp call foo So when compiling with the latest gcc, gdb will set a function breakpoint at the same address as main. I was just reviewing the mailing lists to see if anyone else has reported this, or is working on it, before doing any work on i386_analyze_frame_setup(). -Fred