cris: Check UNDEFWEAK_NO_DYNAMIC_RELOC
[deliverable/binutils-gdb.git] / gdb / x86-bsd-nat.c
index 1998476cc16dd403aad2978e5380d21d77ad1c04..1d37b2f05d4c4bb1c0fa6b5ddc23893cfda41794 100644 (file)
@@ -1,6 +1,6 @@
 /* Native-dependent code for X86 BSD's.
 
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -51,11 +51,16 @@ x86bsd_mourn_inferior (struct target_ops *ops)
   super_mourn_inferior (ops);
 }
 
-/* Not all versions of FreeBSD/i386 that support the debug registers
-   have this macro.  */
+/* Helper macro to access debug register X.  FreeBSD/amd64 and modern
+   versions of FreeBSD/i386 provide this macro in system headers.  Define
+   a local version for systems that do not provide it.  */
 #ifndef DBREG_DRX
+#ifdef __NetBSD__
+#define DBREG_DRX(d, x) ((d)->dr[x])
+#else
 #define DBREG_DRX(d, x) ((&d->dr0)[x])
 #endif
+#endif
 
 static unsigned long
 x86bsd_dr_get (ptid_t ptid, int regnum)
This page took 0.023139 seconds and 4 git commands to generate.