Hi,

I was reading the "Problem reading corefiles on ARM" thread at the gcc
mailing list (from www-archive, I'm not subscribed) and the conclusions
are incorrect:
        http://gcc.gnu.org/ml/gcc/2008-08/msg00075.html

The problem in GCC noreturn attribute handling isn't how it optimizes
calling of the noreturn functions, but how it optimizes noreturn
functions themselves.  This can be verified by compiling *just*
the noreturn function with "-O0" as then backtraces work just fine
in Gdb.


A colleague of mine (who unlike me knows ARM assembly) looked at
the generated assembly of the noreturn functions and the problem
with the generated noreturn function code is that it clobbers the link
register required by GCC for backtracing.  Could this be fixed?


        - Eero

PS: this concerns Gcc 4(.2.1).  In Gcc 3.4.4 it was enough to use
-fno-omit-frame-pointer for compiling noreturn functions.  This was
fairly easy to do in Glibc because each function is in a separate *.c
file, -O0 is more awkward because disabling optimizations changes how
Glibc headers work for those functions.

Reply via email to