Re: NSHangOnUncaughtException does not work ?
Re: NSHangOnUncaughtException does not work ?
- Subject: Re: NSHangOnUncaughtException does not work ?
- From: Oleg Svirgstin <email@hidden>
- Date: Thu, 25 Mar 2004 13:11:30 +0300
Hi,
Set that breakpoint in the gdb console early at the session. For several
months (>12?) I am setting it as a future breakpoint _automatically_, so I
don't remember details (and my development machine is out of reach at this
moment, I am not at home).
A possible way is to just (IRC) type "b raise" (without quotes) at the gdb
prompt, and then ask it to break on either just [NSException raise] or on
both, raise and [NSException raise] (up to you, it will suggest you to enter
a number, IRC from 1 to 4). I did this before automating that process (read
gdb help, there should be all you need to make that breakpoint set up
automagically whenever you launch a debug session). I also set there some
other breakpoints, but there is a reverse side in any automation: I no
longer remember how exactly I did this.
Even if this "raise" happens somewhere deep in the OS core, your application
will stop and show you the callers stack. If it was an immediate penalty,
you will have the trouble maker caught in the stack dump. If not, you may
still have some useful information to detect where it happens.
Sometimes the thing breaks several millions cycles away from the moment of
the trouble and gives absolutely no clue: who said that debugging should be
a trivial task? It should better be easier, we should better be immortal
billionaires, absolutely healthy and capable to easily regenerate any part
of our bodies (for ourselves and for those dear to us who should be immortal
billionaires too)...
If it is about a nil insertion into an array, the sin will get captured
almost for sure. Good hunting!
HTH
Best regards
Oleg
>
From: Aurilien Hugeli <email@hidden>
>
Date: Thu, 25 Mar 2004 08:36:59 +0100
>
To: Nick Zitzmann <email@hidden>
>
Cc: email@hidden
>
Subject: Re: NSHangOnUncaughtException does not work ?
>
>
maybe i do not understand the goal of NSHangOnUnCaughtException, but
>
they are not in MY code, but in Cocoa's framework... (i try to insert
>
nil in an array... but i don't know where :( )
>
so i can't use -raise...
>
any other idea ?
>
>
thanks
>
Le 25 mars 04, ` 03:26, Nick Zitzmann a icrit :
>
>
> On Mar 24, 2004, at 9:18 AM, Aurilien Hugeli wrote:
>
>
>
>> i have several exception firing in my program. Basically i would like
>
>> my program to hang on them so i can run gdb to observe where did it
>
>> fire...
>
>
>
> Assuming you're using Objective-C, try setting a breakpoint on
>
> "-[NSException raise]" without the quotes; that's the usual way of
>
> breaking on exceptions in that language.
>
>
>
> Nick Zitzmann
>
> <http://seiryu.home.comcast.net/>
>
> <http://www.freshlysqueezedsoftware.com/>
>
> S/MIME signature available upon request
>
>
>
> UNIX: Where /sbin/init is Job #1.
>
> _______________________________________________
>
> xcode-users mailing list | email@hidden
>
> Help/Unsubscribe/Archives:
>
> http://www.lists.apple.com/mailman/listinfo/xcode-users
>
> Do not post admin requests to the list. They will be ignored.
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.