forked from qt-creator/qt-creator
Add helper to find out about Windows 32/64bit for Debuggers.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user