This is the mail archive of the mailing list for the libc-ports project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[MIPS] Use ia64 backtrace.c.


currently for MIPS we use the default backtrace function defined in

Attached patch for glibc-ports instead uses the backtrace function defined in
glibc/sysdeps/ia64/backtrace.c, just as is done for sh, x86_64, tile and alpha.

The ia64 backtrace.c uses libgcc's unwind_backtrace, which allows it to give a
backtrace even with -fomit-frame-pointer.

I tested the patch on MIPS qemu (mips-linux-gnu) with host i686-pc-linux-gnu.

- Tom
2011-12-20  Tom de Vries  <>

	* sysdeps/mips/backtrace.c: New file, including ia64 backtrace.c.
	* sysdeps/mips/Makefile: Compile backtrace.c with -funwind-tables.

diff --git a/sysdeps/mips/Makefile b/sysdeps/mips/Makefile
index 9d01522..b7e5e61 100644
--- a/sysdeps/mips/Makefile
+++ b/sysdeps/mips/Makefile
@@ -11,4 +11,8 @@ ifeq ($(subdir),rt)
 librt-sysdep_routines += rt-sysdep
+ifeq ($(subdir),debug)
+CFLAGS-backtrace.c += -funwind-tables
 ASFLAGS-.os += $(pic-ccflag)
diff --git a/sysdeps/mips/backtrace.c b/sysdeps/mips/backtrace.c
new file mode 100644
index 0000000..2970294
--- /dev/null
+++ b/sysdeps/mips/backtrace.c
@@ -0,0 +1 @@
+#include <sysdeps/ia64/backtrace.c>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]