mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-27 05:52:11 +00:00
This commit is contained in:
parent
93ad7db51f
commit
ed2abdb9a2
4 changed files with 21 additions and 1 deletions
|
|
@ -8,7 +8,7 @@ using System.Windows.Forms;
|
||||||
|
|
||||||
namespace Cosmos.Debug.Common.CDebugger
|
namespace Cosmos.Debug.Common.CDebugger
|
||||||
{
|
{
|
||||||
public abstract class DebugConnector {
|
public abstract class DebugConnector: IDisposable {
|
||||||
//TODO: These should not be this way and should in fact
|
//TODO: These should not be this way and should in fact
|
||||||
// be checked or better yet done by constructor arguments
|
// be checked or better yet done by constructor arguments
|
||||||
// but that puts a restriction on where the sub classes
|
// but that puts a restriction on where the sub classes
|
||||||
|
|
@ -103,6 +103,11 @@ namespace Cosmos.Debug.Common.CDebugger
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual void Dispose()
|
||||||
|
{
|
||||||
|
GC.SuppressFinalize(this);
|
||||||
|
}
|
||||||
|
|
||||||
protected void PacketTextSize(byte[] aPacket) {
|
protected void PacketTextSize(byte[] aPacket) {
|
||||||
Next(GetUInt16(aPacket, 0), PacketText);
|
Next(GetUInt16(aPacket, 0), PacketText);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,16 @@ namespace Cosmos.Debug.Common.CDebugger {
|
||||||
Next(1, PacketCommand);
|
Next(1, PacketCommand);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void Dispose()
|
||||||
|
{
|
||||||
|
if (mStream != null)
|
||||||
|
{
|
||||||
|
mStream.Close();
|
||||||
|
mStream = null;
|
||||||
|
}
|
||||||
|
base.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
protected override void PacketTracePoint(byte[] aPacket) {
|
protected override void PacketTracePoint(byte[] aPacket) {
|
||||||
CmdTrace(mCurrentMsgType, GetUInt32(aPacket, 0));
|
CmdTrace(mCurrentMsgType, GetUInt32(aPacket, 0));
|
||||||
Next(1, PacketCommand);
|
Next(1, PacketCommand);
|
||||||
|
|
|
||||||
|
|
@ -369,6 +369,8 @@ namespace Cosmos.Debug.VSDebugEngine {
|
||||||
{
|
{
|
||||||
mProcess.Kill();
|
mProcess.Kill();
|
||||||
mProcess.Exited -= mProcess_Exited;
|
mProcess.Exited -= mProcess_Exited;
|
||||||
|
mDbgConnector.Dispose();
|
||||||
|
mDbgConnector = null;
|
||||||
return VSConstants.S_OK;
|
return VSConstants.S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -394,6 +396,8 @@ namespace Cosmos.Debug.VSDebugEngine {
|
||||||
Trace.WriteLine(String.Format("Process Exit Code: {0}", mProcess.ExitCode));
|
Trace.WriteLine(String.Format("Process Exit Code: {0}", mProcess.ExitCode));
|
||||||
//AD7ThreadDestroyEvent.Send(mEngine, mThread, (uint)mProcess.ExitCode);
|
//AD7ThreadDestroyEvent.Send(mEngine, mThread, (uint)mProcess.ExitCode);
|
||||||
//mCallback.OnProgramDestroy((uint)mProcess.ExitCode);
|
//mCallback.OnProgramDestroy((uint)mProcess.ExitCode);
|
||||||
|
mDbgConnector.Dispose();
|
||||||
|
mDbgConnector = null;
|
||||||
mCallback.OnProcessExit((uint)mProcess.ExitCode);
|
mCallback.OnProcessExit((uint)mProcess.ExitCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ namespace Cosmos.VS.Package
|
||||||
xValues.Add("DebugMode", this.GetConfigurationProperty("DebugMode", true));
|
xValues.Add("DebugMode", this.GetConfigurationProperty("DebugMode", true));
|
||||||
xValues.Add("TraceAssemblies", this.GetConfigurationProperty("TraceAssemblies", true));
|
xValues.Add("TraceAssemblies", this.GetConfigurationProperty("TraceAssemblies", true));
|
||||||
xValues.Add("BuildTarget", this.GetConfigurationProperty("BuildTarget", true));
|
xValues.Add("BuildTarget", this.GetConfigurationProperty("BuildTarget", true));
|
||||||
|
xValues.Add("ProjectFile", Path.Combine(ProjectMgr.ProjectFolder, ProjectMgr.ProjectFile));
|
||||||
|
|
||||||
xInfo.bstrExe = NameValueCollectionHelper.DumpToString(xValues);
|
xInfo.bstrExe = NameValueCollectionHelper.DumpToString(xValues);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue