From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12219 invoked by alias); 9 Nov 2004 02:27:26 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 11200 invoked from network); 9 Nov 2004 02:26:59 -0000 Received: from unknown (HELO pippin.tausq.org) (64.81.244.94) by sourceware.org with SMTP; 9 Nov 2004 02:26:59 -0000 Received: by pippin.tausq.org (Postfix, from userid 1000) id 4D2D8CECD7; Mon, 8 Nov 2004 18:26:59 -0800 (PST) Date: Tue, 09 Nov 2004 02:43:00 -0000 From: Randolph Chung To: gdb@sources.redhat.com Cc: kettenis@gnu.org Subject: Re: [RFC] Is skip_prologue_using_sal actually usable? Message-ID: <20041109022658.GO15714@tausq.org> Reply-To: Randolph Chung Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200411071355.iA7DtfTE002934@elgar.sibelius.xs4all.nl> X-GPG: for GPG key, see http://www.tausq.org/gpg.txt User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-11/txt/msg00074.txt.bz2 > It defenitely has bugs; if the compiler only generates a single line > table entry for a function, it will skip the entire function. fwiw hppa-tdep.c has this workaround/bugfix as well.... > Back in the old days, when prologues were fixed, 1 and 2 were pretty > much equivalent. However, these days, with compilers migrating many > instructions into the prologue, the difference can be huge, and making > the wrong choice can be very annoying. i was just debugging a problem today with stack unwinding on hppa when i saw this... this is exactly the problem! :-( > The drawback of implementation 1 is mainly that the prologue isn't > completely finished when GDB stops. This means that GDB might not > print function arguments correctly because the stack frame hasn't been > fully setup yet. it will also not unwind properly (on hppa) because we cannot find the previous functions pc and sp. the hppa target has some code to skip the prologue in a different way if line number information is not available, but when it is available we use it, causing unwinding to fail. randolph -- Randolph Chung Debian GNU/Linux Developer, hppa/ia64 ports http://www.tausq.org/