123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- From ab4b71c3f308af89fe2751344375b694e9d63a66 Mon Sep 17 00:00:00 2001
- From: Romain Naour <romain.naour@gmail.com>
- Date: Sun, 28 Aug 2022 23:21:37 +0200
- Subject: [PATCH] gdb: Fix native build on xtensa
- MIME-Version: 1.0
- Content-Type: text/plain; charset=UTF-8
- Content-Transfer-Encoding: 8bit
- Apply a similar fix than for Alpha architecture on gdb 9:
- https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=7a27b85f6d9b5eea9bd1493f903158fbea4b2231
- Fixes:
- ../../gdb/xtensa-linux-nat.c: In function ‘void fill_gregset(const regcache*, elf_greg_t (*)[128], int)’:
- ../../gdb/xtensa-linux-nat.c:66:17: error: ‘gdbarch_pc_regnum’ was not declared in this scope
- 66 | if (regnum == gdbarch_pc_regnum (gdbarch) || regnum == -1)
- | ^~~~~~~~~~~~~~~~~
- CXX complaints.o
- ../../gdb/xtensa-linux-nat.c:68:17: error: ‘gdbarch_ps_regnum’ was not declared in this scope
- 68 | if (regnum == gdbarch_ps_regnum (gdbarch) || regnum == -1)
- | ^~~~~~~~~~~~~~~~~
- ../../gdb/xtensa-linux-nat.c:71:38: error: no matching function for call to ‘gdbarch_tdep::gdbarch_tdep(gdbarch*&)’
- 71 | if (regnum == gdbarch_tdep (gdbarch)->wb_regnum || regnum == -1)
- | ^
- In file included from ../../gdb/xtensa-linux-nat.c:38:
- ../../gdb/xtensa-tdep.h:160:8: note: candidate: ‘gdbarch_tdep::gdbarch_tdep()’
- 160 | struct gdbarch_tdep
- | ^~~~~~~~~~~~
- ../../gdb/xtensa-tdep.h:160:8: note: candidate expects 0 arguments, 1 provided
- ../../gdb/xtensa-tdep.h:160:8: note: candidate: ‘constexpr gdbarch_tdep::gdbarch_tdep(const gdbarch_tdep&)’
- ../../gdb/xtensa-tdep.h:160:8: note: no known conversion for argument 1 from ‘gdbarch*’ to ‘const gdbarch_tdep&’
- ../../gdb/xtensa-tdep.h:160:8: note: candidate: ‘constexpr gdbarch_tdep::gdbarch_tdep(gdbarch_tdep&&)’
- ../../gdb/xtensa-tdep.h:160:8: note: no known conversion for argument 1 from ‘gdbarch*’ to ‘gdbarch_tdep&&’
- ../../gdb/xtensa-linux-nat.c:72:49: error: no matching function for call to ‘gdbarch_tdep::gdbarch_tdep(gdbarch*&)’
- 72 | regcache->raw_collect (gdbarch_tdep (gdbarch)->wb_regnum,
- | ^
- Signed-off-by: Romain Naour <romain.naour@gmail.com>
- ---
- gdb/xtensa-linux-nat.c | 1 +
- 1 file changed, 1 insertion(+)
- diff --git a/gdb/xtensa-linux-nat.c b/gdb/xtensa-linux-nat.c
- index f8509b02e07..794be827f9a 100644
- --- a/gdb/xtensa-linux-nat.c
- +++ b/gdb/xtensa-linux-nat.c
- @@ -35,6 +35,7 @@
-
- #include "gregset.h"
- #include "xtensa-tdep.h"
- +#include "gdbarch.h"
-
- /* Defines ps_err_e, struct ps_prochandle. */
- #include "gdb_proc_service.h"
- --
- 2.45.2
|