On 06/15/2012 12:36 PM, Andreas Höschler wrote:
> Hi all,
>
> I am trying to track down a problem that occurs only every 6 weeks or so
> (impossible to reproduce at will). I am raising an exception
>
> [NSException raise:NSInternalInconsistencyException format:@"%@",
> message];
>
> when the problem occurs. This exception is catched and the message presented
> in a panel.
>
> Is there any way to programmatically cause a core dump instead of raising the
> exception? I need a back trace to find the cause of the problem.
A common trick I use if I want to dump core when an exception is
triggered is to simply override -raise as follows:
@implementation NSException (CoreDumps)
- (void) raise
{
abort ();
}
@end
Afterwards, simply enable core dumping if you're on Linux and run your
program:
$ ulimit -c unlimited
$ ./myprog
--
Saso
_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep