You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Martin Sebor <se...@roguewave.com> on 2007/07/11 21:24:28 UTC

Re: svn commit: r555340 - /incubator/stdcxx/trunk/util/exec.cpp

faridz@apache.org 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 <Fa...@epam.com>
> 
> 	* 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;
>      }
>  }
> 
> 


RE: svn commit: r555340 - /incubator/stdcxx/trunk/util/exec.cpp

Posted by Farid Zaripov <Fa...@epam.com>.
> -----Original Message-----
> From: Martin Sebor [mailto:sebor@roguewave.com] 
> Sent: Wednesday, July 11, 2007 10:24 PM
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: svn commit: r555340 - 
> /incubator/stdcxx/trunk/util/exec.cpp
> 
> > 	* 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.

  Done: http://svn.apache.org/viewvc?view=rev&rev=555657

Farid.