This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Problem reading corefiles on ARM
- From: Eero Tamminen <eero dot tamminen at nokia dot com>
- To: gcc at sources dot redhat dot com
- Cc: drow at false dot org, Joe dot Buck at synopsys dot COM, Paul_Koning dot Dell dot com at mgw-mx06 dot nokia dot com
- Date: Tue, 25 Nov 2008 11:53:10 +0200
- Subject: Re: Problem reading corefiles on ARM
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.