mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-27 05:52:11 +00:00
Debugger pipe work.
This commit is contained in:
parent
b69139311e
commit
733d3de69b
4 changed files with 149 additions and 144 deletions
|
|
@ -86,7 +86,7 @@ Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Docs", "..\Docs", "{67E7DEF
|
||||||
Release.AspNetCompiler.ForceOverwrite = "true"
|
Release.AspNetCompiler.ForceOverwrite = "true"
|
||||||
Release.AspNetCompiler.FixedNames = "false"
|
Release.AspNetCompiler.FixedNames = "false"
|
||||||
Release.AspNetCompiler.Debug = "False"
|
Release.AspNetCompiler.Debug = "False"
|
||||||
VWDPort = "6281"
|
VWDPort = "28453"
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cosmos.Debug.Consts", "..\source2\IL2CPU\Cosmos.IL2CPU.Debug\Cosmos.Debug.Consts.csproj", "{9998B4EA-385E-4DA2-8905-2BBEB5B2C6E2}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cosmos.Debug.Consts", "..\source2\IL2CPU\Cosmos.IL2CPU.Debug\Cosmos.Debug.Consts.csproj", "{9998B4EA-385E-4DA2-8905-2BBEB5B2C6E2}"
|
||||||
|
|
|
||||||
|
|
@ -125,6 +125,10 @@ namespace Cosmos.Debug.Common
|
||||||
SendCommand(DsCmd.SendStack);
|
SendCommand(DsCmd.SendStack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Ping() {
|
||||||
|
SendCommand(DsCmd.Ping);
|
||||||
|
}
|
||||||
|
|
||||||
public void SetBreakpoint(int aID, uint aAddress) {
|
public void SetBreakpoint(int aID, uint aAddress) {
|
||||||
// Not needed as SendCommand will do it, but it saves
|
// Not needed as SendCommand will do it, but it saves
|
||||||
// some execution, but more importantly stops it from
|
// some execution, but more importantly stops it from
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ namespace Cosmos.Debug.Common {
|
||||||
// We need to delay creation and connect until its used, so we guarantee
|
// We need to delay creation and connect until its used, so we guarantee
|
||||||
// that the server side is active and ready.
|
// that the server side is active and ready.
|
||||||
if (mPipe == null) {
|
if (mPipe == null) {
|
||||||
mPipe = new NamedPipeClientStream(".", Cosmos.Debug.Consts.Pipes.DownName, PipeDirection.Out);
|
mPipe = new NamedPipeClientStream(".", mPipeName, PipeDirection.Out);
|
||||||
try {
|
try {
|
||||||
// For now we assume its there or not from the first call.
|
// For now we assume its there or not from the first call.
|
||||||
// If we don't find the server, we disable it to avoid causing lag.
|
// If we don't find the server, we disable it to avoid causing lag.
|
||||||
|
|
@ -42,11 +42,11 @@ namespace Cosmos.Debug.Common {
|
||||||
if (xData == null) {
|
if (xData == null) {
|
||||||
xData = new byte[0];
|
xData = new byte[0];
|
||||||
}
|
}
|
||||||
int xLength = Math.Min(aData.Length, 32768);
|
int xLength = Math.Min(xData.Length, 32768);
|
||||||
mPipe.WriteByte((byte)(xLength >> 8));
|
mPipe.WriteByte((byte)(xLength >> 8));
|
||||||
mPipe.WriteByte((byte)(xLength & 0xFF));
|
mPipe.WriteByte((byte)(xLength & 0xFF));
|
||||||
if (xLength > 0) {
|
if (xLength > 0) {
|
||||||
mPipe.Write(aData, 0, xLength);
|
mPipe.Write(xData, 0, xLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
mPipe.Flush();
|
mPipe.Flush();
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,6 @@ namespace Cosmos.Debug.VSDebugEngine {
|
||||||
if (String.IsNullOrEmpty(xVmwarePath) || !File.Exists(xVmwarePath)) {
|
if (String.IsNullOrEmpty(xVmwarePath) || !File.Exists(xVmwarePath)) {
|
||||||
MessageBox.Show("VWMare is not installed, probably going to crash now!", "Cosmos DebugEngine", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
MessageBox.Show("VWMare is not installed, probably going to crash now!", "Cosmos DebugEngine", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetVMWareWorkstationPath() {
|
private static string GetVMWareWorkstationPath() {
|
||||||
|
|
@ -134,18 +133,18 @@ namespace Cosmos.Debug.VSDebugEngine {
|
||||||
mDebugDownPipe.SendCommand(DwMsg.Registers, aData);
|
mDebugDownPipe.SendCommand(DwMsg.Registers, aData);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void DbgCmdFrame(byte[] aData)
|
protected void DbgCmdFrame(byte[] aData) {
|
||||||
{
|
|
||||||
mDebugDownPipe.SendCommand(DwMsg.Frame, aData);
|
mDebugDownPipe.SendCommand(DwMsg.Frame, aData);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void DbgCmdStack(byte[] aData)
|
protected void DbgCmdStack(byte[] aData) {
|
||||||
{
|
|
||||||
mDebugDownPipe.SendCommand(DwMsg.Stack, aData);
|
mDebugDownPipe.SendCommand(DwMsg.Stack, aData);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal AD7Process(NameValueCollection aDebugInfo, EngineCallback aCallback, AD7Engine aEngine, IDebugPort2 aPort)
|
void mDebugUpPipe_DataPacketReceived(byte arg1, byte[] arg2) {
|
||||||
{
|
}
|
||||||
|
|
||||||
|
internal AD7Process(NameValueCollection aDebugInfo, EngineCallback aCallback, AD7Engine aEngine, IDebugPort2 aPort) {
|
||||||
System.Diagnostics.Debug.WriteLine("In AD7Process..ctor");
|
System.Diagnostics.Debug.WriteLine("In AD7Process..ctor");
|
||||||
mCallback = aCallback;
|
mCallback = aCallback;
|
||||||
|
|
||||||
|
|
@ -154,6 +153,8 @@ namespace Cosmos.Debug.VSDebugEngine {
|
||||||
|
|
||||||
mDebugDownPipe = new Cosmos.Debug.Common.PipeClient(Cosmos.Debug.Consts.Pipes.DownName);
|
mDebugDownPipe = new Cosmos.Debug.Common.PipeClient(Cosmos.Debug.Consts.Pipes.DownName);
|
||||||
mDebugUpPipe = new Cosmos.Debug.Common.PipeServer(Cosmos.Debug.Consts.Pipes.UpName);
|
mDebugUpPipe = new Cosmos.Debug.Common.PipeServer(Cosmos.Debug.Consts.Pipes.UpName);
|
||||||
|
mDebugUpPipe.DataPacketReceived += new Action<byte, byte[]>(mDebugUpPipe_DataPacketReceived);
|
||||||
|
mDebugUpPipe.Start();
|
||||||
|
|
||||||
mISO = mDebugInfo["ISOFile"];
|
mISO = mDebugInfo["ISOFile"];
|
||||||
mProjectFile = mDebugInfo["ProjectFile"];
|
mProjectFile = mDebugInfo["ProjectFile"];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue