From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30954 invoked by alias); 12 Aug 2004 09:39:31 -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 30932 invoked from network); 12 Aug 2004 09:39:27 -0000 Received: from unknown (HELO khazad.dyndns.org) (80.24.13.86) by sourceware.org with SMTP; 12 Aug 2004 09:39:27 -0000 Received: from aragorn ([192.168.0.1] helo=khazad.dyndns.org) by khazad.dyndns.org with esmtp (Exim 3.36 #1 (Debian)) id 1BvCAa-0000xN-00; Thu, 12 Aug 2004 11:46:48 +0200 Received: from rmh by khazad.dyndns.org with local (Exim 4.34) id 1BvC38-0009sx-SH; Thu, 12 Aug 2004 11:39:06 +0200 Date: Thu, 12 Aug 2004 09:39:00 -0000 From: Robert Millan To: Mark Kettenis Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] i386bsd-nat.c tweak Message-ID: <20040812093906.GA36673@khazad.dyndns.org> References: <200408092048.i79KmP7c058727@elgar.kettenis.dyndns.org> <20040809224424.GB18914@khazad.dyndns.org> <200408120855.i7C8tN57065199@elgar.kettenis.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200408120855.i7C8tN57065199@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/msg00444.txt.bz2 On Thu, Aug 12, 2004 at 10:55:23AM +0200, Mark Kettenis wrote: > > This disables the code below on GNU/kFreeBSD, but it's still enabled in > FreeBSD 4.x or later. > > Yes indeed. > > [...] > > 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. > > It will be caught on normal FreeBSD. We have this check: #if defined (__FreeBSD_version) && __FreeBSD_version >= 400011 #define SC_REG_OFFSET i386fbsd4_sc_reg_offset This ensures that SC_REG_OFFSET is defined for either 4.x or 5.x (i.e. any non-obsolete version of FreeBSD). If not defining it triggers a bug, how can it be caught on normal FreeBSD, if that situation never happens? Perhaps what you want is something like this?: #if defined (__FreeBSD_version) && __FreeBSD_version >= 400011 \ __FreeBSD_version < 500000 #define SC_REG_OFFSET i386fbsd4_sc_reg_offset Then i386fbsd4_sc_reg_offset would be for 4.x only, which seems like the intended result. Is that it? -- Robert Millan (Debra and Ian) (Gnu's Not (UNiplexed Information and Computing System))/\ (kernel of *(Berkeley Software Distribution))