Re: [PATCH v2 0/2] Various build fixes for NetBSD

coypu
2017-09-04T20:04:37Z

[-- Attachment #1: Type: text/plain, Size: 152 bytes --]

Hi,

I've needed amendments to patch #3, and an additional patch.
The additional patch is needed as kamil had removed sys/user.h in
netbsd.

Thank you.

[-- Attachment #2: 0001-Use-existing-configure-test-to-guard-inclusion-of-sy.patch --]
[-- Type: text/plain, Size: 587 bytes --]

From 147b605f040889110fc47bf6b9d2b00af7317958 Mon Sep 17 00:00:00 2001
From: coypu <coypu@sdf.org>
Date: Mon, 4 Sep 2017 22:59:17 +0300
Subject: [PATCH 1/2] Use existing configure test to guard inclusion of
sys/user.h

---
gdb/bsd-kvm.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/gdb/bsd-kvm.c b/gdb/bsd-kvm.c
index f872fc084..67f7e5113 100644
--- a/gdb/bsd-kvm.c
+++ b/gdb/bsd-kvm.c
@@ -37,7 +37,9 @@
#include "readline/readline.h"
#include <sys/param.h>
#include <sys/proc.h>
+#ifdef HAVE_SYS_USER_H
#include <sys/user.h>
+#endif

#include "bsd-kvm.h"

--
2.14.1

[-- Attachment #3: 0002-configure.nat-Add-bsd-kvm.o-x86-nat.o-x86-dregs.o.patch --]
[-- Type: text/plain, Size: 890 bytes --]

From 426613ab4883d2edae286a7635298f217bb031c8 Mon Sep 17 00:00:00 2001
From: coypu <coypu@sdf.org>
Date: Mon, 4 Sep 2017 23:00:00 +0300
Subject: [PATCH 2/2] configure.nat: Add "bsd-kvm.o x86-nat.o x86-dregs.o" and
"-lkvm" for NetBSD/amd64

---
gdb/configure.nat | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gdb/configure.nat b/gdb/configure.nat
index b32c9aa84..36c48b10f 100644
--- a/gdb/configure.nat
+++ b/gdb/configure.nat
@@ -338,8 +338,10 @@ case ${gdb_host} in
case ${gdb_host_cpu} in
i386)
# Host: NetBSD/amd64
- NATDEPFILES="${NATDEPFILES} nbsd-nat.o amd64-nat.o \
- x86-bsd-nat.o amd64-bsd-nat.o amd64-nbsd-nat.o"
+ NATDEPFILES="${NATDEPFILES} nbsd-nat.o amd64-nat.o x86-nat.o \
+ x86-bsd-nat.o amd64-bsd-nat.o amd64-nbsd-nat.o bsd-kvm.o \
+ x86-dregs.o"
+ LOADLIBES='-lkvm'
;;
sparc)
# Host: NetBSD/sparc64
--
2.14.1