void OnReceiveSCModuleLoaded(SCModuleLoaded msg) { HandleModuleLoaded(msg.ModuleName); foreach (var i in breakpoints) { if (!i.Value.IsBound) { i.Value.TryBind(); } } }
void OnReceiveSCModuleLoaded(SCModuleLoaded msg) { engine.Callback.ModuleLoaded(new AD7Module(msg.ModuleName)); foreach (var i in breakpoints) { if (!i.Value.IsBound) { i.Value.TryBind(); } } }
void OnReceiveMessage(DebugMessageType type, byte[] buffer) { using (System.IO.MemoryStream ms = new System.IO.MemoryStream(buffer)) { using (System.IO.BinaryReader br = new System.IO.BinaryReader(ms)) { switch (type) { case DebugMessageType.SCAttachResult: { SCAttachResult result = new SCAttachResult(); result.Result = (AttachResults)br.ReadByte(); result.DebugServerVersion = br.ReadInt32(); RemoteDebugVersion = result.DebugServerVersion; waitingAttach = false; } break; case DebugMessageType.SCBindBreakpointResult: { SCBindBreakpointResult msg = new SCBindBreakpointResult(); msg.BreakpointHashCode = br.ReadInt32(); msg.Result = (BindBreakpointResults)br.ReadByte(); OnReceivSendSCBindBreakpointResult(msg); } break; case DebugMessageType.SCBreakpointHit: { SCBreakpointHit msg = new SCBreakpointHit(); msg.BreakpointHashCode = br.ReadInt32(); msg.ThreadHashCode = br.ReadInt32(); msg.StackFrame = ReadStackFrames(br); OnReceiveSCBreakpointHit(msg); } break; case DebugMessageType.SCStepComplete: { SCStepComplete msg = new SCStepComplete(); msg.ThreadHashCode = br.ReadInt32(); msg.StackFrame = ReadStackFrames(br); OnReceiveSCStepComplete(msg); } break; case DebugMessageType.SCThreadStarted: { SCThreadStarted msg = new SCThreadStarted(); msg.ThreadHashCode = br.ReadInt32(); OnReceiveSCThreadStarted(msg); } break; case DebugMessageType.SCThreadEnded: { SCThreadEnded msg = new SCThreadEnded(); msg.ThreadHashCode = br.ReadInt32(); OnReceiveSCThreadEnded(msg); } break; case DebugMessageType.SCModuleLoaded: { SCModuleLoaded msg = new SCModuleLoaded(); msg.ModuleName = br.ReadString(); OnReceiveSCModuleLoaded(msg); } break; case DebugMessageType.SCResolveVariableResult: { CompleteRPCRequest(ReadVariableInfo(br)); } break; case DebugMessageType.SCEnumChildrenResult: { int cnt = br.ReadInt32(); VariableInfo[] res = new VariableInfo[cnt]; for (int i = 0; i < cnt; i++) { res[i] = ReadVariableInfo(br); } CompleteRPCRequest(res); } break; } } } }
void OnReceiveMessage(DebugMessageType type, byte[] buffer) { using (System.IO.MemoryStream ms = new System.IO.MemoryStream(buffer)) { using (System.IO.BinaryReader br = new System.IO.BinaryReader(ms)) { switch (type) { case DebugMessageType.SCAttachResult: { SCAttachResult result = new SCAttachResult(); result.Result = (AttachResults)br.ReadByte(); result.DebugServerVersion = br.ReadInt32(); RemoteDebugVersion = result.DebugServerVersion; waitingAttach = false; } break; case DebugMessageType.SCBindBreakpointResult: { SCBindBreakpointResult msg = new SCBindBreakpointResult(); msg.BreakpointHashCode = br.ReadInt32(); msg.Result = (BindBreakpointResults)br.ReadByte(); OnReceivSendSCBindBreakpointResult(msg); } break; case DebugMessageType.SCBreakpointHit: { SCBreakpointHit msg = new SCBreakpointHit(); msg.BreakpointHashCode = br.ReadInt32(); msg.ThreadHashCode = br.ReadInt32(); msg.StackFrame = ReadStackFrames(br); OnReceiveSCBreakpointHit(msg); } break; case DebugMessageType.SCStepComplete: { SCStepComplete msg = new SCStepComplete(); msg.ThreadHashCode = br.ReadInt32(); msg.StackFrame = ReadStackFrames(br); OnReceiveSCStepComplete(msg); } break; case DebugMessageType.SCThreadStarted: { SCThreadStarted msg = new SCThreadStarted(); msg.ThreadHashCode = br.ReadInt32(); OnReceiveSCThreadStarted(msg); } break; case DebugMessageType.SCThreadEnded: { SCThreadEnded msg = new SCThreadEnded(); msg.ThreadHashCode = br.ReadInt32(); OnReceiveSCThreadEnded(msg); } break; case DebugMessageType.SCModuleLoaded: { SCModuleLoaded msg = new SCModuleLoaded(); msg.ModuleName = br.ReadString(); OnReceiveSCModuleLoaded(msg); } break; } } } }