[Lldb-commits] [lldb] r197173 - Don't try to guess sys header conditions, and simply check if each signal is defined.

Jean-Daniel Dupas devlists at shadowlab.org
Thu Dec 12 10:12:16 PST 2013

Author: jddupas
Date: Thu Dec 12 12:12:16 2013
New Revision: 197173

URL: http://llvm.org/viewvc/llvm-project?rev=197173&view=rev
Don't try to guess sys header conditions, and simply check if each signal is defined.

CC: lldb-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2394


Modified: lldb/trunk/source/Host/common/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Host.cpp?rev=197173&r1=197172&r2=197173&view=diff
--- lldb/trunk/source/Host/common/Host.cpp (original)
+++ lldb/trunk/source/Host/common/Host.cpp Thu Dec 12 12:12:16 2013
@@ -490,10 +490,10 @@ Host::GetSignalAsCString (int signo)
     case SIGILL:    return "SIGILL";    // 4    illegal instruction (not reset when caught)
     case SIGTRAP:   return "SIGTRAP";   // 5    trace trap (not reset when caught)
     case SIGABRT:   return "SIGABRT";   // 6    abort()
-#if  (defined(_POSIX_C_SOURCE) && !defined(_DARWIN_C_SOURCE))
+#if  defined(SIGPOLL)
     case SIGPOLL:   return "SIGPOLL";   // 7    pollable event ([XSR] generated, not supported)
-#if  !defined(_POSIX_C_SOURCE)
+#if  defined(SIGEMT)
     case SIGEMT:    return "SIGEMT";    // 7    EMT instruction
     case SIGFPE:    return "SIGFPE";    // 8    floating point exception
@@ -511,15 +511,17 @@ Host::GetSignalAsCString (int signo)
     case SIGCHLD:   return "SIGCHLD";   // 20    to parent on child stop or exit
     case SIGTTIN:   return "SIGTTIN";   // 21    to readers pgrp upon background tty read
     case SIGTTOU:   return "SIGTTOU";   // 22    like TTIN for output if (tp->t_local&LTOSTOP)
-#if  !defined(_POSIX_C_SOURCE)
+#if  defined(SIGIO)
     case SIGIO:     return "SIGIO";     // 23    input/output possible signal
     case SIGXCPU:   return "SIGXCPU";   // 24    exceeded CPU time limit
     case SIGXFSZ:   return "SIGXFSZ";   // 25    exceeded file size limit
     case SIGVTALRM: return "SIGVTALRM"; // 26    virtual time alarm
     case SIGPROF:   return "SIGPROF";   // 27    profiling time alarm
-#if  !defined(_POSIX_C_SOURCE)
+#if  defined(SIGWINCH)
     case SIGWINCH:  return "SIGWINCH";  // 28    window size changes
+#if  defined(SIGINFO)
     case SIGINFO:   return "SIGINFO";   // 29    information request
     case SIGUSR1:   return "SIGUSR1";   // 30    user defined signal 1

More information about the lldb-commits mailing list