From: bernhardheld Date: Sun, 9 Feb 2003 01:53:25 +0000 (+0000) Subject: * src/SDCCmain.c: signal handling is switched off by --debug X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=eb96a222024c0bb193cec4134a7ffa3b30b16a5e;p=fw%2Fsdcc * src/SDCCmain.c: signal handling is switched off by --debug git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2230 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index 84eb04c4..3404cf08 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-02-09 Bernhard Held + + * src/SDCCmain.c: signal handling is switched off by --debug + 2003-02-08 Bernhard Held * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto diff --git a/src/SDCCmain.c b/src/SDCCmain.c index 754b8034..caf8ad50 100644 --- a/src/SDCCmain.c +++ b/src/SDCCmain.c @@ -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))