[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with ffi/forwardInvocation and exception handling on OpenSol
From: |
Saso Kiselkov |
Subject: |
Re: Problem with ffi/forwardInvocation and exception handling on OpenSolaris |
Date: |
Mon, 28 Jun 2010 15:30:45 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100423 Lightning/1.0b1 Thunderbird/3.0.4 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I can catch it in -forwardInvocation:, so it appears that the problem
arises only when I try to go above that frame.
I can't put a breakpoint on parse_lsda_header, it remains in a PENDING
state even after running. When I put a breakpoint on
__gnu_objc_personality_v0, then I get the following behavior (I put a
try/catch in do_throw(), -forwardInvocation: and main()):
(gdb) r
Starting program: /export/home/diablos/excp_fail/obj/excp_fail
warning: Lowest section in /lib/amd64/libpthread.so.1 is .dynamic at
00000000000000b0
warning: Lowest section in /lib/amd64/librt.so.1 is .dynamic at
00000000000000b0
warning: Lowest section in /lib/amd64/libdl.so.1 is .dynamic at
00000000000000b0
throwing
Breakpoint 1, 0xfffffd7ffdc58bb0 in __gnu_objc_personality_v0 () from
/usr/lib/64/libobjc.so.2
(gdb) c
Continuing.
Breakpoint 1, 0xfffffd7ffdc58bb0 in __gnu_objc_personality_v0 () from
/usr/lib/64/libobjc.so.2
(gdb) c
Continuing.
Breakpoint 1, 0xfffffd7ffdc58bb0 in __gnu_objc_personality_v0 () from
/usr/lib/64/libobjc.so.2
(gdb) c
Continuing.
Breakpoint 1, 0xfffffd7ffdc58bb0 in __gnu_objc_personality_v0 () from
/usr/lib/64/libobjc.so.2
(gdb) c
Continuing.
Breakpoint 1, 0xfffffd7ffdc58bb0 in __gnu_objc_personality_v0 () from
/usr/lib/64/libobjc.so.2
(gdb) c
Continuing.
Breakpoint 1, 0xfffffd7ffdc58bb0 in __gnu_objc_personality_v0 () from
/usr/lib/64/libobjc.so.2
(gdb) c
Continuing.
Breakpoint 1, 0xfffffd7ffdc58bb0 in __gnu_objc_personality_v0 () from
/usr/lib/64/libobjc.so.2
(gdb) c
Continuing.
Breakpoint 1, 0xfffffd7ffdc58bb0 in __gnu_objc_personality_v0 () from
/usr/lib/64/libobjc.so.2
(gdb) c
Continuing.
2010-06-28 15:27:21.798 excp_fail[14887] Caught <NSException: 0x497590>
NAME:NSGenericException REASON:test exception INFO:(nil) in do_throw(),
rethrowing...
Breakpoint 1, 0xfffffd7ffdc58bb0 in __gnu_objc_personality_v0 () from
/usr/lib/64/libobjc.so.2
(gdb) c
Continuing.
Breakpoint 1, 0xfffffd7ffdc58bb0 in __gnu_objc_personality_v0 () from
/usr/lib/64/libobjc.so.2
(gdb) c
Continuing.
Breakpoint 1, 0xfffffd7ffdc58bb0 in __gnu_objc_personality_v0 () from
/usr/lib/64/libobjc.so.2
(gdb) c
Continuing.
Breakpoint 1, 0xfffffd7ffdc58bb0 in __gnu_objc_personality_v0 () from
/usr/lib/64/libobjc.so.2
(gdb) c
Continuing.
2010-06-28 15:27:25.242 excp_fail[14887] Caught <NSException: 0x497590>
NAME:NSGenericException REASON:test exception INFO:(nil) in
- -forwardInvocation:, rethrowing...
Breakpoint 1, 0xfffffd7ffdc58bb0 in __gnu_objc_personality_v0 () from
/usr/lib/64/libobjc.so.2
(gdb) c
Continuing.
Program received signal SIGABRT, Aborted.
0xfffffd7fff29e09a in _lwp_kill () from /lib/64/libc.so.1
Does this help in any way?
BR,
- --
Saso
On 06/28/2010 03:04 PM, David Chisnall wrote:
> On 28 Jun 2010, at 13:18, Saso Kiselkov wrote:
>
>> Sure, I've attached the original source and generated assembly.
>
>
> Well, that looks weird. The unwind data for main() looks correct, but for
> do_throw and -forwardException:, I can't find the the language-specific data
> area's header. It appears to be creating the callsite info, but not actually
> creating any references to it...
>
> You're using GCC 4.3.3, according to the include stuff, but the generated
> assembly looks a bit like nonsense. I wonder if it is trying to make code
> compatible with a Solaris exception ABI that the GNU runtime knows nothing
> about? Even that doesn't seem very likely.
>
> You could try putting a breakpoing on __gnu_objc_personality_v0() and then
> checking that the call to parse_lsda_header() is working correctly for each
> frame.
>
> Can you catch the exception in -forwardInvocation: or does it not even unwind
> through the do_throw() function?
>
> David
>
> --
> This email complies with ISO 3103
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkwopAUACgkQRO8UcfzpOHCnFwCdF1o3AzxVpeNWHB/DuTzJzHb1
E64AniTloBAN5GJ+dHBZn7fVrt62crsk
=1XG4
-----END PGP SIGNATURE-----
- Problem with ffi/forwardInvocation and exception handling on OpenSolaris, Saso Kiselkov, 2010/06/28
- Re: Problem with ffi/forwardInvocation and exception handling on OpenSolaris, David Chisnall, 2010/06/28
- Re: Problem with ffi/forwardInvocation and exception handling on OpenSolaris, Saso Kiselkov, 2010/06/28
- Re: Problem with ffi/forwardInvocation and exception handling on OpenSolaris, David Chisnall, 2010/06/28
- Re: Problem with ffi/forwardInvocation and exception handling on OpenSolaris, Saso Kiselkov, 2010/06/28
- Re: Problem with ffi/forwardInvocation and exception handling on OpenSolaris, David Chisnall, 2010/06/28
- Re: Problem with ffi/forwardInvocation and exception handling on OpenSolaris, Saso Kiselkov, 2010/06/28
- Re: Problem with ffi/forwardInvocation and exception handling on OpenSolaris, David Chisnall, 2010/06/28
- Re: Problem with ffi/forwardInvocation and exception handling on OpenSolaris, Saso Kiselkov, 2010/06/28
- Re: Problem with ffi/forwardInvocation and exception handling on OpenSolaris, David Chisnall, 2010/06/28
- Re: Problem with ffi/forwardInvocation and exception handling on OpenSolaris,
Saso Kiselkov <=
- Re: Problem with ffi/forwardInvocation and exception handling on OpenSolaris, Saso Kiselkov, 2010/06/28
- Re: Problem with ffi/forwardInvocation and exception handling on OpenSolaris, Saso Kiselkov, 2010/06/28
- Re: Problem with ffi/forwardInvocation and exception handling on OpenSolaris, Richard Frith-Macdonald, 2010/06/28
- Re: Problem with ffi/forwardInvocation and exception handling on OpenSolaris, Saso Kiselkov, 2010/06/28