From 663fb37d3dc29927d2324f4d1e3560bf7bc8e84b Mon Sep 17 00:00:00 2001 From: burnus Date: Tue, 10 Jan 2012 09:32:29 +0000 Subject: [PATCH] 2012-01-10 Tobias Burnus PR fortran/51197 * runtime/compile_options.c (show_signal): List more signals. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183057 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgfortran/ChangeLog | 6 ++++ libgfortran/runtime/compile_options.c | 61 +++++++++++++++++++++++++++-------- 2 files changed, 54 insertions(+), 13 deletions(-) diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index c399dbe53ca..e82d44282d2 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2012-01-10 Tobias Burnus + + PR fortran/51197 + * runtime/compile_options.c (show_signal): List + more signals. + 2012-01-09 Harald Anlauf Tobias Burnus diff --git a/libgfortran/runtime/compile_options.c b/libgfortran/runtime/compile_options.c index 8038f07cb3e..0e657f73ba6 100644 --- a/libgfortran/runtime/compile_options.c +++ b/libgfortran/runtime/compile_options.c @@ -43,37 +43,72 @@ show_signal (int signum) switch (signum) { -#if defined(SIGSEGV) +#if defined(SIGQUIT) + case SIGQUIT: + name = "SIGQUIT"; + desc = "Terminal quit signal"; + break; +#endif + + /* The following 4 signals are defined by C89. */ + case SIGILL: + name = "SIGILL"; + desc = "Illegal instruction"; + break; + + case SIGABRT: + name = "SIGABRT"; + desc = "Process abort signal"; + break; + + case SIGFPE: + name = "SIGFPE"; + desc = "Floating-point exception - erroneous arithmetic operation"; + break; + case SIGSEGV: name = "SIGSEGV"; - desc = "Segmentation fault"; + desc = "Segmentation fault - invalid memory reference"; break; -#endif #if defined(SIGBUS) case SIGBUS: name = "SIGBUS"; - desc = "Bus error"; + desc = "Access to an undefined portion of a memory object"; break; #endif -#if defined(SIGILL) - case SIGILL: - name = "SIGILL"; - desc = "Illegal instruction"; +#if defined(SIGSYS) + case SIGSYS: + name = "SIGSYS"; + desc = "Bad system call"; break; #endif -#if defined(SIGFPE) - case SIGFPE: - name = "SIGFPE"; - desc = "Floating-point exception"; +#if defined(SIGTRAP) + case SIGTRAP: + name = "SIGTRAP"; + desc = "Trace/breakpoint trap"; + break; +#endif + +#if defined(SIGXCPU) + case SIGXCPU: + name = "SIGXCPU"; + desc = "CPU time limit exceeded"; + break; +#endif + +#if defined(SIGXFSZ) + case SIGXFSZ: + name = "SIGXFSZ"; + desc = "File size limit exceeded"; break; #endif } if (name) - st_printf ("\nProgram received signal %d (%s): %s.\n", signum, name, desc); + st_printf ("\nProgram received signal %s: %s.\n", name, desc); else st_printf ("\nProgram received signal %d.\n", signum); } -- 2.11.0