Browse Source

If can not get managed version of executable, just use the default.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2806 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 18 years ago
parent
commit
6ac96e839d
  1. 4
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs
  2. 10
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/NDebugger.cs

4
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs

@ -136,8 +136,8 @@ namespace ICSharpCode.SharpDevelop.Services @@ -136,8 +136,8 @@ namespace ICSharpCode.SharpDevelop.Services
string version = debugger.GetProgramVersion(processStartInfo.FileName);
if (version.StartsWith("v1.0")) {
MessageService.ShowMessage("${res:XML.MainMenu.DebugMenu.Error.Net10NotSupported}");
} else if (version == null || version.Length == 0) {
MessageService.ShowMessage("${res:XML.MainMenu.DebugMenu.Error.BadAssembly}");
//} else if (string.IsNullOrEmpty(version)) {
// MessageService.ShowMessage("${res:XML.MainMenu.DebugMenu.Error.BadAssembly}");
} else {
if (DebugStarting != null)
DebugStarting(this, EventArgs.Empty);

10
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/NDebugger.cs

@ -77,6 +77,7 @@ namespace Debugger @@ -77,6 +77,7 @@ namespace Debugger
NativeMethods.GetRequestedRuntimeVersion(exeFilename, null, 0, out size);
StringBuilder sb = new StringBuilder(size);
NativeMethods.GetRequestedRuntimeVersion(exeFilename, sb, sb.Capacity, out size);
sb.Length = size; // TODO: What is the last char? What is the result for unmanaged apps?
return sb.ToString();
}
@ -87,13 +88,12 @@ namespace Debugger @@ -87,13 +88,12 @@ namespace Debugger
/// If null, the version of the executing process will be used</param>
internal void InitDebugger(string debuggeeVersion)
{
if (debuggeeVersion != null && debuggeeVersion.Length > 1) {
this.debuggeeVersion = debuggeeVersion;
} else {
this.debuggeeVersion = GetDebuggerVersion();
if (string.IsNullOrEmpty(debuggeeVersion)) {
debuggeeVersion = GetDebuggerVersion();
}
this.debuggeeVersion = debuggeeVersion;
corDebug = new ICorDebug(NativeMethods.CreateDebuggingInterfaceFromVersion(3, this.debuggeeVersion));
corDebug = new ICorDebug(NativeMethods.CreateDebuggingInterfaceFromVersion(3, debuggeeVersion));
managedCallbackSwitch = new ManagedCallbackSwitch(this);
managedCallbackProxy = new ManagedCallbackProxy(this, managedCallbackSwitch);

Loading…
Cancel
Save