/* Target-dependent code for the HP PA-RISC architecture.
- Copyright (C) 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
- 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010,
- 2011 Free Software Foundation, Inc.
+ Copyright (C) 1986-1987, 1989-1996, 1998-2005, 2007-2012 Free
+ Software Foundation, Inc.
Contributed by the Center for Software Science at the
University of Utah (pa-gdb-bugs@cs.utah.edu).
unsigned long status;
unsigned int inst;
char buf[4];
- int off;
status = target_read_memory (pc, buf, 4);
if (status != 0)
/* Handle 32/64-bit struct return conventions. */
static enum return_value_convention
-hppa32_return_value (struct gdbarch *gdbarch, struct type *func_type,
+hppa32_return_value (struct gdbarch *gdbarch, struct value *function,
struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
{
}
static enum return_value_convention
-hppa64_return_value (struct gdbarch *gdbarch, struct type *func_type,
+hppa64_return_value (struct gdbarch *gdbarch, struct value *function,
struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
{
{
struct symtab_and_line sal;
CORE_ADDR func_addr, func_end;
- struct symbol *f;
/* If we can not find the symbol in the partial symbol table, then
there is no hope we can determine the function's start address
static CORE_ADDR
hppa_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
- unsigned long inst;
- int offset;
CORE_ADDR post_prologue_pc;
- char buf[4];
/* See if we can determine the end of the prologue via the symbol table.
If so, then return either PC, or the PC after the prologue, whichever
struct hppa_frame_cache *cache;
long saved_gr_mask;
long saved_fr_mask;
- CORE_ADDR this_sp;
long frame_size;
struct unwind_table_entry *u;
CORE_ADDR prologue_end;
static const struct frame_unwind hppa_frame_unwind =
{
NORMAL_FRAME,
+ default_frame_unwind_stop_reason,
hppa_frame_this_id,
hppa_frame_prev_register,
NULL,
static const struct frame_unwind hppa_fallback_frame_unwind =
{
NORMAL_FRAME,
+ default_frame_unwind_stop_reason,
hppa_fallback_frame_this_id,
hppa_fallback_frame_prev_register,
NULL,
static const struct frame_unwind hppa_stub_frame_unwind = {
NORMAL_FRAME,
+ default_frame_unwind_stop_reason,
hppa_stub_frame_this_id,
hppa_stub_frame_prev_register,
NULL,
return get_frame_register_unsigned (frame, HPPA_R0_REGNUM + 26 - argi);
}
-static void
+static enum register_status
hppa_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
int regnum, gdb_byte *buf)
{
- enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- ULONGEST tmp;
+ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+ ULONGEST tmp;
+ enum register_status status;
- regcache_raw_read_unsigned (regcache, regnum, &tmp);
- if (regnum == HPPA_PCOQ_HEAD_REGNUM || regnum == HPPA_PCOQ_TAIL_REGNUM)
- tmp &= ~0x3;
- store_unsigned_integer (buf, sizeof tmp, byte_order, tmp);
+ status = regcache_raw_read_unsigned (regcache, regnum, &tmp);
+ if (status == REG_VALID)
+ {
+ if (regnum == HPPA_PCOQ_HEAD_REGNUM || regnum == HPPA_PCOQ_TAIL_REGNUM)
+ tmp &= ~0x3;
+ store_unsigned_integer (buf, sizeof tmp, byte_order, tmp);
+ }
+ return status;
}
static CORE_ADDR