forked from qt-creator/qt-creator
qtcdebugger: Register as post-mortem debugger for 64bit applications as well.
Add mode argument to registry access helpers allowing to access the 64bit registry from 32bit applications and vice versa using special REGSAM values, similar to the new QSettings formats introduced in Qt 5.7. This allows for setting the 64bit post-mortem debugger when running as a 32bit application on 64bit Windows. The -wow argument is extended to indicate accessing the 64bit node from 32bit. Task-number: QTCREATORBUG-16386 Change-Id: I7f003673777e4b8c1b259ba1905a4207b4ce0b43 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
@@ -37,6 +37,12 @@
|
||||
|
||||
namespace RegistryAccess {
|
||||
|
||||
enum AccessMode {
|
||||
DefaultAccessMode,
|
||||
Registry32Mode = 0x2, // Corresponds to QSettings::Registry32Format (5.7)
|
||||
Registry64Mode = 0x4 // Corresponds to QSettings::Registry64Format (5.7)
|
||||
};
|
||||
|
||||
static const char *debuggerApplicationFileC = "qtcdebugger";
|
||||
static const WCHAR *debuggerRegistryKeyC = L"Software\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug";
|
||||
static const WCHAR *debuggerRegistryValueNameC = L"Debugger";
|
||||
@@ -68,8 +74,12 @@ bool openRegistryKey(HKEY category, // HKEY_LOCAL_MACHINE, etc.
|
||||
const WCHAR *key,
|
||||
bool readWrite,
|
||||
HKEY *keyHandle,
|
||||
AccessMode mode,
|
||||
QString *errorMessage);
|
||||
|
||||
inline bool openRegistryKey(HKEY category, const WCHAR *key, bool readWrite, HKEY *keyHandle, QString *errorMessage)
|
||||
{ return openRegistryKey(category, key, readWrite, keyHandle, DefaultAccessMode, errorMessage); }
|
||||
|
||||
QString debuggerCall(const QString &additionalOption = QString());
|
||||
|
||||
bool isRegistered(HKEY handle, const QString &call, QString *errorMessage, QString *oldDebugger = 0);
|
||||
|
||||
Reference in New Issue
Block a user