#include "gdbcore.h"
#include "target.h"
#include "inferior.h"
+#include "regcache.h"
#include "hppa-tdep.h"
#include "solist.h"
static void
pa64_relocate_section_addresses (struct so_list *so,
- struct section_table *sec)
+ struct target_section *sec)
{
asection *asec = sec->the_bfd_section;
CORE_ADDR load_offset;
Elf64_Dyn *x_dynp = (Elf64_Dyn*)buf;
Elf64_Sxword dyn_tag;
CORE_ADDR dyn_ptr;
- char *pbuf;
- pbuf = alloca (gdbarch_ptr_bit (current_gdbarch) / HOST_CHAR_BIT);
dyn_tag = bfd_h_get_64 (symfile_objfile->obfd,
(bfd_byte*) &x_dynp->d_tag);
Also note the breakpoint is the second instruction in the
routine. */
- load_addr = read_pc () - tmp_bfd->start_address;
+ load_addr = regcache_read_pc (get_current_regcache ())
+ - tmp_bfd->start_address;
sym_addr = bfd_lookup_symbol (tmp_bfd, "__dld_break");
sym_addr = load_addr + sym_addr + 4;
/* Create the shared library breakpoint. */
{
struct breakpoint *b
- = create_solib_event_breakpoint (sym_addr);
+ = create_solib_event_breakpoint (target_gdbarch, sym_addr);
/* The breakpoint is actually hard-coded into the dynamic linker,
so we don't need to actually insert a breakpoint instruction