[PATCH] os: Prevent backtrace from being stopped in noreturn functions.

Daniel Stone daniel at fooishbar.org
Mon Mar 1 00:20:16 PST 2010

On Mon, Mar 01, 2010 at 09:42:58AM +0200, Oliver McFadden wrote:
> There are two noreturn functions in the X server: FatalError and
> AbortServer. Having any of those two functions in the middle of a call
> stack will prevent unwinding the program properly and stops the
> backtrace at those functions in gdb.
> The file containing FatalError and AbortServer, os/log.c, has to be
> compiled with the -mapcs-frame option on ARM to get proper
> backtraces. Automake imposes its own restrictions on compiling
> individual source files with different options. The recommended way to
> do this is to put os/log.c into a convenience library and add this
> library inside os/libos.la. See the documentation of GNU Automake
> manual, version 1.11.1, section 27.8 Per-Object Flags Emulation, for
> details.

This needs a test for GCC at the least; might be easiest to just compile
a trivial int main(...) { return 0; } with -mapcs-frame, and if
compilation succeeds, then use it.


More information about the xorg-devel mailing list