From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27564 invoked by alias); 10 May 2006 22:22:06 -0000 Received: (qmail 27535 invoked by uid 22791); 10 May 2006 22:22:05 -0000 X-Spam-Check-By: sourceware.org Received: from intranet.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.6) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 10 May 2006 22:21:51 +0000 Received: (qmail 24763 invoked from network); 10 May 2006 22:21:49 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 10 May 2006 22:21:49 -0000 To: fnf@specifix.com Cc: gdb-patches@sourceware.org Subject: Re: [RFA] Patch to skip_prologue_using_sal() for oneline stub functions References: <200605101113.50267.fnf@specifix.com> From: Jim Blandy Date: Wed, 10 May 2006 22:22:00 -0000 In-Reply-To: <200605101113.50267.fnf@specifix.com> (Fred Fish's message of "Wed, 10 May 2006 11:13:50 -0400") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-05/txt/msg00205.txt.bz2 Fred Fish writes: > If a function optimizes down to a single return instruction, there is > no prologue, and skip_prologue_using_sal will return a PC that is > probably the first instruction of the next following function. In > this case, we want to return the start_pc, so that the caller will > know that it needs to run the architecture specific prologue scanner > to figure out what is going on. > > This fixes the following failures for MIPS: > > FAIL: gdb.base/break.exp: breakpoint small function, optimized file > FAIL: gdb.base/break.exp: run until function breakpoint, optimized file > FAIL: gdb.base/break.exp: run until breakpoint set at small function, optimized file > > -Fred > > ============================================================================ > > 2006-05-10 Fred Fish > > * symtab.c (skip_prologue_using_sal): Handle single line functions > like "foo(){}", which may optimize down to a single return inst. This looks reasonable; have you tested on IA-32, too?