Package: gdb
Version: 7.0-1
Severity: important
Tags: patch
User: [email protected]
Usertags: kfreebsd

Hi,

the current version fails to build on GNU/kFreeBSD with 8.x kernel headers.

The FreeBSD 8.0 kernel does not have segment registers in pcb anymore.
To solve current FTBFS please just use patch bellow.

Sorry for the inconvenience.


--- amd64fbsd-nat.c
+++ amd64fbsd-nat.c
@@ -94,6 +94,7 @@
 /* Support for debugging kernel virtual memory images.  */

 #include <sys/types.h>
+#include <sys/param.h>
 #include <machine/pcb.h>

 #include "bsd-kvm.h"
@@ -123,10 +123,13 @@
   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 < 800000) &&  (__FreeBSD_kernel_version < 800000)
   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;
 }



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to