Commit 71bf6d56 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Add helper to find out about Windows 32/64bit for Debuggers.

parent 0d6601e4
......@@ -155,10 +155,23 @@ QTCREATOR_UTILS_EXPORT QString getShortPathName(const QString &name, QString *er
return rc;
}
unsigned long winQPidToPid(const Q_PID qpid)
QTCREATOR_UTILS_EXPORT unsigned long winQPidToPid(const Q_PID qpid)
{
const PROCESS_INFORMATION *processInfo = reinterpret_cast<const PROCESS_INFORMATION*>(qpid);
return processInfo->dwProcessId;
}
QTCREATOR_UTILS_EXPORT bool winIs64BitSystem()
{
// Exclude VS 2005
#if defined(_MSC_VER) && _MSC_VER < 1400
return false;
#else
SYSTEM_INFO systemInfo;
GetNativeSystemInfo(&systemInfo);
return systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64
|| systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_IA64;
#endif
}
} // namespace Utils
......@@ -56,5 +56,7 @@ QTCREATOR_UTILS_EXPORT QString getShortPathName(const QString &name,
QTCREATOR_UTILS_EXPORT unsigned long winQPidToPid(const Q_PID qpid);
QTCREATOR_UTILS_EXPORT bool winIs64BitSystem();
} // namespace Utils
#endif // WINUTILS_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment