diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2012-11-02 15:33:06 +0100 |
---|---|---|
committer | hjk <qthjk@ovi.com> | 2012-11-02 15:40:41 +0100 |
commit | 2e40c54ea3422f7a3e8441cf81c0b07e4491f287 (patch) | |
tree | a8deca8324bbe78fed23e866644d3470aea281ce /src/plugins/debugger/shared | |
parent | 31e2ddd08535e792337075de86465d0360cbcf2a (diff) | |
download | qt-creator-2e40c54ea3422f7a3e8441cf81c0b07e4491f287.tar.gz |
Debugger: Remove #ifdef Q_OS_WIN from hostutils.
- Provide stubs for Non-Windows
- Reduce #ifdefs, check Abi if possible.
- Remove unused winGetCurrentProcessId().
Task-number: QTCREATORBUG-8141
Change-Id: I80558ca4e52e87c7371597ea07c091af08097b34
Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins/debugger/shared')
-rw-r--r-- | src/plugins/debugger/shared/hostutils.cpp | 16 | ||||
-rw-r--r-- | src/plugins/debugger/shared/hostutils.h | 6 |
2 files changed, 10 insertions, 12 deletions
diff --git a/src/plugins/debugger/shared/hostutils.cpp b/src/plugins/debugger/shared/hostutils.cpp index e645a716e2..aa38d72611 100644 --- a/src/plugins/debugger/shared/hostutils.cpp +++ b/src/plugins/debugger/shared/hostutils.cpp @@ -82,11 +82,6 @@ bool winResumeThread(unsigned long dwThreadId, QString *errorMessage) return ok; } -unsigned long winGetCurrentProcessId() -{ - return GetCurrentProcessId(); -} - bool isWinProcessBeingDebugged(unsigned long pid) { HANDLE processHandle = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid); @@ -228,7 +223,16 @@ bool isFatalWinException(long code) return true; } -#endif // Q_OS_WIN +#else // Q_OS_WIN + +bool winResumeThread(unsigned long, QString *) { return false; } +bool isWinProcessBeingDebugged(unsigned long) { return false; } +void formatWindowsException(unsigned long , quint64, unsigned long, + quint64, quint64, QTextStream &) { } +bool isFatalWinException(long) { return false; } +bool isDebuggerWinException(unsigned long) { return false; } + +#endif // !Q_OS_WIN } // namespace Internal } // namespace Debugger diff --git a/src/plugins/debugger/shared/hostutils.h b/src/plugins/debugger/shared/hostutils.h index 1b052c92a4..511b4ea720 100644 --- a/src/plugins/debugger/shared/hostutils.h +++ b/src/plugins/debugger/shared/hostutils.h @@ -40,13 +40,9 @@ QT_END_NAMESPACE namespace Debugger { namespace Internal { -#ifdef Q_OS_WIN - // Resume a suspended thread by id. bool winResumeThread(unsigned long dwThreadId, QString *errorMessage); -unsigned long winGetCurrentProcessId(); - bool isWinProcessBeingDebugged(unsigned long pid); // Special exception codes. @@ -75,8 +71,6 @@ bool isFatalWinException(long code); // Check for EXCEPTION_BREAKPOINT, EXCEPTION_SINGLE_STEP bool isDebuggerWinException(unsigned long code); -#endif // defined(Q_OS_WIN) - } // namespace Internal } // namespace Debugger |