Class DebugConnector
Handles the dialog between the Debug Stub embedded in a debugged Cosmos Kernel and
our Debug Engine hosted in Visual Studio. This abstract class is communication protocol
independent. Sub-classes exist that manage the wire level details of the communications.
Inheritance
System.Object
DebugConnector
Assembly: Cosmos.Debug.DebugConnectors.dll
Syntax
public abstract class DebugConnector : IDisposable
Fields
|
Improve this Doc
View Source
CmdBreak
Declaration
public Action<uint> CmdBreak
Field Value
Type |
Description |
Action<System.UInt32> |
|
|
Improve this Doc
View Source
CmdChannel
Declaration
public Action<byte, byte, byte[]> CmdChannel
Field Value
Type |
Description |
Action<System.Byte, System.Byte, System.Byte[]> |
|
|
Improve this Doc
View Source
CmdComplexLongNumber
Declaration
public Action<double> CmdComplexLongNumber
Field Value
Type |
Description |
Action<System.Double> |
|
|
Improve this Doc
View Source
CmdComplexNumber
Declaration
public Action<float> CmdComplexNumber
Field Value
Type |
Description |
Action<System.Single> |
|
|
Improve this Doc
View Source
CmdCoreDump
Declaration
public Action<CoreDump> CmdCoreDump
Field Value
|
Improve this Doc
View Source
CmdFrame
Declaration
public Action<byte[]> CmdFrame
Field Value
Type |
Description |
Action<System.Byte[]> |
|
|
Improve this Doc
View Source
CmdInterruptOccurred
Declaration
public Action<uint> CmdInterruptOccurred
Field Value
Type |
Description |
Action<System.UInt32> |
|
|
Improve this Doc
View Source
CmdKernelPanic
Declaration
public Action<uint> CmdKernelPanic
Field Value
Type |
Description |
Action<System.UInt32> |
|
|
Improve this Doc
View Source
CmdMessageBox
Declaration
public Action<string> CmdMessageBox
Field Value
Type |
Description |
Action<System.String> |
|
|
Improve this Doc
View Source
CmdMethodContext
Declaration
public Action<byte[]> CmdMethodContext
Field Value
Type |
Description |
Action<System.Byte[]> |
|
|
Improve this Doc
View Source
CmdNullReferenceOccurred
Declaration
public Action<uint> CmdNullReferenceOccurred
Field Value
Type |
Description |
Action<System.UInt32> |
|
|
Improve this Doc
View Source
CmdPong
Declaration
public Action<byte[]> CmdPong
Field Value
Type |
Description |
Action<System.Byte[]> |
|
|
Improve this Doc
View Source
CmdRegisters
Declaration
public Action<byte[]> CmdRegisters
Field Value
Type |
Description |
Action<System.Byte[]> |
|
|
Improve this Doc
View Source
CmdSimpleLongNumber
Declaration
public Action<ulong> CmdSimpleLongNumber
Field Value
Type |
Description |
Action<System.UInt64> |
|
|
Improve this Doc
View Source
CmdSimpleNumber
Declaration
public Action<uint> CmdSimpleNumber
Field Value
Type |
Description |
Action<System.UInt32> |
|
|
Improve this Doc
View Source
CmdStack
Declaration
public Action<byte[]> CmdStack
Field Value
Type |
Description |
Action<System.Byte[]> |
|
|
Improve this Doc
View Source
CmdStackCorruptionOccurred
Declaration
public Action<uint> CmdStackCorruptionOccurred
Field Value
Type |
Description |
Action<System.UInt32> |
|
|
Improve this Doc
View Source
CmdStackOverflowOccurred
Declaration
public Action<uint> CmdStackOverflowOccurred
Field Value
Type |
Description |
Action<System.UInt32> |
|
|
Improve this Doc
View Source
CmdStarted
Declaration
Field Value
|
Improve this Doc
View Source
CmdText
Declaration
public Action<string> CmdText
Field Value
Type |
Description |
Action<System.String> |
|
|
Improve this Doc
View Source
CmdTrace
Declaration
public Action<uint> CmdTrace
Field Value
Type |
Description |
Action<System.UInt32> |
|
|
Improve this Doc
View Source
ConnectionLost
Declaration
public Action<Exception> ConnectionLost
Field Value
Type |
Description |
Action<Exception> |
|
|
Improve this Doc
View Source
Error
Declaration
public Action<Exception> Error
Field Value
Type |
Description |
Action<Exception> |
|
|
Improve this Doc
View Source
mCmdWait
Declaration
protected AutoResetEvent mCmdWait
Field Value
Type |
Description |
AutoResetEvent |
|
|
Improve this Doc
View Source
mCommandID
Declaration
protected byte mCommandID
Field Value
Type |
Description |
System.Byte |
|
|
Improve this Doc
View Source
mCurrCmdID
Declaration
protected byte mCurrCmdID
Field Value
Type |
Description |
System.Byte |
|
|
Improve this Doc
View Source
mCurrentMsgType
Declaration
protected byte mCurrentMsgType
Field Value
Type |
Description |
System.Byte |
|
|
Improve this Doc
View Source
mSendCmdLock
Declaration
protected object mSendCmdLock
Field Value
Type |
Description |
System.Object |
|
|
Improve this Doc
View Source
mSigCheck
Declaration
protected byte[] mSigCheck
Field Value
Type |
Description |
System.Byte[] |
|
|
Improve this Doc
View Source
mSigReceived
Declaration
protected bool mSigReceived
Field Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
OnDebugMsg
Declaration
public Action<string> OnDebugMsg
Field Value
Type |
Description |
Action<System.String> |
|
Properties
|
Improve this Doc
View Source
IsConnected
Declaration
public abstract bool IsConnected { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
SigReceived
Declaration
public bool SigReceived { get; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
|
Improve this Doc
View Source
BeforeSendCmd()
Declaration
protected virtual void BeforeSendCmd()
|
Improve this Doc
View Source
BytesToString(Byte[], Int32, Int32)
Declaration
protected static string BytesToString(byte[] bytes, int index, int count)
Parameters
Type |
Name |
Description |
System.Byte[] |
bytes |
|
System.Int32 |
index |
|
System.Int32 |
count |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ClearINT3(UInt32)
Declaration
public void ClearINT3(uint aAddress)
Parameters
Type |
Name |
Description |
System.UInt32 |
aAddress |
|
|
Improve this Doc
View Source
Continue()
Declaration
|
Improve this Doc
View Source
DebugLog(String)
Method to do debug logging of the debug connector itself.
Declaration
protected void DebugLog(string message)
Parameters
Type |
Name |
Description |
System.String |
message |
|
|
Improve this Doc
View Source
DeleteBreakpoint(Int32)
Declaration
public void DeleteBreakpoint(int aID)
Parameters
Type |
Name |
Description |
System.Int32 |
aID |
|
|
Improve this Doc
View Source
Dispose()
Declaration
|
Improve this Doc
View Source
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
System.Boolean |
disposing |
|
|
Improve this Doc
View Source
DoConnected()
Descendants must invoke this method whenever they detect an incoming connection.
Declaration
public void DoConnected()
|
Improve this Doc
View Source
DoDebugMsg(String, Boolean)
Declaration
protected void DoDebugMsg(string aMsg, bool aOnlyIfConnected)
Parameters
Type |
Name |
Description |
System.String |
aMsg |
|
System.Boolean |
aOnlyIfConnected |
|
|
Improve this Doc
View Source
GetDouble(Byte[], Int32)
Declaration
protected static double GetDouble(byte[] aBytes, int aOffset)
Parameters
Type |
Name |
Description |
System.Byte[] |
aBytes |
|
System.Int32 |
aOffset |
|
Returns
Type |
Description |
System.Double |
|
|
Improve this Doc
View Source
GetIsConnectedToDebugStub()
Declaration
protected abstract bool GetIsConnectedToDebugStub()
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
GetMemoryData(UInt32, UInt32, Int32)
Declaration
public byte[] GetMemoryData(uint address, uint size, int dataElementSize = 1)
Parameters
Type |
Name |
Description |
System.UInt32 |
address |
|
System.UInt32 |
size |
|
System.Int32 |
dataElementSize |
|
Returns
Type |
Description |
System.Byte[] |
|
|
Improve this Doc
View Source
GetSingle(Byte[], Int32)
Declaration
protected static float GetSingle(byte[] aBytes, int aOffset)
Parameters
Type |
Name |
Description |
System.Byte[] |
aBytes |
|
System.Int32 |
aOffset |
|
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
GetStackData(Int32, UInt32)
Declaration
public byte[] GetStackData(int offsetToEBP, uint size)
Parameters
Type |
Name |
Description |
System.Int32 |
offsetToEBP |
|
System.UInt32 |
size |
|
Returns
Type |
Description |
System.Byte[] |
|
|
Improve this Doc
View Source
GetUInt16(Byte[], Int32)
Declaration
protected static ushort GetUInt16(byte[] aBytes, int aOffset)
Parameters
Type |
Name |
Description |
System.Byte[] |
aBytes |
|
System.Int32 |
aOffset |
|
Returns
Type |
Description |
System.UInt16 |
|
|
Improve this Doc
View Source
GetUInt32(Byte[], Int32)
Declaration
protected static uint GetUInt32(byte[] aBytes, int aOffset)
Parameters
Type |
Name |
Description |
System.Byte[] |
aBytes |
|
System.Int32 |
aOffset |
|
Returns
Type |
Description |
System.UInt32 |
|
|
Improve this Doc
View Source
GetUInt64(Byte[], Int32)
Declaration
protected static ulong GetUInt64(byte[] aBytes, int aOffset)
Parameters
Type |
Name |
Description |
System.Byte[] |
aBytes |
|
System.Int32 |
aOffset |
|
Returns
Type |
Description |
System.UInt64 |
|
|
Improve this Doc
View Source
HandleError(Exception)
Declaration
protected void HandleError(Exception E)
Parameters
Type |
Name |
Description |
Exception |
E |
|
|
Improve this Doc
View Source
InitializeBackground()
Declaration
protected abstract void InitializeBackground()
|
Improve this Doc
View Source
Next(Int32, Action<Byte[]>)
Declaration
protected void Next(int aPacketSize, Action<byte[]> aCompleted)
Parameters
Type |
Name |
Description |
System.Int32 |
aPacketSize |
|
Action<System.Byte[]> |
aCompleted |
|
|
Improve this Doc
View Source
PacketBreakPoint(Byte[])
Declaration
protected void PacketBreakPoint(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketChannel(Byte, Byte, Byte[])
Declaration
protected void PacketChannel(byte channel, byte command, byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte |
channel |
|
System.Byte |
command |
|
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketCmdCompleted(Byte[])
Declaration
protected void PacketCmdCompleted(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketComplexLongNumber(Byte[])
Declaration
protected void PacketComplexLongNumber(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketComplexNumber(Byte[])
Declaration
protected void PacketComplexNumber(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketCoreDump(Byte[])
Declaration
protected void PacketCoreDump(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketFrame(Byte[])
Declaration
protected void PacketFrame(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketInterruptOccurred(Byte[])
Declaration
protected void PacketInterruptOccurred(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketKernelPanic(Byte[])
Declaration
protected void PacketKernelPanic(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketMemoryData(Byte[])
Declaration
protected void PacketMemoryData(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketMessageBoxText(Byte[])
Declaration
protected void PacketMessageBoxText(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketMessageBoxTextSize(Byte[])
Declaration
protected void PacketMessageBoxTextSize(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketMethodContext(Byte[])
Declaration
protected void PacketMethodContext(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketMsg(Byte[])
Declaration
protected void PacketMsg(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketNullReferenceOccurred(Byte[])
Declaration
protected void PacketNullReferenceOccurred(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketOtherChannelCommand(Byte, Byte[])
Declaration
protected void PacketOtherChannelCommand(byte aChannel, byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte |
aChannel |
|
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketOtherChannelSize(Byte, Byte, Byte[])
Declaration
protected void PacketOtherChannelSize(byte aChannel, byte aCommand, byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte |
aChannel |
|
System.Byte |
aCommand |
|
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketPong(Byte[])
Declaration
protected void PacketPong(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketRegisters(Byte[])
Declaration
protected void PacketRegisters(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketSimpleLongNumber(Byte[])
Declaration
protected void PacketSimpleLongNumber(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketSimpleNumber(Byte[])
Declaration
protected void PacketSimpleNumber(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketStack(Byte[])
Declaration
protected void PacketStack(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketStackCorruptionOccurred(Byte[])
Declaration
protected void PacketStackCorruptionOccurred(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketStackOverflowOccurred(Byte[])
Declaration
protected void PacketStackOverflowOccurred(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketText(Byte[])
Declaration
protected void PacketText(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketTextSize(Byte[])
Declaration
protected void PacketTextSize(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
PacketTracePoint(Byte[])
Declaration
protected void PacketTracePoint(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
Ping()
Declaration
|
Improve this Doc
View Source
SendCmd(Byte)
Declaration
public void SendCmd(byte aCmd)
Parameters
Type |
Name |
Description |
System.Byte |
aCmd |
|
|
Improve this Doc
View Source
SendCmd(Byte, Byte[])
Declaration
protected void SendCmd(byte aCmd, byte[] aData)
Parameters
Type |
Name |
Description |
System.Byte |
aCmd |
|
System.Byte[] |
aData |
|
|
Improve this Doc
View Source
SendCmd(Byte, Byte[], Boolean)
Declaration
protected void SendCmd(byte aCmd, byte[] aData, bool aWait)
Parameters
Type |
Name |
Description |
System.Byte |
aCmd |
|
System.Byte[] |
aData |
|
System.Boolean |
aWait |
|
|
Improve this Doc
View Source
SendFrame()
Declaration
|
Improve this Doc
View Source
SendPacketToConsole(Byte[])
Declaration
protected void SendPacketToConsole(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
SendRawData(Byte[])
Declaration
protected abstract bool SendRawData(byte[] aBytes)
Parameters
Type |
Name |
Description |
System.Byte[] |
aBytes |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
SendRawData(String, Encoding)
Declaration
protected bool SendRawData(string aData, Encoding aEncoding = null)
Parameters
Type |
Name |
Description |
System.String |
aData |
|
Encoding |
aEncoding |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
SendRegisters()
Declaration
public void SendRegisters()
|
Improve this Doc
View Source
SendStack()
Declaration
|
Improve this Doc
View Source
SendTextToConsole(String)
Declaration
protected void SendTextToConsole(string aText)
Parameters
Type |
Name |
Description |
System.String |
aText |
|
|
Improve this Doc
View Source
SetAsmBreakpoint(UInt32)
Declaration
public void SetAsmBreakpoint(uint aAddress)
Parameters
Type |
Name |
Description |
System.UInt32 |
aAddress |
|
|
Improve this Doc
View Source
SetBreakpoint(Int32, UInt32)
Declaration
public void SetBreakpoint(int aID, uint aAddress)
Parameters
Type |
Name |
Description |
System.Int32 |
aID |
|
System.UInt32 |
aAddress |
|
|
Improve this Doc
View Source
SetConnectionHandler(Action)
Defines the handler to be invoked when a connection occurs on this condector. This
method is for use by the AD7Process instance.
Declaration
public void SetConnectionHandler(Action handler)
Parameters
Type |
Name |
Description |
Action |
handler |
The handler to be notified when a connection occur.
|
|
Improve this Doc
View Source
SetINT3(UInt32)
Declaration
public void SetINT3(uint aAddress)
Parameters
Type |
Name |
Description |
System.UInt32 |
aAddress |
|
|
Improve this Doc
View Source
SizePacket(Byte[])
Declaration
protected void SizePacket(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|
|
Improve this Doc
View Source
Start()
Declaration
|
Improve this Doc
View Source
TryRead(Byte[], Int32, Int32, Int32)
Declaration
protected abstract int TryRead(byte[] buffer, int offset, int count, int timeout)
Parameters
Type |
Name |
Description |
System.Byte[] |
buffer |
|
System.Int32 |
offset |
|
System.Int32 |
count |
|
System.Int32 |
timeout |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Declaration
protected void WaitForMessage()
|
Improve this Doc
View Source
WaitForSignature(Byte[])
Declaration
protected virtual void WaitForSignature(byte[] aPacket)
Parameters
Type |
Name |
Description |
System.Byte[] |
aPacket |
|