extern void _initialize_hppa_hpux_tdep (void);
extern initialize_file_ftype _initialize_hppa_hpux_tdep;
-static int
-in_opd_section (CORE_ADDR pc)
-{
- struct obj_section *s;
- int retval = 0;
-
- s = find_pc_section (pc);
-
- retval = (s != NULL
- && s->the_bfd_section->name != NULL
- && strcmp (s->the_bfd_section->name, ".opd") == 0);
- return (retval);
-}
-
/* Return one if PC is in the call path of a trampoline, else return zero.
Note we return one for *any* call trampoline (long-call, arg-reloc), not
just shared library trampolines (import, export). */
static int
-hppa32_hpux_in_solib_call_trampoline (struct gdbarch *gdbarch,
- CORE_ADDR pc, char *name)
+hppa32_hpux_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- struct minimal_symbol *minsym;
+ struct bound_minimal_symbol minsym;
struct unwind_table_entry *u;
/* First see if PC is in one of the two C-library trampolines. */
return 1;
minsym = lookup_minimal_symbol_by_pc (pc);
- if (minsym && strcmp (SYMBOL_LINKAGE_NAME (minsym), ".stub") == 0)
+ if (minsym.minsym
+ && strcmp (SYMBOL_LINKAGE_NAME (minsym.minsym), ".stub") == 0)
return 1;
/* Get the unwind descriptor corresponding to PC, return zero
}
static int
-hppa64_hpux_in_solib_call_trampoline (struct gdbarch *gdbarch,
- CORE_ADDR pc, char *name)
+hppa64_hpux_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
step. If it does, then assume we are not in a stub and return.
Finally peek at the instructions to see if they look like a stub. */
- struct minimal_symbol *minsym;
+ struct bound_minimal_symbol minsym;
asection *sec;
CORE_ADDR addr;
int insn;
minsym = lookup_minimal_symbol_by_pc (pc);
- if (! minsym)
+ if (! minsym.minsym)
return 0;
- sec = SYMBOL_OBJ_SECTION (minsym)->the_bfd_section;
+ sec = SYMBOL_OBJ_SECTION (minsym.objfile, minsym.minsym)->the_bfd_section;
if (bfd_get_section_vma (sec->owner, sec) <= pc
&& pc < (bfd_get_section_vma (sec->owner, sec)
int word_size = gdbarch_ptr_bit (gdbarch) / 8;
long orig_pc = pc;
long prev_inst, curr_inst, loc;
- struct minimal_symbol *msym;
+ struct bound_minimal_symbol msym;
struct unwind_table_entry *u;
/* Addresses passed to dyncall may *NOT* be the actual address
/*--------------------------------------------------------------------------*/
msym = lookup_minimal_symbol_by_pc (pc);
- if (msym == NULL || MSYMBOL_TYPE (msym) != mst_solib_trampoline)
+ if (msym.minsym == NULL
+ || MSYMBOL_TYPE (msym.minsym) != mst_solib_trampoline)
return orig_pc == pc ? 0 : pc & ~0x3;
- else if (msym != NULL && MSYMBOL_TYPE (msym) == mst_solib_trampoline)
+ else if (msym.minsym != NULL
+ && MSYMBOL_TYPE (msym.minsym) == mst_solib_trampoline)
{
struct objfile *objfile;
struct minimal_symbol *msymbol;
{
if (MSYMBOL_TYPE (msymbol) == mst_text
&& strcmp (SYMBOL_LINKAGE_NAME (msymbol),
- SYMBOL_LINKAGE_NAME (msym)) == 0)
+ SYMBOL_LINKAGE_NAME (msym.minsym)) == 0)
{
function_found = 1;
break;
should be mst_text. So we need to fix the msym, and also
get out of this function. */
{
- MSYMBOL_TYPE (msym) = mst_text;
+ MSYMBOL_TYPE (msym.minsym) = mst_text;
return orig_pc == pc ? 0 : pc & ~0x3;
}
}
(curr_inst == 0xeaa0d000) ||
(curr_inst == 0xeaa0d002))
{
- struct minimal_symbol *stubsym, *libsym;
+ struct bound_minimal_symbol stubsym;
+ struct minimal_symbol *libsym;
stubsym = lookup_minimal_symbol_by_pc (loc);
- if (stubsym == NULL)
+ if (stubsym.minsym == NULL)
{
warning (_("Unable to find symbol for 0x%lx"), loc);
return orig_pc == pc ? 0 : pc & ~0x3;
}
- libsym = lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (stubsym),
+ libsym = lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (stubsym.minsym),
NULL, NULL);
if (libsym == NULL)
{
warning (_("Unable to find library symbol for %s."),
- SYMBOL_PRINT_NAME (stubsym));
+ SYMBOL_PRINT_NAME (stubsym.minsym));
return orig_pc == pc ? 0 : pc & ~0x3;
}
faddr = value_as_address (function);
- if (in_opd_section (faddr))
+ if (pc_in_section (faddr, ".opd"))
{
target_read_memory (faddr, buf, sizeof (buf));
return extract_unsigned_integer (&buf[24], 8, byte_order);
hppa_hpux_find_import_stub_for_addr (CORE_ADDR funcaddr)
{
struct objfile *objfile;
- struct minimal_symbol *funsym, *stubsym;
+ struct bound_minimal_symbol funsym;
+ struct minimal_symbol *stubsym;
CORE_ADDR stubaddr;
funsym = lookup_minimal_symbol_by_pc (funcaddr);
ALL_OBJFILES (objfile)
{
stubsym = lookup_minimal_symbol_solib_trampoline
- (SYMBOL_LINKAGE_NAME (funsym), objfile);
+ (SYMBOL_LINKAGE_NAME (funsym.minsym), objfile);
if (stubsym)
{
static void
hppa_hpux_supply_ss_narrow (struct regcache *regcache,
- int regnum, const char *save_state)
+ int regnum, const gdb_byte *save_state)
{
- const char *ss_narrow = save_state + HPPA_HPUX_SS_NARROW_OFFSET;
+ const gdb_byte *ss_narrow = save_state + HPPA_HPUX_SS_NARROW_OFFSET;
int i, offset = 0;
for (i = HPPA_R1_REGNUM; i < HPPA_FP0_REGNUM; i++)
static void
hppa_hpux_supply_ss_fpblock (struct regcache *regcache,
- int regnum, const char *save_state)
+ int regnum, const gdb_byte *save_state)
{
- const char *ss_fpblock = save_state + HPPA_HPUX_SS_FPBLOCK_OFFSET;
+ const gdb_byte *ss_fpblock = save_state + HPPA_HPUX_SS_FPBLOCK_OFFSET;
int i, offset = 0;
/* FIXME: We view the floating-point state as 64 single-precision
static void
hppa_hpux_supply_ss_wide (struct regcache *regcache,
- int regnum, const char *save_state)
+ int regnum, const gdb_byte *save_state)
{
- const char *ss_wide = save_state + HPPA_HPUX_SS_WIDE_OFFSET;
+ const gdb_byte *ss_wide = save_state + HPPA_HPUX_SS_WIDE_OFFSET;
int i, offset = 8;
if (register_size (get_regcache_arch (regcache), HPPA_R1_REGNUM) == 4)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- const char *proc_info = regs;
- const char *save_state = proc_info + 8;
+ const gdb_byte *proc_info = regs;
+ const gdb_byte *save_state = proc_info + 8;
ULONGEST flags;
flags = extract_unsigned_integer (save_state + HPPA_HPUX_SS_FLAGS_OFFSET,