discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with catching exceptions on ARM


From: Mathias Bauer
Subject: Re: Problem with catching exceptions on ARM
Date: Thu, 20 Feb 2014 19:05:47 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

Hi David,

thanks for your answer!

Am 20.02.14 18:33, schrieb David Chisnall:
On 20 Feb 2014, at 17:27, Mathias Bauer <mathias_bauer@gmx.net>
wrote:

The call to _Unwind_Resume_or_Rethrow(e) does not return.

That's not a bad thing.  _Unwind_Resume_or_Rethrow() is only supposed
to return in error conditions.

I tested, that a simple @try/@catch works (an exception thrown in a
function called from the @try block is caught successfully and the
program exits normally). But throwing another exception in the
function that caught the exception freezes the program again. It
doesn't matter if the second exception is thrown inside the @catch
block or outside of it.

Hmm, do you know which exception ABI you're using?  Can you make sure
that you're compiling with -fobjc-runtime=gnustep-1.7 so that we're
using the code that emits calls to the functions on entry to and exit
from catch blocks?  With the old ABI there may be some bugs related
to exception lifetime (there are also bugs in that the old ABI is
impossible to implement correctly).

When building libobjc2 and the ExceptionTest.m, I set some CFLAGS before letting CMake generate the Makefiles, and CMake seems to evaluate this (I know that from an occasion where I accidently had a typo in my -fobjc-runtime thingie ;-)).

The resulting command for the compilation is:


clang version 3.5 (trunk nversioned directory)
Target: armv7hl-suse-linux-gnueabi
Thread model: posix
Found candidate GCC installation: /usr/lib/gcc/armv7hl-suse-linux-gnueabi/4.8
Selected GCC installation: /usr/lib/gcc/armv7hl-suse-linux-gnueabi/4.8
"/usr/bin/clang" -cc1 -triple armv7-suse-linux-gnueabi -E -disable-free -main-file-name gc_none.c -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -fuse-init-array -target-cpu cortex-a8 -target-abi aapcs-linux -mfloat-abi hard -target-linker-version 12.3 -v -g -coverage-file /home/me/libobjc2/build/gc_none.i -resource-dir /usr/bin/../lib/clang/3.5 -D GC_DEBUG -D GNUSTEP -D NO_LEGACY -D TYPE_DEPENDENT_DISPATCH -D _BSD_SOURCE=1 -D _XOPEN_SOURCE=700 -D __BSD_VISIBLE=1 -D __OBJC_RUNTIME_INTERNAL__=1 -D objc_EXPORTS -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/clang/3.5/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O0 -Wno-deprecated-objc-isa-usage -Wno-objc-root-class -std=gnu99 -fdebug-compilation-dir /home/me/libobjc2/build -ferror-limit 19 -fmessage-length 183 -mstackrealign -fno-signed-char -fobjc-runtime=gnustep-1.7 -fobjc-dispatch-method=non-legacy -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o gc_none.i -x c /home/me/libobjc2/gc_none.c clang -cc1 version 3.5 based upon LLVM 3.5svn default target armv7l-unknown-linux-gnueabihf
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/bin/../lib/clang/3.5/include
 /usr/include
End of search list.

Regards,
Mathias



reply via email to

[Prev in Thread] Current Thread [Next in Thread]