From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19110 invoked by alias); 9 Aug 2004 22:44:41 -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 19073 invoked from network); 9 Aug 2004 22:44:37 -0000 Received: from unknown (HELO khazad.dyndns.org) (80.24.13.86) by sourceware.org with SMTP; 9 Aug 2004 22:44:37 -0000 Received: from aragorn ([192.168.0.1] helo=khazad.dyndns.org) by khazad.dyndns.org with esmtp (Exim 3.36 #1 (Debian)) id 1BuIzX-0003Lw-00; Tue, 10 Aug 2004 00:51:43 +0200 Received: from rmh by khazad.dyndns.org with local (Exim 4.34) id 1BuIsS-0004wV-2E; Tue, 10 Aug 2004 00:44:24 +0200 Date: Mon, 09 Aug 2004 22:44:00 -0000 From: Robert Millan To: Mark Kettenis Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] i386bsd-nat.c tweak Message-ID: <20040809224424.GB18914@khazad.dyndns.org> References: <200408092048.i79KmP7c058727@elgar.kettenis.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200408092048.i79KmP7c058727@elgar.kettenis.dyndns.org> Organisation: free as in freedom X-Operating-System: GNU/kFreeBSD User-Agent: Mutt/1.5.6+20040722i X-SW-Source: 2004-08/txt/msg00343.txt.bz2 On Mon, Aug 09, 2004 at 10:48:25PM +0200, Mark Kettenis wrote: > diff -u -p -r1.29 i386bsd-nat.c > --- i386bsd-nat.c 31 May 2004 11:20:41 -0000 1.29 > +++ i386bsd-nat.c 9 Aug 2004 20:31:18 -0000 > @@ -357,10 +357,10 @@ _initialize_i386bsd_nat (void) > #define SC_REG_OFFSET i386nbsd_sc_reg_offset > #elif defined (OpenBSD) > #define SC_REG_OFFSET i386obsd_sc_reg_offset > -#else > -#define SC_REG_OFFSET i386bsd_sc_reg_offset > #endif This disables the code below on GNU/kFreeBSD, but it's still enabled in FreeBSD 4.x or later. Our sigcontext structure is like FreeBSD's (the code is borrowed from machine/signal.h). My impression is that on GNU/kFreeBSD we want to define SC_REG_OFFSET i386fbsd4_sc_reg_offset. Please let me know if I'm missing something. Build on GNU/kFreeBSD still works, but it might be that keeping SC_REG_OFFSET undefined results in a weird runtime bug that will be difficult to trace, so I'd really like to be sure this part is ok. > +#ifdef SC_REG_OFFSET > + > /* We only check the program counter, stack pointer and frame > pointer since these members of `struct sigcontext' are essential > for providing backtraces. More checks could be added, but would > @@ -410,4 +410,6 @@ Please report this to . > } > > SC_FP_OFFSET = offset; > + > +#endif /* SC_REG_OFFSET */ > } -- Robert Millan (Debra and Ian) (Gnu's Not (UNiplexed Information and Computing System))/\ (kernel of *(Berkeley Software Distribution))