From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12763 invoked by alias); 25 Oct 2004 22:46:08 -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 12725 invoked from network); 25 Oct 2004 22:46:02 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 25 Oct 2004 22:46:02 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9PMjvhn014490 for ; Mon, 25 Oct 2004 18:45:57 -0400 Received: from localhost.redhat.com (to-dhcp51.toronto.redhat.com [172.16.14.151]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9PMjpr05106; Mon, 25 Oct 2004 18:45:51 -0400 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 705DD1294B5; Mon, 25 Oct 2004 18:44:41 -0400 (EDT) Message-ID: <417D81D5.1000206@gnu.org> Date: Mon, 25 Oct 2004 22:46:00 -0000 From: Andrew Cagney User-Agent: Mozilla Thunderbird 0.8 (X11/20041020) MIME-Version: 1.0 To: Mark Kettenis Cc: drow@false.org, gdb-patches@sources.redhat.com, ezannoni@redhat.com, roland@redhat.com Subject: Re: [rfa] Attach vsyscall support for GNU/Linux References: <20041024185345.GB22700@nevyn.them.org> <200410242054.i9OKsjnl028328@elgar.sibelius.xs4all.nl> <20041024231636.GA21927@nevyn.them.org> <200410252212.i9PMCQhJ031724@elgar.sibelius.xs4all.nl> In-Reply-To: <200410252212.i9PMCQhJ031724@elgar.sibelius.xs4all.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-10/txt/msg00419.txt.bz2 Mark Kettenis wrote: > Date: Sun, 24 Oct 2004 19:16:36 -0400 > From: Daniel Jacobowitz > > Thanks for the explanation Daniel! > > Unwinding bugs aside, I think it's valuable for GDB to know that it is > at a signal trampoline. I think the custom display in backtrace is > valuable. That means we should look for signal handlers before looking > for CFI. For NPTL that value judgement would fall the other way - not > having to special-case signal handlers is a clear win. > > Given the fact that it is desirable for GDB to know that it's dealing > with a signal handler, I think the correct approach is to extend the > DWARF2 unwinder with a method to get the frame type, similar to what > we already do for pre-initializing the register state. The ``correct approach'' is both more complicated and simplier (the complexity comes with the amount of refactoring, the simplicity from the result): At present we've the relationship: FRAME <>---- UNWINDER <> | FUNCTION ---> SYMBOL where the UNWINDER is providing attributes and methods such as: - unwind register - callee frame? while the FUNCTION provides attributes such as: - code start/range - function name It needs to be changed so more like: SYMBOL /|\ | FRAME <>----- FUNCTION <>------ UNWINDER and have the FUNCTION provide: - signal trampoline? - code start/range - function name and the FUNCTION's unwinder just supply registers. For the case being discussed, this would let us equally implement: FRAME <>----- SIGTRAMP-FUNCTION <>----- DWARF2-UNWINDER FRAME <>----- SIGTRAMP-FUNCTION <>----- SIGTRAMP-UNWINDER FRAME <>----- SIGTRAMP-FUNCTION <>----- UNWINDER-PROXY (for the last case, the actual unwinder being selected if/when needed). On the down side, this means replacing the frame identification heuristic found in frame-unwind with robust logic in the symtab, and expanding symbol. On the upside, this means that the function symbol starts correctly identifying these probed frames (at present the're all b-). Andrew