From 1ea97d2e3c73bd1f33a45c7c5d88315a3c2cec9f Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Tue, 11 Mar 2014 21:04:41 +0100 Subject: [PATCH] Use different error message when debugger is used in 64-bit process. --- src/AddIns/Debugger/Debugger.Core/ManagedCallback.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/AddIns/Debugger/Debugger.Core/ManagedCallback.cs b/src/AddIns/Debugger/Debugger.Core/ManagedCallback.cs index 3e3322ed92..489001dc40 100644 --- a/src/AddIns/Debugger/Debugger.Core/ManagedCallback.cs +++ b/src/AddIns/Debugger/Debugger.Core/ManagedCallback.cs @@ -294,9 +294,13 @@ namespace Debugger string errorText = String.Format("Debugger error: \nHR = 0x{0:X} \nCode = 0x{1:X}", errorHR, errorCode); if ((uint)errorHR == 0x80131C30) { - errorText += "\n\nDebugging 64-bit processes is currently not supported.\n" + - "If you are running a 64-bit system, this setting might help:\n" + - "Project -> Project Options -> Compiling -> Target CPU = 32-bit Intel"; + if (Environment.Is64BitProcess) { + errorText += "\n\nCannot debug 32-bit processes if the debugger is running as 64-bit process."; + } else { + errorText += "\n\nDebugging 64-bit processes is currently not supported.\n" + + "If you are running a 64-bit system, this setting might help:\n" + + "Project -> Project Options -> Compiling -> Target CPU = 32-bit Intel"; + } } if (Environment.UserInteractive)