/* Target-dependent code for GNU/Linux on Xtensa processors.
- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This file is part of GDB.
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
+#include "xtensa-tdep.h"
#include "osabi.h"
#include "linux-tdep.h"
#include "solib-svr4.h"
static void
xtensa_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ if (tdep->num_nopriv_regs < tdep->num_regs)
+ {
+ tdep->num_pseudo_regs += tdep->num_regs - tdep->num_nopriv_regs;
+ tdep->num_regs = tdep->num_nopriv_regs;
+
+ set_gdbarch_num_regs (gdbarch, tdep->num_regs);
+ set_gdbarch_num_pseudo_regs (gdbarch, tdep->num_pseudo_regs);
+ }
+
linux_init_abi (info, gdbarch);
set_solib_svr4_fetch_link_map_offsets
xtensa_linux_gdb_signal_from_target);
set_gdbarch_gdb_signal_to_target (gdbarch,
xtensa_linux_gdb_signal_to_target);
-}
-/* Provide a prototype to silence -Wmissing-prototypes. */
-extern initialize_file_ftype _initialize_xtensa_linux_tdep;
+ /* Enable TLS support. */
+ set_gdbarch_fetch_tls_load_module_address (gdbarch,
+ svr4_fetch_objfile_link_map);
+}
void
_initialize_xtensa_linux_tdep (void)