-hppa32_hpux_in_solib_call_trampoline (CORE_ADDR pc, char *name)
+hppa32_hpux_in_solib_call_trampoline (struct gdbarch *gdbarch,
+ CORE_ADDR pc, char *name)
/* Does it look like a bl? If so then it's the call path, if
we find a bv or be first, then we're on the return path. */
/* Does it look like a bl? If so then it's the call path, if
we find a bv or be first, then we're on the return path. */
-hppa64_hpux_in_solib_call_trampoline (CORE_ADDR pc, char *name)
+hppa64_hpux_in_solib_call_trampoline (struct gdbarch *gdbarch,
+ CORE_ADDR pc, char *name)
/* PA64 has a completely different stub/trampoline scheme. Is it
better? Maybe. It's certainly harder to determine with any
certainty that we are in a stub because we can not refer to the
/* PA64 has a completely different stub/trampoline scheme. Is it
better? Maybe. It's certainly harder to determine with any
certainty that we are in a stub because we can not refer to the
if ((insn & 0xffffc00e) != 0x53610000)
return 0;
/* Now verify each insn in the range looks like a stub instruction. */
if ((insn & 0xffffc00e) != 0x53610000)
return 0;
/* Now verify each insn in the range looks like a stub instruction. */
if ((insn & 0xffffffff) != 0xe820d000)
return 0;
/* Now verify each insn in the range looks like a stub instruction. */
if ((insn & 0xffffffff) != 0xe820d000)
return 0;
/* Now verify each insn in the range looks like a stub instruction. */
-hppa_hpux_in_solib_return_trampoline (CORE_ADDR pc, char *name)
+hppa_hpux_in_solib_return_trampoline (struct gdbarch *gdbarch,
+ CORE_ADDR pc, char *name)
struct unwind_table_entry *u;
/* Get the unwind descriptor corresponding to PC, return zero
struct unwind_table_entry *u;
/* Get the unwind descriptor corresponding to PC, return zero
/* Does it look like a bl? If so then it's the call path, if
we find a bv or be first, then we're on the return path. */
/* Does it look like a bl? If so then it's the call path, if
we find a bv or be first, then we're on the return path. */
hppa_hpux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
{
struct gdbarch *gdbarch = get_frame_arch (frame);
hppa_hpux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
{
struct gdbarch *gdbarch = get_frame_arch (frame);
long orig_pc = pc;
long prev_inst, curr_inst, loc;
struct minimal_symbol *msym;
long orig_pc = pc;
long prev_inst, curr_inst, loc;
struct minimal_symbol *msym;
the PLT entry for this function, not the address of the function
itself. Bit 31 has meaning too, but only for MPE. */
if (pc & 0x2)
the PLT entry for this function, not the address of the function
itself. Bit 31 has meaning too, but only for MPE. */
if (pc & 0x2)
- pc = (CORE_ADDR) read_memory_integer
- (pc & ~0x3, gdbarch_ptr_bit (gdbarch) / 8);
+ pc = (CORE_ADDR) read_memory_integer (pc & ~0x3, word_size, byte_order);
}
if (pc == hppa_symbol_address("$$dyncall_external"))
{
pc = (CORE_ADDR) get_frame_register_unsigned (frame, 22);
}
if (pc == hppa_symbol_address("$$dyncall_external"))
{
pc = (CORE_ADDR) get_frame_register_unsigned (frame, 22);
- pc = (CORE_ADDR) read_memory_integer
- (pc & ~0x3, gdbarch_ptr_bit (gdbarch) / 8);
+ pc = (CORE_ADDR) read_memory_integer (pc & ~0x3, word_size, byte_order);
}
else if (pc == hppa_symbol_address("_sr4export"))
pc = (CORE_ADDR) get_frame_register_unsigned (frame, 22);
}
else if (pc == hppa_symbol_address("_sr4export"))
pc = (CORE_ADDR) get_frame_register_unsigned (frame, 22);
/* Does it look like a branch external using %r1? Then it's the
branch from the stub to the actual function. */
/* Does it look like a branch external using %r1? Then it's the
branch from the stub to the actual function. */
{
return (read_memory_integer
(get_frame_register_unsigned (frame, HPPA_SP_REGNUM) - 24,
{
return (read_memory_integer
(get_frame_register_unsigned (frame, HPPA_SP_REGNUM) - 24,
mtsp %r1,%sr0 if we want to do sanity checking. */
return (read_memory_integer
(get_frame_register_unsigned (frame, HPPA_SP_REGNUM) - 24,
mtsp %r1,%sr0 if we want to do sanity checking. */
return (read_memory_integer
(get_frame_register_unsigned (frame, HPPA_SP_REGNUM) - 24,
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
struct hppa_hpux_sigtramp_unwind_cache *info;
unsigned int flag;
CORE_ADDR sp, scptr, off;
struct hppa_hpux_sigtramp_unwind_cache *info;
unsigned int flag;
CORE_ADDR sp, scptr, off;
if ((insn & 0xffe0e000) == 0xe8400000)
u = find_unwind_entry(u->region_start + hppa_extract_17 (insn) + 8);
}
if ((insn & 0xffe0e000) == 0xe8400000)
u = find_unwind_entry(u->region_start + hppa_extract_17 (insn) + 8);
}
if (in_opd_section (faddr))
{
target_read_memory (faddr, buf, sizeof (buf));
if (in_opd_section (faddr))
{
target_read_memory (faddr, buf, sizeof (buf));
-hppa_hpux_search_pattern (CORE_ADDR start, CORE_ADDR end,
+hppa_hpux_search_pattern (struct gdbarch *gdbarch,
+ CORE_ADDR start, CORE_ADDR end,
read_memory (start, buf, num_insns * HPPA_INSN_SIZE);
for (i = 0; i < num_insns; i++, buf += HPPA_INSN_SIZE)
read_memory (start, buf, num_insns * HPPA_INSN_SIZE);
for (i = 0; i < num_insns; i++, buf += HPPA_INSN_SIZE)
- addr = hppa_hpux_search_pattern (u->region_start, u->region_end,
+ addr = hppa_hpux_search_pattern (gdbarch,
+ u->region_start, u->region_end,
- addr = hppa_hpux_search_pattern (u->region_start, u->region_end,
+ addr = hppa_hpux_search_pattern (gdbarch,
+ u->region_start, u->region_end,
find_pc_partial_function (addr, NULL, &start, &end);
if (start != 0 && end != 0)
{
find_pc_partial_function (addr, NULL, &start, &end);
if (start != 0 && end != 0)
{
- addr = hppa_hpux_search_pattern (start, end, ldsid_pattern,
+ addr = hppa_hpux_search_pattern (gdbarch, start, end, ldsid_pattern,
- insn = extract_unsigned_integer (buf + offset, HPPA_INSN_SIZE);
+ insn = extract_unsigned_integer (buf + offset,
+ HPPA_INSN_SIZE, byte_order);
if (insn == 0xe840d002) /* bve,n (rp) */
{
addr = (end - sizeof (buf)) + offset;
if (insn == 0xe840d002) /* bve,n (rp) */
{
addr = (end - sizeof (buf)) + offset;
/* Note: we don't want to pass a function descriptor here; push_dummy_call
fills in the PIC register for us. */
/* Note: we don't want to pass a function descriptor here; push_dummy_call
fills in the PIC register for us. */
struct regcache *regcache,
int regnum, const void *regs, size_t len)
{
struct regcache *regcache,
int regnum, const void *regs, size_t len)
{
- store_unsigned_integer (buf, size, flags);
+ store_unsigned_integer (buf, size, byte_order, flags);
trad_frame_set_value (saved_regs, HPPA_PCOQ_HEAD_REGNUM, stubpc);
}
else if (hppa_symbol_address ("__gcc_plt_call")
== get_pc_function_start (pcoq_head))
{
trad_frame_set_value (saved_regs, HPPA_PCOQ_HEAD_REGNUM, stubpc);
}
else if (hppa_symbol_address ("__gcc_plt_call")
== get_pc_function_start (pcoq_head))
{
- stubpc = read_memory_integer
- (base - 8, gdbarch_ptr_bit (gdbarch) / 8);
+ stubpc = read_memory_integer (base - 8, word_size, byte_order);