From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26949 invoked by alias); 7 May 2004 01:25:52 -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 26941 invoked from network); 7 May 2004 01:25:51 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 7 May 2004 01:25:51 -0000 Received: from drow by nevyn.them.org with local (Exim 4.32 #1 (Debian)) id 1BLu7a-0007uJ-0h; Thu, 06 May 2004 21:25:50 -0400 Date: Fri, 07 May 2004 01:25:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: gdb-patches@sources.redhat.com, Roland McGrath Subject: Re: [obish?sym;rfa:doc] Wire up vsyscall Message-ID: <20040507012549.GA30182@nevyn.them.org> Mail-Followup-To: Andrew Cagney , gdb-patches@sources.redhat.com, Roland McGrath References: <409A8C2A.2010605@gnu.org> <409AA61F.8050807@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <409AA61F.8050807@gnu.org> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-05/txt/msg00175.txt.bz2 On Thu, May 06, 2004 at 04:54:55PM -0400, Andrew Cagney wrote: > >At present I know of the following problems: > > 4. backtrace changes: > > #0 handler (sig=26, info=0xfeed7c50, context=0xfeed7cd0) at > /home/cygnus/cagney > /PENDING/2004-05-06-add-vsyscall/src/gdb/testsuite/gdb.base/siginfo.c:31 > #1 0x0093e440 in __kernel_sigreturn () > #2 0x0804848a in main () at > /home/cygnus/cagney/PENDING/2004-05-06-add-vsyscall > /src/gdb/testsuite/gdb.base/siginfo.c:66 > > vs > > #0 handler (sig=26, info=0xfee1ea80, context=0xfee1eb00) at > /home/cygnus/cagney > /GDB/src/gdb/testsuite/gdb.base/siginfo.c:31 > #1 > #2 0x0804848a in main () at > /home/cygnus/cagney/GDB/src/gdb/testsuite/gdb.base/ > > but remember I intend changing the second to: > > ... > #1 0x1234 in > ... In the meantime, here's the patch from my Debian backport which should fix this. Pending a way to indicate 'abnormal frame' status in the CFI, we don't want to use it; frame_unwind_address_in_block will hit. -- Daniel Jacobowitz 2004-01-25 Daniel Jacobowitz * i386-tdep.c (i386_gdbarch_init): Check for signal frame first. * i386-linux-tdep.c (i386_linux_pc_in_sigtramp): Handle __kernel_sigreturn. Index: gdb-6.1/gdb/i386-linux-tdep.c =================================================================== --- gdb-6.1.orig/gdb/i386-linux-tdep.c 2004-04-05 13:26:42.000000000 -0400 +++ gdb-6.1/gdb/i386-linux-tdep.c 2004-04-05 13:26:46.000000000 -0400 @@ -227,6 +227,10 @@ i386_linux_pc_in_sigtramp (CORE_ADDR pc, exported from the shared C library, so the trampoline may appear to be part of the preceding function. This should always be sigaction, __sigaction, or __libc_sigaction (all aliases to the same function). */ + + if (name && strcmp (name, "__kernel_sigreturn") == 0) + return 1; + if (name == NULL || strstr (name, "sigaction") != NULL) return (i386_linux_sigtramp_start (pc) != 0 || i386_linux_rt_sigtramp_start (pc) != 0); Index: gdb-6.1/gdb/i386-tdep.c =================================================================== --- gdb-6.1.orig/gdb/i386-tdep.c 2004-04-05 13:26:42.000000000 -0400 +++ gdb-6.1/gdb/i386-tdep.c 2004-04-05 13:26:46.000000000 -0400 @@ -2013,6 +2013,10 @@ i386_gdbarch_init (struct gdbarch_info i /* Helper for function argument information. */ set_gdbarch_fetch_pointer_argument (gdbarch, i386_fetch_pointer_argument); + /* The signal handler might have dwarf2 CFI, via the vsyscall DSO, so check + for this first. */ + frame_unwind_append_sniffer (gdbarch, i386_sigtramp_frame_sniffer); + /* Hook in the DWARF CFI frame unwinder. */ frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer); @@ -2021,7 +2025,6 @@ i386_gdbarch_init (struct gdbarch_info i /* Hook in ABI-specific overrides, if they have been registered. */ gdbarch_init_osabi (info, gdbarch); - frame_unwind_append_sniffer (gdbarch, i386_sigtramp_frame_sniffer); frame_unwind_append_sniffer (gdbarch, i386_frame_sniffer); /* If we have a register mapping, enable the generic core file