From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 33423 invoked by alias); 9 Mar 2016 10:03:00 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 33397 invoked by uid 89); 9 Mar 2016 10:02:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=Consider, func1, HContent-Transfer-Encoding:7Bit, dlopened X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 09 Mar 2016 10:02:57 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id C40C581332; Wed, 9 Mar 2016 11:02:53 +0100 (CET) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YM3gk7WGhF6P; Wed, 9 Mar 2016 11:02:53 +0100 (CET) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id A7ADA81331; Wed, 9 Mar 2016 11:02:53 +0100 (CET) From: Eric Botcazou To: "Jose E. Marchesi" Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH][SPARC] sparc: switch -fasynchronous-unwind-tables on by default. Date: Wed, 09 Mar 2016 10:03:00 -0000 Message-ID: <6828458.u3IJH91KbV@polaris> User-Agent: KMail/4.14.9 (Linux/3.16.7-35-desktop; KDE/4.14.9; x86_64; ; ) In-Reply-To: <87h9grcy85.fsf@oracle.com> References: <1456435447-23676-1-git-send-email-jose.marchesi@oracle.com> <10333302.PFiANu1Ugm@polaris> <87h9grcy85.fsf@oracle.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-SW-Source: 2016-03/txt/msg00552.txt.bz2 > Consider the attached test program. When built with -g in sparc64-*-* > the resulting binary contains: > > - A .eh_frame segment containing CFA information for __libc_csu_init and > __libc_csu_fini. > > - A .debug_frame segment containing CFA information for func2, func1 and > main. > > The backtrace(3) implementation for sparc contains a simple unwinder > that works well in most cases, but that unwinder is not used if > libgcc_s.so can be dlopened and it provides _Unwind_Backtrace. Now, > _Unwind_Backtrace uses .eh_frame but not .debug_frame. Thus, > backtrace(3) is only useful in programs built with > -fasynchronous-unwind-tables even if -g provides CFA info in > .debug_frame. How does that work for e.g. PowerPC or MIPS? Why not do the same for SPARC? -- Eric Botcazou