[commit] Debian/kFreeBSD build fix
Daniel Jacobowitz
dan@codesourcery.com
Wed Feb 3 15:33:00 GMT 2010
Petr Salinger reported that the Debian/kFreeBSD amd64 port failed to
build. I've checked in this to fix it.
IIUC, __FreeBSD_version is defined by FreeBSD, and
__FreeBSD_kernel_version is defined by kFreeBSD (Debian port using the
FreeBSD kernel but otherwise a very GNU runtime, with GLIBC).
Whichever is not defined will evaluate as zero so this form of the
check is correct. If we use -Wundef in the future, we can tweak this.
--
Daniel Jacobowitz
CodeSourcery
2010-02-03 Daniel Jacobowitz <dan@codesourcery.com>
* amd64fbsd-nat.c (amd64fbsd_supply_pcb): Also check for
__FreeBSD_kernel_version.
Index: amd64fbsd-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/amd64fbsd-nat.c,v
retrieving revision 1.25
diff -u -p -r1.25 amd64fbsd-nat.c
--- amd64fbsd-nat.c 1 Jan 2010 07:31:29 -0000 1.25
+++ amd64fbsd-nat.c 3 Feb 2010 15:28:18 -0000
@@ -125,7 +125,7 @@ amd64fbsd_supply_pcb (struct regcache *r
regcache_raw_supply (regcache, 13, &pcb->pcb_r13);
regcache_raw_supply (regcache, 14, &pcb->pcb_r14);
regcache_raw_supply (regcache, 15, &pcb->pcb_r15);
-#if (__FreeBSD_version < 800075)
+#if (__FreeBSD_version < 800075) && (__FreeBSD_kernel_version < 800075)
/* struct pcb provides the pcb_ds/pcb_es/pcb_fs/pcb_gs fields only
up until __FreeBSD_version 800074: The removal of these fields
occurred on 2009-04-01 while the __FreeBSD_version number was
More information about the Gdb-patches
mailing list