mirror of
https://github.com/pocoproject/poco.git
synced 2025-05-25 14:34:04 +02:00
trunk/branch integration: VxWorks & Wince
This commit is contained in:
parent
9b0ba3971f
commit
52e8c4f75b
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Debugger.cpp
|
// Debugger.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/svn/Foundation/src/Debugger.cpp#3 $
|
// $Id: //poco/1.4/Foundation/src/Debugger.cpp#3 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Core
|
// Package: Core
|
||||||
@ -40,7 +40,7 @@
|
|||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#if defined(POCO_OS_FAMILY_WINDOWS)
|
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||||
#include "Poco/UnWindows.h"
|
#include "Poco/UnWindows.h"
|
||||||
#elif defined(POCO_OS_FAMILY_UNIX)
|
#elif defined(POCO_OS_FAMILY_UNIX) && !defined(POCO_VXWORKS)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#elif defined(POCO_OS_FAMILY_VMS)
|
#elif defined(POCO_OS_FAMILY_VMS)
|
||||||
@ -64,7 +64,22 @@ bool Debugger::isAvailable()
|
|||||||
{
|
{
|
||||||
#if defined(_DEBUG)
|
#if defined(_DEBUG)
|
||||||
#if defined(POCO_OS_FAMILY_WINDOWS)
|
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||||
|
#if defined(_WIN32_WCE)
|
||||||
|
#if (_WIN32_WCE >= 0x600)
|
||||||
|
BOOL isDebuggerPresent;
|
||||||
|
if (CheckRemoteDebuggerPresent(GetCurrentProcess(), &isDebuggerPresent))
|
||||||
|
{
|
||||||
|
return isDebuggerPresent ? true : false;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
return IsDebuggerPresent() ? true : false;
|
return IsDebuggerPresent() ? true : false;
|
||||||
|
#endif
|
||||||
|
#elif defined(POCO_VXWORKS)
|
||||||
|
return false;
|
||||||
#elif defined(POCO_OS_FAMILY_UNIX)
|
#elif defined(POCO_OS_FAMILY_UNIX)
|
||||||
return std::getenv("POCO_ENABLE_DEBUGGER") ? true : false;
|
return std::getenv("POCO_ENABLE_DEBUGGER") ? true : false;
|
||||||
#elif defined(POCO_OS_FAMILY_VMS)
|
#elif defined(POCO_OS_FAMILY_VMS)
|
||||||
@ -83,7 +98,7 @@ void Debugger::message(const std::string& msg)
|
|||||||
std::fputs(msg.c_str(), stderr);
|
std::fputs(msg.c_str(), stderr);
|
||||||
std::fputs("\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n", stderr);
|
std::fputs("\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n", stderr);
|
||||||
#if defined(POCO_OS_FAMILY_WINDOWS)
|
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||||
if (IsDebuggerPresent())
|
if (isAvailable())
|
||||||
{
|
{
|
||||||
#if defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING)
|
#if defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING)
|
||||||
std::wstring umsg;
|
std::wstring umsg;
|
||||||
@ -116,10 +131,14 @@ void Debugger::enter()
|
|||||||
{
|
{
|
||||||
#if defined(_DEBUG)
|
#if defined(_DEBUG)
|
||||||
#if defined(POCO_OS_FAMILY_WINDOWS)
|
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||||
if (IsDebuggerPresent())
|
if (isAvailable())
|
||||||
{
|
{
|
||||||
DebugBreak();
|
DebugBreak();
|
||||||
}
|
}
|
||||||
|
#elif defined(POCO_VXWORKS)
|
||||||
|
{
|
||||||
|
// not supported
|
||||||
|
}
|
||||||
#elif defined(POCO_OS_FAMILY_UNIX)
|
#elif defined(POCO_OS_FAMILY_UNIX)
|
||||||
if (isAvailable())
|
if (isAvailable())
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user