diff options
-rw-r--r-- | gdb/ChangeLog | 13 | ||||
-rw-r--r-- | gdb/arm-tdep.c | 4 | ||||
-rw-r--r-- | gdb/m32c-tdep.c | 2 | ||||
-rw-r--r-- | gdb/mep-tdep.c | 2 | ||||
-rw-r--r-- | gdb/mn10300-tdep.c | 2 | ||||
-rw-r--r-- | gdb/prologue-value.c | 5 | ||||
-rw-r--r-- | gdb/prologue-value.h | 7 | ||||
-rw-r--r-- | gdb/s390-tdep.c | 2 |
8 files changed, 26 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e4943294d6c..40a6a02b94a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,18 @@ 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 frame architecture instead of current_gdbarch. (mi_cmd_data_list_changed_registers): Likewise. diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index a1281d753c4..933a2242fea 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -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; diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c index 9fa672bffa4..10367b38b02 100644 --- a/gdb/m32c-tdep.c +++ b/gdb/m32c-tdep.c @@ -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 diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c index 7bc6ccd1a24..e3f78b03d23 100644 --- a/gdb/mep-tdep.c +++ b/gdb/mep-tdep.c @@ -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; diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index e2ca050b00e..d6322b146c8 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c @@ -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 diff --git a/gdb/prologue-value.c b/gdb/prologue-value.c index 25884cb204f..e4282e648df 100644 --- a/gdb/prologue-value.c +++ b/gdb/prologue-value.c @@ -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; } diff --git a/gdb/prologue-value.h b/gdb/prologue-value.h index 49226f3edc2..efbdfcf1ce0 100644 --- a/gdb/prologue-value.h +++ b/gdb/prologue-value.h @@ -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); diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index c7b1d7e3947..b309524b690 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -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 |