From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32305 invoked by alias); 30 Dec 2011 16:54:08 -0000 Received: (qmail 32296 invoked by uid 22791); 30 Dec 2011 16:54:04 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,TW_QE X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 30 Dec 2011 16:53:49 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1RgfiG-0006aJ-Qw from Tom_deVries@mentor.com for libc-ports@sources.redhat.com; Fri, 30 Dec 2011 08:53:48 -0800 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Fri, 30 Dec 2011 08:53:48 -0800 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Fri, 30 Dec 2011 16:53:46 +0000 Message-ID: <4EFDEC96.7090204@mentor.com> Date: Fri, 30 Dec 2011 16:54:00 -0000 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Lightning/1.0b2 Thunderbird/3.1.15 MIME-Version: 1.0 To: Subject: [MIPS] Use ia64 backtrace.c. Content-Type: multipart/mixed; boundary="------------060309030602010605050206" Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2011-12/txt/msg00052.txt.bz2 --------------060309030602010605050206 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Content-length: 473 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 --------------060309030602010605050206 Content-Type: text/x-patch; name="glibc-mips-backtrace-include-ia64.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="glibc-mips-backtrace-include-ia64.patch" Content-length: 721 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 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 --------------060309030602010605050206--