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

Mark Kettenis mark.kettenis at xs4all.nl
Mon Mar 1 04:17:14 PST 2010


> From: Oliver McFadden <oliver.mcfadden at nokia.com>
> Date: Mon,  1 Mar 2010 09:42:58 +0200
> 
> From: Ylimaki Rami (EXT-Vincit/Tampere) <ext-rami.ylimaki at nokia.com>
> 
> 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.

Speaking as a GDB developer here, you should really put some pressure
on the GCC developers to stop doing unhelpful optimizations like this,
instead of adding work-arounds like this.  While ARM is the most
prominent architecture affected by this, there are other architectures
where noreturn messes up the backtraces from time to time.


More information about the xorg-devel mailing list