From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4021 invoked by alias); 27 Jun 2008 18:20:34 -0000 Received: (qmail 3995 invoked by uid 22791); 27 Jun 2008 18:20:33 -0000 X-Spam-Check-By: sourceware.org Received: from snape.ecoscentric.com (HELO snape.ecoscentric.com) (212.13.207.199) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 27 Jun 2008 18:19:58 +0000 Received: from localhost (snape.ecoscentric.com [127.0.0.1]) by snape.ecoscentric.com (Postfix) with ESMTP id 6FB75C54117 for ; Fri, 27 Jun 2008 19:19:55 +0100 (BST) Received: from snape.ecoscentric.com ([127.0.0.1]) by localhost (snape.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2zjnzUJ7WsSD; Fri, 27 Jun 2008 19:19:54 +0100 (BST) Message-ID: <48652F49.2070506@eCosCentric.com> Date: Fri, 27 Jun 2008 18:31:00 -0000 From: Jonathan Larmour User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: Avoid potential crashes with --gc-sections and low addresses References: <48650919.707@eCosCentric.com> <4865094E.2000004@eCosCentric.com> <20080627164106.GB4724@caradoc.them.org> In-Reply-To: <20080627164106.GB4724@caradoc.them.org> OpenPGP: id=A5FB74E6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-06/txt/msg00512.txt.bz2 Daniel Jacobowitz wrote: > On Fri, Jun 27, 2008 at 04:37:50PM +0100, Jonathan Larmour wrote: >> --- gdb/dwarf2-frame.c~ 2008-05-04 00:24:17.000000000 +0100 >> +++ gdb/dwarf2-frame.c 2008-06-20 17:06:04.000000000 +0100 >> @@ -1795,7 +1795,8 @@ decode_frame_entry_1 (struct comp_unit * >> >> fde->eh_frame_p = eh_frame_p; >> >> - add_fde (unit, fde); >> + if (fde->initial_location) >> + add_fde (unit, fde); >> } >> >> return end; > > This won't work if there is code actually at zero. Take a look at the > .debug_info reader to see how we handled this case for symbolic debug info. I've had a look, and got lost in a twisty maze of passages. The learning curve for that stuff is probably steeper than I can manage at the moment. If you don't mind, in that case I'll submit it to GNATS so it isn't lost. Jifl -- eCosCentric Limited http://www.eCosCentric.com/ The eCos experts Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571 Registered in England and Wales: Reg No 4422071. ------["Si fractum non sit, noli id reficere"]------ Opinions==mine