/* Handle FR-V (FDPIC) shared libraries for GDB, the GNU Debugger.
- Copyright (C) 2004-2013 Free Software Foundation, Inc.
+ Copyright (C) 2004-2014 Free Software Foundation, Inc.
This file is part of GDB.
#include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
#include "inferior.h"
#include "gdbcore.h"
#include "solib.h"
lm_base (void)
{
enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
- struct minimal_symbol *got_sym;
+ struct bound_minimal_symbol got_sym;
CORE_ADDR addr;
gdb_byte buf[FRV_PTR_SIZE];
got_sym = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL,
symfile_objfile);
- if (got_sym == 0)
+ if (got_sym.minsym == 0)
{
if (solib_frv_debug)
fprintf_unfiltered (gdb_stdlog,
return 0;
}
- addr = SYMBOL_VALUE_ADDRESS (got_sym) + 8;
+ addr = BMSYMBOL_VALUE_ADDRESS (got_sym) + 8;
if (solib_frv_debug)
fprintf_unfiltered (gdb_stdlog,
for details.)
Note that the relocation of the main executable is also performed
- by SOLIB_CREATE_INFERIOR_HOOK(), however, in the case of core
+ by solib_create_inferior_hook(), however, in the case of core
files, this hook is called too late in order to be of benefit to
- SOLIB_ADD. SOLIB_ADD eventually calls this this function,
+ solib_add. solib_add eventually calls this this function,
frv_current_sos, and also precedes the call to
- SOLIB_CREATE_INFERIOR_HOOK(). (See post_create_inferior() in
+ solib_create_inferior_hook(). (See post_create_inferior() in
infcmd.c.) */
if (main_executable_lm_info == 0 && core_bfd != NULL)
frv_relocate_main_executable ();
{
return ((pc >= interp_text_sect_low && pc < interp_text_sect_high)
|| (pc >= interp_plt_sect_low && pc < interp_plt_sect_high)
- || in_plt_section (pc, NULL));
+ || in_plt_section (pc));
}
/* Given a loadmap and an address, return the displacement needed
if (interp_sect)
{
unsigned int interp_sect_size;
- gdb_byte *buf;
+ char *buf;
bfd *tmp_bfd = NULL;
int status;
CORE_ADDR addr, interp_loadmap_addr;
enable_break (void)
{
asection *interp_sect;
+ CORE_ADDR entry_point;
if (symfile_objfile == NULL)
{
return 0;
}
- if (!symfile_objfile->ei.entry_point_p)
+ if (!entry_point_address_query (&entry_point))
{
if (solib_frv_debug)
fprintf_unfiltered (gdb_stdlog,
return 0;
}
- create_solib_event_breakpoint (target_gdbarch (),
- symfile_objfile->ei.entry_point);
+ create_solib_event_breakpoint (target_gdbarch (), entry_point);
if (solib_frv_debug)
fprintf_unfiltered (gdb_stdlog,
"enable_break: solib event breakpoint "
"placed at entry point: %s\n",
- hex_string_custom (symfile_objfile->ei.entry_point,
- 8));
+ hex_string_custom (entry_point, 8));
return 1;
}
static CORE_ADDR
main_got (void)
{
- struct minimal_symbol *got_sym;
+ struct bound_minimal_symbol got_sym;
got_sym = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_",
NULL, symfile_objfile);
- if (got_sym == 0)
+ if (got_sym.minsym == 0)
return 0;
- return SYMBOL_VALUE_ADDRESS (got_sym);
+ return BMSYMBOL_VALUE_ADDRESS (got_sym);
}
/* Find the global pointer for the given function address ADDR. */