From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8701 invoked by alias); 16 Apr 2008 19:34:17 -0000 Received: (qmail 8688 invoked by uid 22791); 16 Apr 2008 19:34:16 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 16 Apr 2008 19:33:49 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 861FC982C4; Wed, 16 Apr 2008 19:33:47 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 6773C98278; Wed, 16 Apr 2008 19:33:47 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1JmDO6-0006b5-Od; Wed, 16 Apr 2008 15:33:46 -0400 Date: Wed, 16 Apr 2008 22:25:00 -0000 From: Daniel Jacobowitz To: Doug Evans Cc: gdb@sourceware.org, ppluzhnikov@google.com Subject: Re: determining whether page 0 (or low addresses in general) is executable Message-ID: <20080416193346.GA25227@caradoc.them.org> Mail-Followup-To: Doug Evans , gdb@sourceware.org, ppluzhnikov@google.com References: <20080416192047.984F91C75AD@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080416192047.984F91C75AD@localhost> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-04/txt/msg00159.txt.bz2 On Wed, Apr 16, 2008 at 12:20:47PM -0700, Doug Evans wrote: > Hi. We're trying to come up with a workaround for an apparent gcc/linker issue > where debug info can be left behind that messes up backtraces. > The erroneous debug info shouldn't be generated, but gdb could do a better > job when faced with it. Not much better; I would suggest effort be spent on the linker/compiler limitations, instead. For instance moving debug info into comdat sections. I thought GNU ld only had this problem for .debug_info and already edited out discarded FDEs from .debug_frame / .eh_frame. Are you using GNU ld or gold? Maybe the linker only edits .eh_frame. > *************** dwarf2_frame_find_fde (CORE_ADDR *pc) > @@ -1585,6 +1608,13 @@ > > while (fde) > { > + if (fde->initial_location + offset == 0 > + && !is_zero_page_executable ()) > + { > + /* Ignore this FDE -- linker bug. */ > + fde = fde->next; > + continue; > + } > See has_section_at_zero in dwarf2read.c. It's just the same hack. -- Daniel Jacobowitz CodeSourcery