[EMAIL PROTECTED] wrote:
Author: faridz
Date: Wed Jul 11 10:04:28 2007
New Revision: 555340

URL: http://svn.apache.org/viewvc?view=rev&rev=555340
Log:
2007-07-11 Farid Zaripov <[EMAIL PROTECTED]>

        * exec.cpp (exec_file) [_WIN32]: Translate STATUS_BREAKPOINT exit code 
into SIGTRAP.

Makes sense. Are there any other codes that we might want to map
or display symbolic information for? I see a whole bunch on this
page: http://msdn2.microsoft.com/en-us/library/ms679356.aspx.
It might make sense to map some of the STATUS_FLOAT_XXX constants
to SIGFPE, STATUS_ILLEGAL_INSTRUCTION to SIGILL,
STATUS_IN_PAGE_ERROR to SIGBUS, etc.

Martin


Modified:
    incubator/stdcxx/trunk/util/exec.cpp

Modified: incubator/stdcxx/trunk/util/exec.cpp
URL: 
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/exec.cpp?view=diff&rev=555340&r1=555339&r2=555340
==============================================================================
--- incubator/stdcxx/trunk/util/exec.cpp (original)
+++ incubator/stdcxx/trunk/util/exec.cpp Wed Jul 11 10:04:28 2007
@@ -47,6 +47,9 @@
 #else
 #  include <windows.h> /* for PROCESS_INFORMATION, ... */
 #  include <process.h> /* for CreateProcess, ... */
+#  ifndef SIGTRAP
+#  define SIGTRAP 5  // STATUS_BREAKPOINT translated into SIGTRAP
+#  endif
 #endif
 #include <sys/stat.h> /* for S_* */
 #include <sys/types.h>
@@ -1242,6 +1245,10 @@
if (STATUS_ACCESS_VIOLATION == result->exit) {
         result->exit = SIGSEGV;
+        result->signaled = 1;
+    }
+    else if (STATUS_BREAKPOINT == result->exit) {
+        result->exit = SIGTRAP;
         result->signaled = 1;
     }
 }



Reply via email to