This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][SPARC] sparc: switch -fasynchronous-unwind-tables on by default.
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: "Jose E. Marchesi" <jose dot marchesi at oracle dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 09 Mar 2016 11:02:53 +0100
- Subject: Re: [PATCH][SPARC] sparc: switch -fasynchronous-unwind-tables on by default.
- Authentication-results: sourceware.org; auth=none
- References: <1456435447-23676-1-git-send-email-jose dot marchesi at oracle dot com> <10333302 dot PFiANu1Ugm at polaris> <87h9grcy85 dot fsf at oracle dot com>
> 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