/* Target-dependent code for the HP PA-RISC architecture.
- Copyright (C) 1986-2019 Free Software Foundation, Inc.
+ Copyright (C) 1986-2020 Free Software Foundation, Inc.
Contributed by the Center for Software Science at the
University of Utah (pa-gdb-bugs@cs.utah.edu).
if (size > 0)
{
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
+ struct gdbarch *gdbarch = objfile->arch ();
unsigned long tmp;
unsigned i;
char *buf = (char *) alloca (size);
struct hppa_unwind_info *ui;
struct hppa_objfile_private *obj_private;
- text_offset = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+ text_offset = objfile->text_section_offset ();
ui = (struct hppa_unwind_info *) obstack_alloc (&objfile->objfile_obstack,
sizeof (struct hppa_unwind_info));
store_unsigned_integer (param_val, 4, byte_order,
struct_end - struct_ptr);
}
- else if (TYPE_CODE (type) == TYPE_CODE_INT
- || TYPE_CODE (type) == TYPE_CODE_ENUM)
+ else if (type->code () == TYPE_CODE_INT
+ || type->code () == TYPE_CODE_ENUM)
{
/* Integer value store, right aligned. "unpack_long"
takes care of any sign-extension problems. */
unpack_long (type,
value_contents (arg)));
}
- else if (TYPE_CODE (type) == TYPE_CODE_FLT)
+ else if (type->code () == TYPE_CODE_FLT)
{
/* Floating point value store, right aligned. */
param_len = align_up (TYPE_LENGTH (type), 4);
static int
hppa64_integral_or_pointer_p (const struct type *type)
{
- switch (TYPE_CODE (type))
+ switch (type->code ())
{
case TYPE_CODE_INT:
case TYPE_CODE_BOOL:
static int
hppa64_floating_p (const struct type *type)
{
- switch (TYPE_CODE (type))
+ switch (type->code ())
{
case TYPE_CODE_FLT:
{
/* If we are passing a function pointer, make sure we pass a function
descriptor instead of the function entry address. */
- if (TYPE_CODE (type) == TYPE_CODE_PTR
- && TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_FUNC)
+ if (type->code () == TYPE_CODE_PTR
+ && TYPE_TARGET_TYPE (type)->code () == TYPE_CODE_FUNC)
{
ULONGEST codeptr, fptr;
/* The value always lives in the right hand end of the register
(or register pair)? */
int b;
- int reg = TYPE_CODE (type) == TYPE_CODE_FLT ? HPPA_FP4_REGNUM : 28;
+ int reg = type->code () == TYPE_CODE_FLT ? HPPA_FP4_REGNUM : 28;
int part = TYPE_LENGTH (type) % 4;
/* The left hand register contains only part of the value,
transfer that first so that the rest can be xfered as entire
return align_up (addr, 16);
}
-CORE_ADDR
+static CORE_ADDR
hppa_read_pc (readable_regcache *regcache)
{
ULONGEST ipsw;
fprintf_unfiltered (file, "elf = %s\n", tdep->is_elf ? "yes" : "no");
}
+void _initialize_hppa_tdep ();
void
-_initialize_hppa_tdep (void)
+_initialize_hppa_tdep ()
{
gdbarch_register (bfd_arch_hppa, hppa_gdbarch_init, hppa_dump_tdep);