summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2004-09-07 15:53:50 +0000
committerJim Blandy <jimb@codesourcery.com>2004-09-07 15:53:50 +0000
commit3679d35cdcdca3fc255b47ce7d7e767a2b251bd8 (patch)
tree20384927957519c0db165246cd196b1811ca8803
parent7a45a4f881b4b89a9189a2452663750c4963b2aa (diff)
downloadgdb-3679d35cdcdca3fc255b47ce7d7e767a2b251bd8.tar.gz
* rs6000-tdep.c: #include "dwarf2-frame.h".
(rs6000_dwarf2_reg_to_regnum): Recognize 65 as another number for lr. (rs6000_gdbarch_init): Hook in dwarf2_frame_sniffer. * Makefile.in (rs6000-tdep.o): Update dependencies.
-rw-r--r--gdb/Makefile.in2
-rw-r--r--gdb/rs6000-tdep.c8
2 files changed, 9 insertions, 1 deletions
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 8ffe32fed77..5d439f0fdb6 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -2323,7 +2323,7 @@ rs6000-tdep.o: rs6000-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \
$(coff_xcoff_h) $(libxcoff_h) $(elf_bfd_h) $(solib_svr4_h) \
$(ppc_tdep_h) $(gdb_assert_h) $(dis_asm_h) $(trad_frame_h) \
$(frame_unwind_h) $(frame_base_h) $(infcall_h) $(sim_regno_h) \
- $(gdb_sim_ppc_h) $(reggroups_h)
+ $(gdb_sim_ppc_h) $(reggroups_h) $(dwarf2_frame_h)
s390-nat.o: s390-nat.c $(defs_h) $(tm_h) $(regcache_h) $(inferior_h) \
$(s390_tdep_h)
s390-tdep.o: s390-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) $(inferior_h) \
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 61e2ef1794f..871e9b4d0fd 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -40,6 +40,7 @@
#include "sim-regno.h"
#include "gdb/sim-ppc.h"
#include "reggroups.h"
+#include "dwarf2-frame.h"
#include "libbfd.h" /* for bfd_default_set_arch_mach */
#include "coff/internal.h" /* for libcoff.h */
@@ -2067,6 +2068,10 @@ rs6000_dwarf2_reg_to_regnum (int num)
else
switch (num)
{
+ /* FIXME: jimb/2004-09-02: I think it's a bug that GCC ever
+ emits this. But GCC 3.4 does use it in .debug_frame. */
+ case 65:
+ return tdep->ppc_lr_regnum;
case 67:
return tdep->ppc_vrsave_regnum - 1; /* vscr */
case 99:
@@ -3281,6 +3286,9 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Helpers for function argument information. */
set_gdbarch_fetch_pointer_argument (gdbarch, rs6000_fetch_pointer_argument);
+ /* Hook in the DWARF CFI frame unwinder. */
+ frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer);
+
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);