Browse Source

Fixed SD2-482: First command line argument not passed to debuggee;

Debugee version reported in log

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@672 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 20 years ago
parent
commit
645c22b31a
  1. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/NDebugger.cs
  2. 21
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Process.cs

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

@ -103,6 +103,8 @@ namespace DebuggerLibrary @@ -103,6 +103,8 @@ namespace DebuggerLibrary
corDebug.Initialize();
corDebug.SetManagedHandler(managedCallbackProxy);
TraceMessage("ICorDebug initialized, debugee version " + debuggeeVersion);
}
internal void TerminateDebugger()

21
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Process.cs

@ -81,46 +81,47 @@ namespace DebuggerLibrary @@ -81,46 +81,47 @@ namespace DebuggerLibrary
}
return createdProcess;
}
static public unsafe Process StartInternal(NDebugger debugger, string filename, string workingDirectory, string arguments)
{
debugger.TraceMessage("Executing " + filename);
_SECURITY_ATTRIBUTES secAttr = new _SECURITY_ATTRIBUTES();
secAttr.bInheritHandle = 0;
secAttr.lpSecurityDescriptor = IntPtr.Zero;
secAttr.nLength = (uint)sizeof(_SECURITY_ATTRIBUTES); //=12?
uint[] processStartupInfo = new uint[17];
processStartupInfo[0] = sizeof(uint) * 17;
uint[] processInfo = new uint[4];
ICorDebugProcess outProcess;
if (workingDirectory == null || workingDirectory == "") {
workingDirectory = System.IO.Path.GetDirectoryName(filename);
}
fixed (uint* pprocessStartupInfo = processStartupInfo)
fixed (uint* pprocessInfo = processInfo)
debugger.CorDebug.CreateProcess(
filename, // lpApplicationName
arguments, // lpCommandLine
// If we do not prepend " ", the first argument migh just get lost
" " + arguments, // lpCommandLine
ref secAttr, // lpProcessAttributes
ref secAttr, // lpThreadAttributes
1,//TRUE // bInheritHandles
0, // dwCreationFlags
IntPtr.Zero, // lpEnvironment
workingDirectory, // lpCurrentDirectory
workingDirectory, // lpCurrentDirectory
(uint)pprocessStartupInfo, // lpStartupInfo
(uint)pprocessInfo, // lpProcessInformation,
CorDebugCreateProcessFlags.DEBUG_NO_SPECIAL_OPTIONS, // debuggingFlags
out outProcess // ppProcess
);
return new Process(debugger, outProcess);
}
internal void Break()
{
if (!isProcessRunning) {

Loading…
Cancel
Save