This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Fix building gdb-7.0 on x86_64-*-freebsd
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: gdb-patches at sourceware dot org
- Date: Mon, 12 Oct 2009 14:55:18 -0700
- Subject: [PATCH] Fix building gdb-7.0 on x86_64-*-freebsd
The attach patch allows gdb-7.0 (and 6.8) to build
on x86_64-*-freebsd. Revision 189903 of FreeBSD's
sys/amd64/include/pcb.h removed the pcb_fs, pcb_gs,
pcb_ds, and pcb_es members of the structure.
--
Steve
--- amd64fbsd-nat.c.orig 2009-10-12 14:38:56.000000000 -0700
+++ amd64fbsd-nat.c 2009-10-12 14:40:13.000000000 -0700
@@ -95,6 +95,7 @@
#include <sys/types.h>
#include <machine/pcb.h>
+#include <osreldate.h>
#include "bsd-kvm.h"
@@ -123,10 +124,12 @@
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 < 900000)
regcache_raw_supply (regcache, AMD64_DS_REGNUM, &pcb->pcb_ds);
regcache_raw_supply (regcache, AMD64_ES_REGNUM, &pcb->pcb_es);
regcache_raw_supply (regcache, AMD64_FS_REGNUM, &pcb->pcb_fs);
regcache_raw_supply (regcache, AMD64_GS_REGNUM, &pcb->pcb_gs);
+#endif
return 1;
}