summaryrefslogtreecommitdiff
path: root/MLKReadEvalPrintLoop.m
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-08-18 01:01:53 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-08-18 01:22:05 +0200
commitec1b0c41160ce153f3b2cd39ffeb2f4522fd1c38 (patch)
treeac38fe95d0b3139c6ed81eef960abda63c60f7a4 /MLKReadEvalPrintLoop.m
parenta46dd37ba3832c9418c24d4b44f87d72df50585f (diff)
MLKReadEvalPrintLoop: Add debugging options.
Diffstat (limited to 'MLKReadEvalPrintLoop.m')
-rw-r--r--MLKReadEvalPrintLoop.m12
1 files changed, 12 insertions, 0 deletions
diff --git a/MLKReadEvalPrintLoop.m b/MLKReadEvalPrintLoop.m
index 2ddc5d7..a23ba36 100644
--- a/MLKReadEvalPrintLoop.m
+++ b/MLKReadEvalPrintLoop.m
@@ -31,6 +31,10 @@
#import <Foundation/NSNull.h>
#import <Foundation/NSString.h>
+#ifdef GNUSTEP
+#import <Foundation/NSDebug.h>
+#endif
+
#import <histedit.h>
@@ -132,7 +136,13 @@ static const char *prompt (EditLine *e) {
if (strcmp (line, ":q\n") == 0 || strncmp (line, ":q ", 3) == 0)
break;
+#if 1
NS_DURING
+#else
+ GSDebugAllocationActive (YES);
+ [NSObject enableDoubleReleaseCheck:YES];
+ NSZombieEnabled = YES;
+#endif
{
int i;
@@ -150,6 +160,7 @@ static const char *prompt (EditLine *e) {
printf ("%s\n", [MLKPrintToString (denullify (result)) UTF8String]);
}
}
+#if 1
NS_HANDLER
{
printf ("Caught an unhandled exception.\nName: %s\nReason: %s\n",
@@ -157,6 +168,7 @@ static const char *prompt (EditLine *e) {
[[localException reason] UTF8String]);
}
NS_ENDHANDLER;
+#endif
LRELEASE (pool);
}