> In sparc systems glibc uses libgcc's unwinder to implement the > backtrace(3) function, defaulting to a simple non-dwarf unwinder if > libgcc_s doesn't provide a working _Unwind_Backtrace. > > However, libgcc's unwinder uses .eh_frame instead of .frame_debug, and > .eh_frame is fully populated only if applications are built with > -fexceptions or -fasynchronous-unwind-tables. > > This patch changes GCC to assume -fasynchronous-unwind-tables by default > in sparcv9 and sparc64, like other ports (notably x86) do.
eric@polaris:~/svn/gcc/gcc/common/config> grep -r x_flag_asynchronous_unwind_tables . ./tilegx/tilegx-common.c: opts->x_flag_asynchronous_unwind_tables = 1; ./tilepro/tilepro-common.c: opts->x_flag_asynchronous_unwind_tables = 1; ./i386/i386-common.c: opts->x_flag_asynchronous_unwind_tables = 2; ./s390/s390-common.c: opts->x_flag_asynchronous_unwind_tables = 1; In particular, the 2 means that it's overridden by USE_IX86_FRAME_POINTER, i.e. the frame pointer is always enabled instead (e.g on Solaris). What's the problem exactly here? Simple non-DWARF unwinders usually work fine with the SPARC architecture thanks to the calling conventions. -- Eric Botcazou