* src/SDCCmain.c: signal handling is switched off by --debug
authorbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 9 Feb 2003 01:53:25 +0000 (01:53 +0000)
committerbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 9 Feb 2003 01:53:25 +0000 (01:53 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2230 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/SDCCmain.c

index 84eb04c47569e25954cd6150d79587cf7cd6f49a..3404cf08fd56df443b0c6386f0ce3a49affafd75 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-02-09  Bernhard Held <bernhard@bernhardheld.de>
+
+       * src/SDCCmain.c: signal handling is switched off by --debug
+
 2003-02-08  Bernhard Held <bernhard@bernhardheld.de>
 
        * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
index 754b8034802d816d3b6c28bf8514718d976a35dd..caf8ad502e86b64938231716f51e4a4feccf0f4c 100644 (file)
@@ -1759,7 +1759,7 @@ sig_handler (int signal)
       sig_string = "Unknown?";
       break;
     }
-  fprintf (stderr, "Catched signal %d: %s\n", signal, sig_string);
+  fprintf (stderr, "Caught signal %d: %s\n", signal, sig_string);
   exit (1);
 }
 
@@ -1784,13 +1784,6 @@ main (int argc, char **argv, char **envp)
   /* install atexit handler */
   atexit(rm_tmpfiles);
 
-  /* install signal handler;
-     it's only purpuse is to call exit() to remove temp files */
-  signal (SIGABRT, sig_handler);
-  signal (SIGTERM, sig_handler);
-  signal (SIGINT , sig_handler);
-  signal (SIGSEGV, sig_handler);
-
   /* Before parsing the command line options, do a
    * search for the port and processor and initialize
    * them if they're found. (We can't gurantee that these
@@ -1825,6 +1818,16 @@ main (int argc, char **argv, char **envp)
 #endif
   parseCmdLine (argc, argv);
 
+  /* install signal handler;
+     it's only purpuse is to call exit() to remove temp files */
+  if (!options.debug)
+    {
+      signal (SIGABRT, sig_handler);
+      signal (SIGTERM, sig_handler);
+      signal (SIGINT , sig_handler);
+      signal (SIGSEGV, sig_handler);
+    }
+
   /* if no input then printUsage & exit */
   if ((!options.c1mode && !fullSrcFileName && !nrelFiles) ||
       (options.c1mode && !fullSrcFileName))