diff options
author | Carl E. Love <carll@oc4738070240.ibm.com> | 2016-08-24 08:08:58 -0700 |
---|---|---|
committer | Carl E. Love <carll@oc4738070240.ibm.com> | 2016-08-24 08:08:58 -0700 |
commit | bdd78711b4c1ae26dbc8c2a64f28abec3486ae6c (patch) | |
tree | 5505031e49340241e48a176d3562b6e08a774858 | |
parent | ab548d2db9ac35675d1b700ecbf007ae0cf3d83d (diff) | |
download | gdb-bdd78711b4c1ae26dbc8c2a64f28abec3486ae6c.zip gdb-bdd78711b4c1ae26dbc8c2a64f28abec3486ae6c.tar.gz gdb-bdd78711b4c1ae26dbc8c2a64f28abec3486ae6c.tar.bz2 |
Fix for gdb.base/pc-fp.exp.
It is my understanding that GDB used to require each architecture to
define a Frame Pointer (fp). However, this functionality was deprecated
some time ago so the call to setup the fp_reg was changed to deprecated
(set_gdbarch_deprecated_fp_regnum). It should have been removed from the
Power code.
That said, the code "set_gdbarch_deprecated_fp_regnum
(gdbarch, PPC_R0_REGNUM + 1);" sets up register r1 as the frame pointer.
Register r1 is no longer used to hold the frame pointer on Power. By
removing the fp definition for Power in GDB, it causes GDB to fall back
to the call get_frame_base_address (frame) which returns the correct value
depending on the specific senario but most of the time is the DWARF
canonical frame address.
gdb/ChangeLog
2016-08-24 Carl Love <cel@us.ibm.com>
* rs6000-tdep.c (rs6000_gdbarch_init): Remove call
set_gdbarch_deprecated_fp_regnum() from initialization function.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/rs6000-tdep.c | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 85de2e4..229a62b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2016-08-24 Carl Love <cel@us.ibm.com> + + * rs6000-tdep.c (rs6000_gdbarch_init): Remove call + set_gdbarch_deprecated_fp_regnum() architecture + initialization function. + 2016-08-23 Simon Marchi <simon.marchi@ericsson.com> * stack.c (parse_frame_specification): Fix typo in comment. diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index eb12c5d..e180641 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -5957,7 +5957,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_pc_regnum (gdbarch, PPC_PC_REGNUM); set_gdbarch_sp_regnum (gdbarch, PPC_R0_REGNUM + 1); - set_gdbarch_deprecated_fp_regnum (gdbarch, PPC_R0_REGNUM + 1); set_gdbarch_fp0_regnum (gdbarch, tdep->ppc_fp0_regnum); set_gdbarch_register_sim_regno (gdbarch, rs6000_register_sim_regno); |