From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7458 invoked by alias); 15 Dec 2002 16:18:50 -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 7446 invoked from network); 15 Dec 2002 16:18:50 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 15 Dec 2002 16:18:50 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18NdLk-00025p-00; Sun, 15 Dec 2002 12:18:48 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18NbUC-0000oR-00; Sun, 15 Dec 2002 11:19:24 -0500 Date: Sun, 15 Dec 2002 11:03:00 -0000 From: Daniel Jacobowitz To: Michal Ludvig Cc: GDB Patches Subject: Re: [RFA] Artifical dwarf2 debug info Message-ID: <20021215161924.GA2874@nevyn.them.org> Mail-Followup-To: Michal Ludvig , GDB Patches References: <3DFBD14C.7090501@suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3DFBD14C.7090501@suse.cz> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-12/txt/msg00456.txt.bz2 On Sun, Dec 15, 2002 at 01:48:12AM +0100, Michal Ludvig wrote: > Hi all, > this long patch provides a fix for a very annoying fact, that GDB on > x86-64 can't do backtraces from hand-optimized assembler functions (that > applies for example to glibc's memset, str*, etc as well as to syscall > wrappers). Workaround, really - just for some particular functions... > My approach to fix this behaviour is based on the fortunate fact, that > most of those affected glibc's functions don't touch the stack at all, > so creating an artifical FDE for them is easy. Lucky. We can use this to solve a similar problem on i386 but that will require an actual FDE. > Advantages of this approach are simplicity and cleanliness. There is no > need to "manually" fill in values in CFI's context structure - just > provide a valid, simple FDE and everything else will be done > automagically. This new FDE is of course joined to all other FDEs read > from the file before and is automatically used when needed again. > > The patch is transparent to architectures that are not prepared to have > advantage of it and shouldn't hurt anything. Great. One big problem: gdbarch.h and gdbarch.c are generated files. Add this to gdbarch.sh instead, and regenerate them. Also it needs documentation, as Eli said. It would be nice if there were routines in dwarf2cfi.[ch] for creating FDEs instead of having hex in the tdep file but that doesn't really bother me. We can do that later when I need real FDEs. > OK to commit to branch and mainline? I do not believe this is appropriate for the branch, at least until it's sat on mainline without causing problems for some time. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer