/* 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
/* Address handling. */
static CORE_ADDR
-s390_addr_bits_remove (CORE_ADDR addr)
+s390_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
{
return addr & 0x7fffffff;
}
s390_address_class_type_flags (int byte_size, int dwarf2_addr_class)
{
if (byte_size == 4)
- return TYPE_FLAG_ADDRESS_CLASS_1;
+ return TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1;
else
return 0;
}
static const char *
s390_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
{
- if (type_flags & TYPE_FLAG_ADDRESS_CLASS_1)
+ if (type_flags & TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1)
return "mode32";
else
return NULL;
{
if (strcmp (name, "mode32") == 0)
{
- *type_flags_ptr = TYPE_FLAG_ADDRESS_CLASS_1;
+ *type_flags_ptr = TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1;
return 1;
}
else