From 2208ee917050bcc901c7faefdee257ffbf8ef2ab Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Thu, 15 Aug 2019 08:14:31 +0200 Subject: [PATCH] [gdb] Fix gdb build on mips64-linux MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When compiling for mips64-linux, we get: ... src/gdb/linux-nat-trad.c:139:12: error: ‘gdbarch_num_regs’ was not declared \ in this scope 139 | regnum < gdbarch_num_regs (regcache->arch ()); ... Fix this by including gdbarch.h in linux-nat-trad.c, similar to commit b1c896b365 "Fix gdb build on macOS". Build on mips64-linux. gdb/ChangeLog: 2019-08-15 Tom de Vries * linux-nat-trad.c: Include gdbarch.h. --- gdb/ChangeLog | 4 ++++ gdb/linux-nat-trad.c | 1 + 2 files changed, 5 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6f7474f2826..b6953b015ac 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2019-08-15 Tom de Vries + + * linux-nat-trad.c: Include gdbarch.h. + 2019-08-14 Alan Hayward * aarch64-tdep.c (aarch64_analyze_prologue): Allow any valid diff --git a/gdb/linux-nat-trad.c b/gdb/linux-nat-trad.c index 04507e80418..c6208dccdb4 100644 --- a/gdb/linux-nat-trad.c +++ b/gdb/linux-nat-trad.c @@ -22,6 +22,7 @@ #include "nat/gdb_ptrace.h" #include "inf-ptrace.h" +#include "gdbarch.h" /* Fetch register REGNUM from the inferior. */ -- 2.30.2