diff options
author | Markus Deuling <deuling@de.ibm.com> | 2007-11-07 06:58:31 +0000 |
---|---|---|
committer | Markus Deuling <deuling@de.ibm.com> | 2007-11-07 06:58:31 +0000 |
commit | a54fba4c5d04f2584c3fb523fca898bb2a9b9e3a (patch) | |
tree | 8a961009fbc8856d24bc78454a4501f77b66466c /gdb/arch-utils.c | |
parent | 9970f04b039f5b71319c17f15231b15d23bed38a (diff) | |
download | binutils-gdb-a54fba4c5d04f2584c3fb523fca898bb2a9b9e3a.tar.gz |
2007-11-07 Markus Deuling <deuling@de.ibm.com>
* gdbarch.sh (legacy_virtual_frame_pointer): Add gdbarch parameter.
* gdbarch.{c,h}: Regenerate.
* arch-utils.c (legacy_virtual_frame_pointer): Add gdbarch parameter.
Replace current_gdbarch by gdbarch.
* m32c-tdep.c (m32c_virtual_frame_pointer): Likewise.
* mips-tdep.c (mips_virtual_frame_pointer): Likewise.
* spu-tdep.c (spu_virtual_frame_pointer): Likewise.
Diffstat (limited to 'gdb/arch-utils.c')
-rw-r--r-- | gdb/arch-utils.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 4ef616ae711..c75e10bb8ed 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -135,7 +135,8 @@ cannot_register_not (int regnum) raw. */ void -legacy_virtual_frame_pointer (CORE_ADDR pc, +legacy_virtual_frame_pointer (struct gdbarch *gdbarch, + CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset) { @@ -144,14 +145,14 @@ legacy_virtual_frame_pointer (CORE_ADDR pc, register and an offset can determine this. I think it should instead generate a byte code expression as that would work better with things like Dwarf2's CFI. */ - if (gdbarch_deprecated_fp_regnum (current_gdbarch) >= 0 - && gdbarch_deprecated_fp_regnum (current_gdbarch) - < gdbarch_num_regs (current_gdbarch)) - *frame_regnum = gdbarch_deprecated_fp_regnum (current_gdbarch); - else if (gdbarch_sp_regnum (current_gdbarch) >= 0 - && gdbarch_sp_regnum (current_gdbarch) - < gdbarch_num_regs (current_gdbarch)) - *frame_regnum = gdbarch_sp_regnum (current_gdbarch); + if (gdbarch_deprecated_fp_regnum (gdbarch) >= 0 + && gdbarch_deprecated_fp_regnum (gdbarch) + < gdbarch_num_regs (gdbarch)) + *frame_regnum = gdbarch_deprecated_fp_regnum (gdbarch); + else if (gdbarch_sp_regnum (gdbarch) >= 0 + && gdbarch_sp_regnum (gdbarch) + < gdbarch_num_regs (gdbarch)) + *frame_regnum = gdbarch_sp_regnum (gdbarch); else /* Should this be an internal error? I guess so, it is reflecting an architectural limitation in the current design. */ |