From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28793 invoked by alias); 22 Mar 2004 19:05:06 -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 28744 invoked from network); 22 Mar 2004 19:05:04 -0000 Received: from unknown (HELO faui10.informatik.uni-erlangen.de) (131.188.31.10) by sources.redhat.com with SMTP; 22 Mar 2004 19:05:04 -0000 Received: from faui1d.informatik.uni-erlangen.de (faui1d [131.188.31.34]) by faui10.informatik.uni-erlangen.de (8.9.3p3/8.1.9-FAU) with ESMTP id UAA12484; Mon, 22 Mar 2004 20:05:01 +0100 (CET) From: Ulrich Weigand Received: (from weigand@localhost) by faui1d.informatik.uni-erlangen.de (8.9.3p3/8.1.6-FAU) id UAA12203; Mon, 22 Mar 2004 20:05:01 +0100 (CET) Message-Id: <200403221905.UAA12203@faui1d.informatik.uni-erlangen.de> Subject: Re: [PATCH] Fix gdb1476.exp on s390* To: cagney@gnu.org (Andrew Cagney) Date: Mon, 22 Mar 2004 19:05:00 -0000 Cc: weigand@i1.informatik.uni-erlangen.de (Ulrich Weigand), gdb-patches@sources.redhat.com In-Reply-To: <405F20C5.7040700@gnu.org> from "Andrew Cagney" at Mar 22, 2004 12:22:13 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03/txt/msg00502.txt.bz2 Andrew Cagney wrote: > > Hello, > > > > this patch fixes the gdb.base/gdb1476.exp test case (backtrace from NULL > > function pointer call). > > > > When calling via an invalid function pointer, what we should do is simply > > unwind the PC from the return address register and continue. This is > > exactly what is done to unwind from a PLT stub as well, so the patch > > simply uses the PLT frame unwinder to handle this case as well. > > While that might be true, I don't know that its the job of something > called "PLTSTUB". Yes, the name's a bit unfortunate. What this unwinder does is basically unwind from any situation where we don't have a proper function prolog. It could in theory handle all kinds of stubs, trampolines etc. > I can think of either: > - renaming pltstub to something that matches its new purpose (just "stub"?) This would be my preferred solution. > - using the default unwinder The default unwinder as it is now would handle the situation incorrectly. I could build the stub detection logic into the default unwinder, but that would make it even more complex than it already is; I would think with the new frame logic it is preferable to have multiple unwinders rather than a single one that handles everything. Bye, Ulrich -- Dr. Ulrich Weigand weigand@informatik.uni-erlangen.de