gdb: fix IA64 build failure of linux-nat
authorSergei Trofimovich <siarheit@google.com>
Tue, 19 May 2020 21:19:45 +0000 (22:19 +0100)
committerSergei Trofimovich <siarheit@google.com>
Mon, 17 Aug 2020 20:52:52 +0000 (21:52 +0100)
On IA64 built failed as:

```
ia64-linux-nat.c:352:29: error: 'gdbarch_num_regs' was not declared in this scope
  352 |   if (regno < 0 || regno >= gdbarch_num_regs (gdbarch))
      |                             ^~~~~~~~~~~~~~~~
```

The fix includes "gdbarch.h" header where symbol is declared.

* ia64-linux-nat.c: Include "gdbarch.h" to declare used
'gdbarch_num_regs'.

Signed-off-by: Sergei Trofimovich <siarheit@google.com>
gdb/ChangeLog
gdb/ia64-linux-nat.c

index b097b325a22b90770bbbf4482e8e1897ebda3952..3f681e19e5ae4d4e97dc55c118ffb5dd182e0f87 100644 (file)
@@ -1,3 +1,8 @@
+2020-08-17  Sergei Trofimovich  <siarheit@google.com>
+
+       * ia64-linux-nat.c: Include "gdbarch.h" to declare used
+       'gdbarch_num_regs'.
+
 2020-08-17  Tom Tromey  <tromey@adacore.com>
 
        * ada-varobj.c (ada_varobj_decode_var): Handle case where
index 8f36ea78e762ceeb3a44ceef113ce26ce478c5ed..b532e7a51c53c9c5a49fe0614dd95efcad67ed8e 100644 (file)
@@ -21,6 +21,7 @@
 #include "defs.h"
 #include "inferior.h"
 #include "target.h"
+#include "gdbarch.h"
 #include "gdbcore.h"
 #include "regcache.h"
 #include "ia64-tdep.h"