* [MIPS] Use ia64 backtrace.c.
@ 2011-12-30 16:54 Tom de Vries
2012-01-03 16:26 ` Joseph S. Myers
0 siblings, 1 reply; 2+ messages in thread
From: Tom de Vries @ 2011-12-30 16:54 UTC (permalink / raw)
To: libc-ports
[-- Attachment #1: Type: text/plain, Size: 473 bytes --]
Hi,
currently for MIPS we use the default backtrace function defined in
glibc/debug/backtrace.c.
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.
Thanks,
- Tom
[-- Attachment #2: glibc-mips-backtrace-include-ia64.patch --]
[-- Type: text/x-patch, Size: 721 bytes --]
2011-12-20 Tom de Vries <tom@codesourcery.com>
* 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
endif
+ifeq ($(subdir),debug)
+CFLAGS-backtrace.c += -funwind-tables
+endif
+
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [MIPS] Use ia64 backtrace.c.
2011-12-30 16:54 [MIPS] Use ia64 backtrace.c Tom de Vries
@ 2012-01-03 16:26 ` Joseph S. Myers
0 siblings, 0 replies; 2+ messages in thread
From: Joseph S. Myers @ 2012-01-03 16:26 UTC (permalink / raw)
To: Tom de Vries; +Cc: libc-ports
Thanks. I've committed this patch. Note that
<http://sourceware.org/ml/libc-hacker/2011-12/msg00001.html> proposes
moving ia64 from libc to ports, in which case other architectures will
become the canonical home of all files from ia64 that are included by any
other libc architecture - probably x86_64 will become canonical in this
case (there's also wordexp.c, sigpending.c and sigprocmask.c). (For
backtrace.c it might actually be better for the ia64 version to replace
the debug/backtrace.c version.)
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-03 16:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-30 16:54 [MIPS] Use ia64 backtrace.c Tom de Vries
2012-01-03 16:26 ` Joseph S. Myers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).