[PATCH 1/5] Include the x86-bsd-nat.h header and fix the NetBSD/i386 build

Kamil Rytarowski
2020-09-23T04:26:18Z

In file included from ../../gdb/i386-nbsd-nat.c:26:
../../gdb/i386-bsd-nat.h:34:53: error: expected template-name before '<' token
34 | class i386_bsd_nat_target : public x86bsd_nat_target<BaseTarget>
| ^
../../gdb/i386-bsd-nat.h:34:53: error: expected '{' before '<' token
../../gdb/i386-nbsd-nat.c:74:45: error: aggregate 'i386_bsd_nat_target<nbsd_nat_target> the_i386_nbsd_nat_target' has incomplete type and cannot be defined
74 | static i386_bsd_nat_target<nbsd_nat_target> the_i386_nbsd_nat_target;
| ^~~~~~~~~~~~~~~~~~~~~~~~

gdb/ChangeLog:

* i386-nbsd-nat.c: Include "x86-bsd-nat.h".
---
gdb/ChangeLog | 4 ++++
gdb/i386-nbsd-nat.c | 1 +
2 files changed, 5 insertions(+)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ce9cef5f516..c95e681b4a8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2020-09-23 Kamil Rytarowski <n54@gmx.com>
+
+ * i386-nbsd-nat.c: Include "x86-bsd-nat.h".
+
2020-09-21 Tom Tromey <tromey@adacore.com>

* sparc-tdep.c (sparc32_skip_prologue): Use
diff --git a/gdb/i386-nbsd-nat.c b/gdb/i386-nbsd-nat.c
index ac775c1ff84..d535408f091 100644
--- a/gdb/i386-nbsd-nat.c
+++ b/gdb/i386-nbsd-nat.c
@@ -23,6 +23,7 @@
#include "target.h"

#include "i386-tdep.h"
+#include "x86-bsd-nat.h"
#include "i386-bsd-nat.h"

/* Support for debugging kernel virtual memory images. */
--
2.28.0