/* Target-dependent code for GDB, the GNU debugger.
- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Contributed by D.J. Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com)
s390_register_type (struct gdbarch *gdbarch, int regnum)
{
if (regnum == S390_PSWM_REGNUM || regnum == S390_PSWA_REGNUM)
- return builtin_type_long;
+ return builtin_type (gdbarch)->builtin_long;
if (regnum >= S390_R0_REGNUM && regnum <= S390_R15_REGNUM)
- return builtin_type_long;
+ return builtin_type (gdbarch)->builtin_long;
if (regnum >= S390_A0_REGNUM && regnum <= S390_A15_REGNUM)
- return builtin_type_int;
+ return builtin_type (gdbarch)->builtin_int;
if (regnum == S390_FPC_REGNUM)
- return builtin_type_int;
+ return builtin_type (gdbarch)->builtin_int;
if (regnum >= S390_F0_REGNUM && regnum <= S390_F15_REGNUM)
- return builtin_type_double;
+ return builtin_type (gdbarch)->builtin_double;
if (regnum == S390_PC_REGNUM)
- return builtin_type_void_func_ptr;
+ return builtin_type (gdbarch)->builtin_func_ptr;
if (regnum == S390_CC_REGNUM)
- return builtin_type_int;
+ return builtin_type (gdbarch)->builtin_int;
internal_error (__FILE__, __LINE__, _("invalid regnum"));
}
/* Return the appropriate register set for the core section identified
by SECT_NAME and SECT_SIZE. */
-const struct regset *
+static const struct regset *
s390_regset_from_core_section (struct gdbarch *gdbarch,
const char *sect_name, size_t sect_size)
{
we're analyzing the code to unwind past that frame. */
if (pv_is_constant (addr))
{
- struct section_table *secp;
+ struct target_section *secp;
secp = target_section_by_addr (¤t_target, addr.k);
if (secp != NULL
&& (bfd_get_section_flags (secp->bfd, secp->the_bfd_section)
{
int i;
- data->stack = make_pv_area (S390_SP_REGNUM);
+ data->stack = make_pv_area (S390_SP_REGNUM, gdbarch_addr_bit (gdbarch));
/* For the purpose of prologue tracking, we consider the GPR size to
be equal to the ABI word size, even if it is actually larger
CORE_ADDR prev_sp;
int frame_pointer;
int size;
+ struct frame_info *next_frame;
/* Try to find the function start address. If we can't find it, we don't
bother searching for it -- with modern compilers this would be mostly
/* FIXME: cagney/2004-05-01: This sanity check shouldn't be
needed, instead the code should simpliy rely on its
analysis. */
- if (get_next_frame (this_frame)
+ next_frame = get_next_frame (this_frame);
+ while (next_frame && get_frame_type (next_frame) == INLINE_FRAME)
+ next_frame = get_next_frame (next_frame);
+ if (next_frame
&& get_frame_type (get_next_frame (this_frame)) == NORMAL_FRAME)
return 0;
This can only happen in an innermost frame. */
/* FIXME: cagney/2004-05-01: This sanity check shouldn't be needed,
instead the code should simpliy rely on its analysis. */
+ next_frame = get_next_frame (this_frame);
+ while (next_frame && get_frame_type (next_frame) == INLINE_FRAME)
+ next_frame = get_next_frame (next_frame);
if (size > 0
- && (!get_next_frame (this_frame)
+ && (next_frame == NULL
|| get_frame_type (get_next_frame (this_frame)) != NORMAL_FRAME))
{
/* See the comment in s390_in_function_epilogue_p on why this is