* 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.
This commit is contained in:
Ulrich Weigand 2009-06-17 18:39:13 +00:00
parent 7ccb0be954
commit 55f960e1d2
8 changed files with 26 additions and 11 deletions

View File

@ -1,3 +1,16 @@
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

View File

@ -395,7 +395,7 @@ thumb_analyze_prologue (struct gdbarch *gdbarch,
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)
@ -862,7 +862,7 @@ arm_scan_prologue (struct frame_info *this_frame,
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;

View File

@ -1541,7 +1541,7 @@ m32c_analyze_prologue (struct gdbarch *arch,
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

View File

@ -1691,7 +1691,7 @@ mep_analyze_prologue (struct gdbarch *gdbarch,
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;

View File

@ -399,7 +399,7 @@ mn10300_analyze_prologue (struct gdbarch *gdbarch,
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

View File

@ -314,7 +314,7 @@ struct pv_area
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));
@ -325,8 +325,7 @@ make_pv_area (int base_reg)
/* 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;
}

View File

@ -229,8 +229,11 @@ struct pv_area;
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);

View File

@ -857,7 +857,7 @@ s390_analyze_prologue (struct gdbarch *gdbarch,
{
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