/* Handle FR-V (FDPIC) shared libraries for GDB, the GNU Debugger.
- Copyright (C) 2004-2023 Free Software Foundation, Inc.
+ Copyright (C) 2004-2024 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 "extract-store-integer.h"
#include "gdbcore.h"
#include "solib.h"
#include "solist.h"
static CORE_ADDR main_got (void);
static int enable_break2 (void);
-/* Implement the "open_symbol_file_object" target_so_ops method. */
+/* Implement the "open_symbol_file_object" solib_ops method. */
static int
open_symbol_file_object (int from_tty)
}
-/* Implement the "current_sos" target_so_ops method. */
+/* Implement the "current_sos" solib_ops method. */
-static intrusive_list<so_list>
+static intrusive_list<solib>
frv_current_sos ()
{
bfd_endian byte_order = gdbarch_byte_order (current_inferior ()->arch ());
CORE_ADDR lm_addr, mgot;
- intrusive_list<so_list> sos;
+ intrusive_list<solib> sos;
/* Make sure that the main executable has been relocated. This is
required in order to find the address of the global offset table,
frv_current_sos, and also precedes the call to
solib_create_inferior_hook(). (See post_create_inferior() in
infcmd.c.) */
- if (main_executable_lm_info == 0 && core_bfd != NULL)
+ if (main_executable_lm_info == 0
+ && current_program_space->core_bfd () != nullptr)
frv_relocate_main_executable ();
/* Fetch the GOT corresponding to the main executable. */
break;
}
- so_list *sop = new so_list;
- auto li = gdb::make_unique<lm_info_frv> ();
+ solib *sop = new solib;
+ auto li = std::make_unique<lm_info_frv> ();
li->map = loadmap;
li->got_value = got_addr;
li->lm_addr = lm_addr;
}
static void
-frv_relocate_section_addresses (so_list &so, target_section *sec)
+frv_relocate_section_addresses (solib &so, target_section *sec)
{
int seg;
auto *li = gdb::checked_static_cast<lm_info_frv *> (so.lm_info.get ());
CORE_ADDR
frv_fdpic_find_global_pointer (CORE_ADDR addr)
{
- for (const so_list &so : current_program_space->solibs ())
+ for (const solib &so : current_program_space->solibs ())
{
int seg;
auto *li = gdb::checked_static_cast<lm_info_frv *> (so.lm_info.get ());
in list of shared objects. */
if (addr == 0)
{
- for (const so_list &so : current_program_space->solibs ())
+ for (const solib &so : current_program_space->solibs ())
{
auto *li = gdb::checked_static_cast<lm_info_frv *> (so.lm_info.get ());
/* The other link map addresses may be found by examining the list
of shared libraries. */
- for (const so_list &so : current_program_space->solibs ())
+ for (const solib &so : current_program_space->solibs ())
{
auto *li = gdb::checked_static_cast<lm_info_frv *> (so.lm_info.get ());
return 0;
}
-const struct target_so_ops frv_so_ops =
+const solib_ops frv_so_ops =
{
frv_relocate_section_addresses,
nullptr,