Use it instead of address bits of current_gdbarch.
* prologue-value.c (make_pv_area): Add ADDR_BIT argument.
* arm-tdep.c (thumb_analyze_prologue): Pass address bits to
make_pv_area.
(arm_scan_prologue): Likewise.
* m32c-tdep.c (m32c_analyze_prologue): Likewise.
* mep-tdep.c (mep_analyze_prologue): Likewise.
* mn10300-tdep.c (mn10300_analyze_prologue): Likewise.
* s390-tdep.c (s390_analyze_prologue): Likewise.
+2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * prologue-value.c (make_pv_area): Add ADDR_BIT argument.
+ Use it instead of address bits of current_gdbarch.
+ * prologue-value.c (make_pv_area): Add ADDR_BIT argument.
+ * arm-tdep.c (thumb_analyze_prologue): Pass address bits to
+ make_pv_area.
+ (arm_scan_prologue): Likewise.
+ * m32c-tdep.c (m32c_analyze_prologue): Likewise.
+ * mep-tdep.c (mep_analyze_prologue): Likewise.
+ * mn10300-tdep.c (mn10300_analyze_prologue): Likewise.
+ * s390-tdep.c (s390_analyze_prologue): Likewise.
+
2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
* mi/mi-main.c (mi_cmd_data_list_register_names): Use selected
for (i = 0; i < 16; i++)
regs[i] = pv_register (i, 0);
- stack = make_pv_area (ARM_SP_REGNUM);
+ stack = make_pv_area (ARM_SP_REGNUM, gdbarch_addr_bit (gdbarch));
back_to = make_cleanup_free_pv_area (stack);
while (start < limit)
for (regno = 0; regno < ARM_FPS_REGNUM; regno++)
regs[regno] = pv_register (regno, 0);
- stack = make_pv_area (ARM_SP_REGNUM);
+ stack = make_pv_area (ARM_SP_REGNUM, gdbarch_addr_bit (gdbarch));
back_to = make_cleanup_free_pv_area (stack);
for (current_pc = prologue_start;
st.fb = pv_register (tdep->fb->num, 0);
st.sp = pv_register (tdep->sp->num, 0);
st.pc = pv_register (tdep->pc->num, 0);
- st.stack = make_pv_area (tdep->sp->num);
+ st.stack = make_pv_area (tdep->sp->num, gdbarch_addr_bit (arch));
back_to = make_cleanup_free_pv_area (st.stack);
/* Record that the call instruction has saved the return address on
result->reg_offset[rn] = 1;
}
- stack = make_pv_area (MEP_SP_REGNUM);
+ stack = make_pv_area (MEP_SP_REGNUM, gdbarch_addr_bit (gdbarch));
back_to = make_cleanup_free_pv_area (stack);
pc = start_pc;
regs[rn] = pv_register (rn, 0);
result->reg_offset[rn] = 1;
}
- stack = make_pv_area (E_SP_REGNUM);
+ stack = make_pv_area (E_SP_REGNUM, gdbarch_addr_bit (gdbarch));
back_to = make_cleanup_free_pv_area (stack);
/* The typical call instruction will have saved the return address on the
struct pv_area *
-make_pv_area (int base_reg)
+make_pv_area (int base_reg, int addr_bit)
{
struct pv_area *a = (struct pv_area *) xmalloc (sizeof (*a));
/* Remember that shift amounts equal to the type's width are
undefined. */
- a->addr_mask = ((((CORE_ADDR) 1
- << (gdbarch_addr_bit (current_gdbarch) - 1)) - 1) << 1) | 1;
+ a->addr_mask = ((((CORE_ADDR) 1 << (addr_bit - 1)) - 1) << 1) | 1;
return a;
}
Stores to constant addresses, unknown addresses, or to addresses
relative to registers other than BASE_REG will trash this area; see
- pv_area_store_would_trash. */
-struct pv_area *make_pv_area (int base_reg);
+ pv_area_store_would_trash.
+
+ To check whether a pointer refers to this area, only the low
+ ADDR_BIT bits will be compared. */
+struct pv_area *make_pv_area (int base_reg, int addr_bit);
/* Free AREA. */
void free_pv_area (struct pv_area *area);
{
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