gdb: LoongArch: Remove nonportable #include
[binutils-gdb.git] / gdb / or1k-linux-tdep.c
index 2efb4d0b0f9d76e32092bc0b2ce2f2de4432094a..10f76680d8c3ce3baa195b5492612bc7671519b7 100644 (file)
@@ -1,5 +1,5 @@
 /* Target-dependent code for GNU/Linux on OpenRISC processors.
-   Copyright (C) 2018-2021 Free Software Foundation, Inc.
+   Copyright (C) 2018-2022 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,6 +27,8 @@
 #include "trad-frame.h"
 #include "gdbarch.h"
 
+#include "features/or1k-linux.c"
+
 /* Define the general register mapping.  The kernel and GDB put registers
    r1 to r31 in the same place.  The NPC register is stored at index 32 in
    linux and 33 in GDB, in GDB 32 is for PPC which is not popupated from linux.
@@ -152,6 +154,8 @@ or1k_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
   /* GNU/Linux uses the dynamic linker included in the GNU C Library.  */
   set_gdbarch_skip_solib_resolver (gdbarch, glibc_skip_solib_resolver);
 
+  set_gdbarch_software_single_step (gdbarch, or1k_software_single_step);
+
   /* Enable TLS support.  */
   set_gdbarch_fetch_tls_load_module_address (gdbarch,
                                             svr4_fetch_objfile_link_map);
@@ -170,4 +174,7 @@ _initialize_or1k_linux_tdep ()
 {
   gdbarch_register_osabi (bfd_arch_or1k, 0, GDB_OSABI_LINUX,
                          or1k_linux_init_abi);
+
+  /* Initialize the standard target descriptions.  */
+  initialize_tdesc_or1k_linux ();
 }