This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] Enable CFI for mips
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Date: Sat, 28 Apr 2007 16:45:31 -0400
- Subject: [patch] Enable CFI for mips
As it says, enable CFI for MIPS. Tested on mips64-linux o32 / n32 /
n64. I plan to apply this after the previous two patches, unless
someone knows of other problems with it.
It fixes linux-dp.exp in the testsuite, which tries to backtrace from
nanosleep; gdb's prologue unwinder can not handle the N32 or N64
cancellable syscall wrappers.
--
Daniel Jacobowitz
CodeSourcery
2007-04-28 Daniel Jacobowitz <dan@codesourcery.com>
* Makefile.in (mips-tdep.o): Update.
* mips-tdep.c (mips_gdbarch_init): Register the dwarf2 CFI
unwinder.
---
Makefile.in | 3 ++-
mips-tdep.c | 3 +++
2 files changed, 5 insertions(+), 1 deletion(-)
Index: gdb/mips-tdep.c
===================================================================
--- gdb.orig/mips-tdep.c 2007-04-28 10:49:36.000000000 -0400
+++ gdb/mips-tdep.c 2007-04-28 10:50:57.000000000 -0400
@@ -57,6 +57,7 @@
#include "floatformat.h"
#include "remote.h"
#include "target-descriptions.h"
+#include "dwarf2-frame.h"
static const struct objfile_data *mips_pdr_data;
@@ -5237,9 +5238,11 @@ mips_gdbarch_init (struct gdbarch_info i
gdbarch_init_osabi (info, gdbarch);
/* Unwind the frame. */
+ frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer);
frame_unwind_append_sniffer (gdbarch, mips_stub_frame_sniffer);
frame_unwind_append_sniffer (gdbarch, mips_insn16_frame_sniffer);
frame_unwind_append_sniffer (gdbarch, mips_insn32_frame_sniffer);
+ frame_base_append_sniffer (gdbarch, dwarf2_frame_base_sniffer);
frame_base_append_sniffer (gdbarch, mips_stub_frame_base_sniffer);
frame_base_append_sniffer (gdbarch, mips_insn16_frame_base_sniffer);
frame_base_append_sniffer (gdbarch, mips_insn32_frame_base_sniffer);
Index: gdb/Makefile.in
===================================================================
--- gdb.orig/Makefile.in 2007-04-28 16:43:09.000000000 -0400
+++ gdb/Makefile.in 2007-04-28 16:43:25.000000000 -0400
@@ -2365,7 +2365,8 @@ mips-tdep.o: mips-tdep.c $(defs_h) $(gdb
$(block_h) $(reggroups_h) $(opcode_mips_h) $(elf_mips_h) \
$(elf_bfd_h) $(symcat_h) $(sim_regno_h) $(dis_asm_h) \
$(frame_unwind_h) $(frame_base_h) $(trad_frame_h) $(infcall_h) \
- $(floatformat_h) $(remote_h) $(target_descriptions_h)
+ $(floatformat_h) $(remote_h) $(target_descriptions_h) \
+ $(dwarf2_frame_h)
memory-map.o: memory-map.c $(defs_h) $(memory_map_h) $(xml_support_h) \
$(gdb_assert_h) $(exceptions_h) $(gdb_string_h)
mn10300-linux-tdep.o: mn10300-linux-tdep.c $(defs_h) $(gdbcore_h) \