static CORE_ADDR
arm_addr_bits_remove (CORE_ADDR val)
{
- if (arm_pc_is_thumb (val))
- return (val & (arm_apcs_32 ? 0xfffffffe : 0x03fffffe));
+ if (arm_apcs_32)
+ return (val & (arm_pc_is_thumb (val) ? 0xfffffffe : 0xfffffffc));
else
- return (val & (arm_apcs_32 ? 0xfffffffc : 0x03fffffc));
+ return (val & 0x03fffffc);
}
/* When reading symbols, we need to zap the low bit of the address,
if (USE_GENERIC_DUMMY_FRAMES
&& PC_IN_CALL_DUMMY (fi->pc, 0, 0))
{
- return generic_read_register_dummy (fi->pc, fi->frame, regnum);
+ return deprecated_read_register_dummy (fi->pc, fi->frame, regnum);
}
else if (fi->saved_regs[regnum] != 0)
{
&& PC_IN_CALL_DUMMY (fi->next->pc, 0, 0))
/* For generic dummy frames, pull the value direct from the frame.
Having an unwind function to do this would be nice. */
- sp = generic_read_register_dummy (fi->next->pc, fi->next->frame,
- ARM_SP_REGNUM);
+ sp = deprecated_read_register_dummy (fi->next->pc, fi->next->frame,
+ ARM_SP_REGNUM);
else
sp = (fi->next->frame - fi->next->extra_info->frameoffset
+ fi->next->extra_info->framesize);
fi->extra_info->frameoffset = 0;
}
- else if (PC_IN_CALL_DUMMY (fi->pc, sp, fi->frame))
+ else if (!USE_GENERIC_DUMMY_FRAMES
+ && PC_IN_CALL_DUMMY (fi->pc, sp, fi->frame))
{
CORE_ADDR rp;
CORE_ADDR callers_sp;
callers_sp = read_memory_integer (fi->saved_regs[ARM_SP_REGNUM],
REGISTER_RAW_SIZE (ARM_SP_REGNUM));
- fi->extra_info->framereg = ARM_FP_REGNUM;
+ if (arm_pc_is_thumb (fi->pc))
+ fi->extra_info->framereg = THUMB_FP_REGNUM;
+ else
+ fi->extra_info->framereg = ARM_FP_REGNUM;
fi->extra_info->framesize = callers_sp - sp;
fi->extra_info->frameoffset = fi->frame - sp;
}
/* If a dummy frame, pull the PC out of the frame's register buffer. */
if (USE_GENERIC_DUMMY_FRAMES
&& PC_IN_CALL_DUMMY (fi->pc, 0, 0))
- return generic_read_register_dummy (fi->pc, fi->frame, ARM_PC_REGNUM);
+ return deprecated_read_register_dummy (fi->pc, fi->frame, ARM_PC_REGNUM);
if (PC_IN_CALL_DUMMY (fi->pc, fi->frame - fi->extra_info->frameoffset,
fi->frame))
(if present) or emulator. */
static void
arm_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
- struct frame_info *frame)
+ struct frame_info *frame, const char *args)
{
register unsigned long status = read_register (ARM_FPS_REGNUM);
int type;
the address in which a function should return its structure value. */
static CORE_ADDR
-arm_extract_struct_value_address (char *regbuf)
+arm_extract_struct_value_address (struct regcache *regcache)
{
- return extract_address (regbuf, REGISTER_RAW_SIZE(ARM_A1_REGNUM));
+ ULONGEST ret;
+
+ regcache_cooked_read_unsigned (regcache, ARM_A1_REGNUM, &ret);
+ return ret;
}
/* Will a function return an aggregate type in memory or in a
}
\f
/* Return the ARM register name corresponding to register I. */
-static char *
+static const char *
arm_register_name (int i)
{
return arm_register_names[i];
set_gdbarch_push_return_address (gdbarch, arm_push_return_address);
#endif
- set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
+ set_gdbarch_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
set_gdbarch_push_arguments (gdbarch, arm_push_arguments);
set_gdbarch_coerce_float_to_double (gdbarch,
standard_coerce_float_to_double);
/* Returning results. */
set_gdbarch_deprecated_extract_return_value (gdbarch, arm_extract_return_value);
- set_gdbarch_store_return_value (gdbarch, arm_store_return_value);
+ set_gdbarch_deprecated_store_return_value (gdbarch, arm_store_return_value);
set_gdbarch_store_struct_return (gdbarch, arm_store_struct_return);
set_gdbarch_use_struct_convention (gdbarch, arm_use_struct_convention);
- set_gdbarch_deprecated_extract_struct_value_address (gdbarch,
+ set_gdbarch_extract_struct_value_address (gdbarch,
arm_extract_struct_value_address);
/* Single stepping. */