This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 0/4] Various build fixes for NetBSD
- From: coypu at sdf dot org
- To: John Baldwin <jhb at FreeBSD dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 19 Jul 2017 10:59:38 +0000
- Subject: Re: [PATCH 0/4] Various build fixes for NetBSD
- Authentication-results: sourceware.org; auth=none
- References: <20170715172021.80516-1-jhb@FreeBSD.org>
On Sat, Jul 15, 2017 at 10:20:17AM -0700, John Baldwin wrote:
> I have build tested this in a NetBSD/amd64 7.1 VM. The KVM target
> built for me, but I have not tested it. The debug registers changes
> in NetBSD are newer than 7.1 so I was not able to build test those.
>
> coypu, can you please test this on your end and verify the debug
> registers work on NetBSD/i386 or NetBSD/amd64? Can you also do some
> simple testing of the KVM target on amd64?
I had trouble with just those patches and had to make some changes.
_KMEMUSER needs to be defined before all includes
I also needed this change for dbregs (they would not work on 7.x I
guess)
diff --git a/gdb/configure.nat b/gdb/configure.nat
index d649c29f..db021a09 100644
--- a/gdb/configure.nat
+++ b/gdb/configure.nat
@@ -339,7 +339,7 @@ case ${gdb_host} 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 bsd-kvm.o x86-dregs.o"
+ x86-bsd-nat.o amd64-bsd-nat.o x86-nat.o amd64-nbsd-nat.o bsd-kvm.o x86-dregs.o"
LOADLIBES='-lkvm'
;;
sparc)
KVM target did not work. it claims it's not supported, but it might be
misuse on my part:
(gdb) target kvm /dev/kmem
Undefined target command: "kvm /dev/kmem". Try "help target".
it's how I would use it on netbsd's variant of gdb.
I don't know how to use debug registers, I'll ask around for more details.
I've only tested amd64. I'll try to do more architectures later.
thanks for your effort.