Sourcery G++ supports the backtrace
function
from GLIBC. Backtracing is supported regardless of optimization,
with or without a frame pointer, and in both ARM and Thumb modes.
In order to support backtracing, Sourcery G++ enables generation of
unwind tables by default when compiling.
These tables are used for any stack traversal, including
backtrace
, C++ exception handling, and POSIX
thread cancellation. Where none of these are required, you can
reduce application size by compiling with
-fno-unwind-tables
.
Some stand-alone programs, including bootloaders and the Linux
kernel, can not be built with unwind tables. To accommodate
these programs, Sourcery G++ does not generate unwind tables for C
code if the -mabi
or
-ffreestanding
options are used. These options
are not generally used in user-space programs. If you use either
of these options and do need unwind tables, specify
-funwind-tables
on the
arm-none-linux-gnueabi-gcc
command line.