Define _KMEMUSER before including BSD kernel headers.
authorJohn Baldwin <jhb@FreeBSD.org>
Tue, 5 Sep 2017 02:34:48 +0000 (19:34 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Tue, 5 Sep 2017 02:34:48 +0000 (19:34 -0700)
Recent versions of NetBSD hide certain kernel structures needed by the
KVM target from userland unless this macro is defined.

gdb/ChangeLog:

* bsd-kvm.o: Define _KMEMUSER.
* configure.ac: Define _KMEMUSER when checking for "struct lwp".
* configure: Regenerate.

gdb/ChangeLog
gdb/bsd-kvm.c
gdb/configure
gdb/configure.ac

index 74b5d8f8da19217a732c59ae1e75c14252525bfe..0d86e4705e01656e8a2ee5956e423162b8e5095d 100644 (file)
@@ -1,3 +1,9 @@
+2017-09-04  John Baldwin  <jhb@FreeBSD.org>
+
+       * bsd-kvm.o: Define _KMEMUSER.
+       * configure.ac: Define _KMEMUSER when checking for "struct lwp".
+       * configure: Regenerate.
+
 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
 
        * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
index 98e242836d9d236037205bde29c32f3ec159983a..8c2139462dc51d8426019e9600cb4e3a2e79af84 100644 (file)
@@ -17,6 +17,7 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#define _KMEMUSER
 #include "defs.h"
 #include "cli/cli-cmds.h"
 #include "command.h"
index 755e3dccf18359310d7588d97356ff043ddc0703..c7746fc60f6e31b650d5adf76b0b76d53a787617 100755 (executable)
@@ -13571,6 +13571,7 @@ else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/param.h>
+#define _KMEMUSER
 #include <sys/lwp.h>
 int
 main ()
index 10d2d10b12843dfbb5a20ae3adf3ebbe280ec32b..b4d7a87701f89b179ebafc5652e9542c1247cdd8 100644 (file)
@@ -1434,6 +1434,7 @@ AC_CHECK_MEMBERS([struct thread.td_pcb], [], [],
 # See if <sys/lwp.h> defines `struct lwp`.
 AC_CACHE_CHECK([for struct lwp], gdb_cv_struct_lwp,
 [AC_TRY_COMPILE([#include <sys/param.h>
+#define _KMEMUSER
 #include <sys/lwp.h>], [struct lwp l;],
 gdb_cv_struct_lwp=yes, gdb_cv_struct_lwp=no)])
 if test $gdb_cv_struct_lwp = yes; then
This page took 0.05425 seconds and 4 git commands to generate.