public Converter(CLRCapabilities capabilities) { if(capabilities == null) capabilities = new CLRCapabilities(); m_capabilities = capabilities; }
public Converter(CLRCapabilities capabilities) { if (capabilities == null) { capabilities = new CLRCapabilities(); } m_capabilities = capabilities; }
public Controller(IControllerHostLocal app) { App = app; Random random = new(); lastOutboundMessage = ushort.MaxValue; nextEndpointId = random.Next(int.MaxValue); //default capabilities Capabilities = new CLRCapabilities(); }
//private FifoBuffer m_inboundData; //private Thread m_inboundDataThread; //private Thread m_stateMachineThread; //private ManualResetEvent m_evtShutdown; //private State m_state; //private CLRCapabilities capabilities; //private WaitHandle[] m_waitHandlesRead; public Controller(string marker, IControllerHostLocal app) { this.marker = marker; App = app; Random random = new Random(); lastOutboundMessage = random.Next(65536); nextEndpointId = random.Next(int.MaxValue); //m_state = new State(this); //default capabilities Capabilities = new CLRCapabilities(); }
public Controller( string marker, IControllerHostLocal app ) { m_marker = marker; m_app = app; Random random = new Random(); m_lastOutboundMessage = random.Next( 65536 ); m_nextEndpointId = random.Next( int.MaxValue ); m_state = new State( this ); //default capabilities m_capabilities = new CLRCapabilities(); }
public Controller(string marker, IControllerHostLocal app, bool asynchronousProcessing) { m_marker = marker; m_app = app; m_asynchronousProcessing = asynchronousProcessing; Random random = new Random(); m_lastOutboundMessage = random.Next(65536); m_nextEndpointId = random.Next(int.MaxValue); m_state = new State(this); //default capabilities m_capabilities = new CLRCapabilities(); }
public bool TryToConnect(int retries, int wait, bool force, ConnectionSource connectionSource) { if (force || m_connected == false) { WireProtocol.Commands.Monitor_Ping cmd = new Microsoft.SPOT.Debugger.WireProtocol.Commands.Monitor_Ping(); cmd.m_source = WireProtocol.Commands.Monitor_Ping.c_Ping_Source_Host; cmd.m_dbg_flags = (m_stopDebuggerOnConnect ? WireProtocol.Commands.Monitor_Ping.c_Ping_DbgFlag_Stop : 0); WireProtocol.IncomingMessage msg = SyncMessage(WireProtocol.Commands.c_Monitor_Ping, 0, cmd, retries, wait); if (msg == null) { m_connected = false; return false; } WireProtocol.Commands.Monitor_Ping.Reply reply = msg.Payload as WireProtocol.Commands.Monitor_Ping.Reply; if (reply != null) { this.m_targetIsBigEndian = (reply.m_dbg_flags & WireProtocol.Commands.Monitor_Ping.c_Ping_DbgFlag_BigEndian).Equals(WireProtocol.Commands.Monitor_Ping.c_Ping_DbgFlag_BigEndian); } m_connected = true; m_connectionSource = (reply == null || reply.m_source == WireProtocol.Commands.Monitor_Ping.c_Ping_Source_TinyCLR) ? ConnectionSource.TinyCLR : ConnectionSource.TinyBooter; if (m_silent) { SetExecutionMode(WireProtocol.Commands.Debugging_Execution_ChangeConditions.c_fDebugger_Quiet, 0); } // resume execution for older clients, since server tools no longer do this. if (!m_stopDebuggerOnConnect && (msg != null && msg.Payload == null)) { ResumeExecution(); } } if ((force || m_capabilities.IsUnknown) && m_connectionSource == ConnectionSource.TinyCLR) { m_capabilities = DiscoverCLRCapabilities(); m_ctrl.Capabilities = m_capabilities; } if (connectionSource != ConnectionSource.Unknown && connectionSource != m_connectionSource) { m_connected = false; return false; } return true; }
private void Initialize() { m_notifyEvent = new AutoResetEvent(false); m_rpcEvent = new AutoResetEvent(false); m_evtShutdown = new ManualResetEvent(false); m_evtPing = new ManualResetEvent(false); m_rpcQueue = ArrayList.Synchronized(new ArrayList()); m_rpcEndPoints = ArrayList.Synchronized(new ArrayList()); m_requests = ArrayList.Synchronized(new ArrayList()); m_notifyQueue = ArrayList.Synchronized(new ArrayList()); m_notifyNoise = new WireProtocol.FifoBuffer(); m_typeSysLookup = new TypeSysLookup(); m_state = new State(this); m_fProcessExited = false; //default capabilities, used until clr can be queried. m_capabilities = new CLRCapabilities(); m_RebootTime = new RebootTime(); }
public BinaryFormatter(CLRCapabilities capabilities) { if(capabilities == null) capabilities = new CLRCapabilities(); m_capabilities = capabilities; }
public static object ResolveCommandToPayload(uint cmd, bool fReply, CLRCapabilities capabilities) { if(fReply) { switch(cmd) { case c_Monitor_Ping: return new Monitor_Ping.Reply(); case c_Monitor_OemInfo: return new Monitor_OemInfo.Reply(); case c_Monitor_ReadMemory: return new Monitor_ReadMemory.Reply(); case c_Monitor_CheckMemory: return new Monitor_CheckMemory.Reply(); case c_Monitor_MemoryMap: return new Monitor_MemoryMap.Reply(); case c_Monitor_DeploymentMap: return new Monitor_DeploymentMap.Reply(); case c_Monitor_FlashSectorMap: return new Monitor_FlashSectorMap.Reply(); case c_Debugging_Execution_BasePtr: return new Debugging_Execution_BasePtr.Reply(); case c_Debugging_Execution_ChangeConditions: return new Debugging_Execution_ChangeConditions.Reply(); case c_Debugging_Execution_Allocate: return new Debugging_Execution_Allocate.Reply(); case c_Debugging_Execution_BreakpointStatus: return new Debugging_Execution_BreakpointStatus.Reply(); case c_Debugging_Execution_QueryCLRCapabilities: return new Debugging_Execution_QueryCLRCapabilities.Reply(); case c_Debugging_MFUpdate_Start: return new Debugging_MFUpdate_Start.Reply(); case c_Debugging_MFUpdate_AuthCmd: return new Debugging_MFUpdate_AuthCommand.Reply(); case c_Debugging_MFUpdate_Authenticate: return new Debugging_MFUpdate_Authenticate.Reply(); case c_Debugging_MFUpdate_GetMissingPkts: return new Debugging_MFUpdate_GetMissingPkts.Reply(); case c_Debugging_MFUpdate_AddPacket: return new Debugging_MFUpdate_AddPacket.Reply(); case c_Debugging_MFUpdate_Install: return new Debugging_MFUpdate_Install.Reply(); case c_Debugging_UpgradeToSsl: return new Debugging_UpgradeToSsl.Reply(); case c_Debugging_Thread_Create: return new Debugging_Thread_Create.Reply(); case c_Debugging_Thread_CreateEx: return new Debugging_Thread_CreateEx.Reply(); case c_Debugging_Thread_List: return new Debugging_Thread_List.Reply(); case c_Debugging_Thread_Stack: return new Debugging_Thread_Stack.Reply(); case c_Debugging_Thread_Kill: return new Debugging_Thread_Kill.Reply(); case c_Debugging_Thread_GetException: return new Debugging_Value_Reply(); case c_Debugging_Thread_Get: return new Debugging_Value_Reply(); case c_Debugging_Stack_Info: return new Debugging_Stack_Info.Reply(); case c_Debugging_Value_GetStack: return new Debugging_Value_Reply(); case c_Debugging_Value_GetField: return new Debugging_Value_Reply(); case c_Debugging_Value_GetArray: return new Debugging_Value_Reply(); case c_Debugging_Value_GetBlock: return new Debugging_Value_Reply(); case c_Debugging_Value_GetScratchPad: return new Debugging_Value_Reply(); case c_Debugging_Value_AllocateObject: return new Debugging_Value_Reply(); case c_Debugging_Value_AllocateString: return new Debugging_Value_Reply(); case c_Debugging_Value_AllocateArray: return new Debugging_Value_Reply(); case c_Debugging_Value_Assign: return new Debugging_Value_Reply(); case c_Debugging_TypeSys_Assemblies: return new Debugging_TypeSys_Assemblies.Reply(); case c_Debugging_TypeSys_AppDomains: return new Debugging_TypeSys_AppDomains.Reply(); case c_Debugging_Resolve_Type: return new Debugging_Resolve_Type.Reply(); case c_Debugging_Resolve_Field: return new Debugging_Resolve_Field.Reply(); case c_Debugging_Resolve_Method: return new Debugging_Resolve_Method.Reply(); case c_Debugging_Resolve_Assembly: return new Debugging_Resolve_Assembly.Reply(); case c_Debugging_Resolve_VirtualMethod: return new Debugging_Resolve_VirtualMethod.Reply(); case c_Debugging_Resolve_AppDomain: return new Debugging_Resolve_AppDomain.Reply(); case c_Debugging_Lcd_GetFrame: return new Debugging_Lcd_GetFrame.Reply(); case c_Debugging_Messaging_Query: return new Debugging_Messaging_Query.Reply(); case c_Debugging_Messaging_Send: return new Debugging_Messaging_Send.Reply(); case c_Debugging_Messaging_Reply: return new Debugging_Messaging_Reply.Reply(); case c_Debugging_Deployment_Status: if(capabilities.IncrementalDeployment) return new Debugging_Deployment_Status.ReplyEx(); else return new Debugging_Deployment_Status.Reply(); case c_Profiling_Command: return new Profiling_Command.Reply(); } } else { switch(cmd) { case c_Monitor_Ping: return new Monitor_Ping(); case c_Monitor_Message: return new Monitor_Message(); case c_Monitor_ReadMemory: return new Monitor_ReadMemory(); case c_Monitor_WriteMemory: return new Monitor_WriteMemory(); case c_Monitor_CheckMemory: return new Monitor_CheckMemory(); case c_Monitor_EraseMemory: return new Monitor_EraseMemory(); case c_Monitor_Execute: return new Monitor_Execute(); case c_Monitor_MemoryMap: return new Monitor_MemoryMap(); case c_Monitor_Reboot: return new Monitor_Reboot(); case c_Monitor_DeploymentMap: return new Monitor_DeploymentMap(); case c_Monitor_FlashSectorMap: return new Monitor_FlashSectorMap(); case c_Monitor_SignatureKeyUpdate: return new Monitor_SignatureKeyUpdate(); case c_Debugging_Execution_BasePtr: return new Debugging_Execution_BasePtr(); case c_Debugging_Execution_ChangeConditions: return new Debugging_Execution_ChangeConditions(); case c_Debugging_Execution_SecurityKey: return new Debugging_Execution_SecurityKey(); case c_Debugging_Execution_Unlock: return new Debugging_Execution_Unlock(); case c_Debugging_Execution_Allocate: return new Debugging_Execution_Allocate(); case c_Debugging_Execution_BreakpointHit: return new Debugging_Execution_BreakpointHit(); case c_Debugging_Execution_BreakpointStatus: return new Debugging_Execution_BreakpointStatus(); case c_Debugging_Execution_QueryCLRCapabilities: return new Debugging_Execution_QueryCLRCapabilities(); case c_Debugging_Execution_SetCurrentAppDomain: return new Debugging_Execution_SetCurrentAppDomain(); case c_Debugging_MFUpdate_Start: return new Debugging_MFUpdate_Start(); case c_Debugging_MFUpdate_AuthCmd: return new Debugging_MFUpdate_AuthCommand(); case c_Debugging_MFUpdate_Authenticate: return new Debugging_MFUpdate_Authenticate(); case c_Debugging_MFUpdate_GetMissingPkts: return new Debugging_MFUpdate_GetMissingPkts(); case c_Debugging_MFUpdate_AddPacket: return new Debugging_MFUpdate_AddPacket(); case c_Debugging_MFUpdate_Install: return new Debugging_MFUpdate_Install(); case c_Debugging_UpgradeToSsl: return new Debugging_UpgradeToSsl(); case c_Debugging_Thread_Create: return new Debugging_Thread_Create(); case c_Debugging_Thread_CreateEx: return new Debugging_Thread_CreateEx(); case c_Debugging_Thread_List: return new Debugging_Thread_List(); case c_Debugging_Thread_Stack: return new Debugging_Thread_Stack(); case c_Debugging_Thread_Kill: return new Debugging_Thread_Kill(); case c_Debugging_Thread_Suspend: return new Debugging_Thread_Suspend(); case c_Debugging_Thread_Resume: return new Debugging_Thread_Resume(); case c_Debugging_Thread_GetException: return new Debugging_Thread_GetException(); case c_Debugging_Thread_Unwind: return new Debugging_Thread_Unwind(); case c_Debugging_Thread_Get: return new Debugging_Thread_Get(); case c_Debugging_Stack_Info: return new Debugging_Stack_Info(); case c_Debugging_Stack_SetIP: return new Debugging_Stack_SetIP(); case c_Debugging_Value_ResizeScratchPad: return new Debugging_Value_ResizeScratchPad(); case c_Debugging_Value_GetStack: return new Debugging_Value_GetStack(); case c_Debugging_Value_GetField: return new Debugging_Value_GetField(); case c_Debugging_Value_GetArray: return new Debugging_Value_GetArray(); case c_Debugging_Value_GetBlock: return new Debugging_Value_GetBlock(); case c_Debugging_Value_GetScratchPad: return new Debugging_Value_GetScratchPad(); case c_Debugging_Value_SetBlock: return new Debugging_Value_SetBlock(); case c_Debugging_Value_SetArray: return new Debugging_Value_SetArray(); case c_Debugging_Value_AllocateObject: return new Debugging_Value_AllocateObject(); case c_Debugging_Value_AllocateString: return new Debugging_Value_AllocateString(); case c_Debugging_Value_AllocateArray: return new Debugging_Value_AllocateArray(); case c_Debugging_Value_Assign: return new Debugging_Value_Assign(); case c_Debugging_TypeSys_Assemblies: return new Debugging_TypeSys_Assemblies(); case c_Debugging_TypeSys_AppDomains: return new Debugging_TypeSys_AppDomains(); case c_Debugging_Resolve_Type: return new Debugging_Resolve_Type(); case c_Debugging_Resolve_Field: return new Debugging_Resolve_Field(); case c_Debugging_Resolve_Method: return new Debugging_Resolve_Method(); case c_Debugging_Resolve_Assembly: return new Debugging_Resolve_Assembly(); case c_Debugging_Resolve_VirtualMethod: return new Debugging_Resolve_VirtualMethod(); case c_Debugging_Resolve_AppDomain: return new Debugging_Resolve_AppDomain(); case c_Debugging_Lcd_NewFrame: return new Debugging_Lcd_NewFrame(); case c_Debugging_Lcd_NewFrameData: return new Debugging_Lcd_NewFrameData(); case c_Debugging_Lcd_GetFrame: return new Debugging_Lcd_GetFrame(); case c_Debugging_Button_Report: return new Debugging_Button_Report(); case c_Debugging_Button_Inject: return new Debugging_Button_Inject(); case c_Debugging_Messaging_Query: return new Debugging_Messaging_Query(); case c_Debugging_Messaging_Send: return new Debugging_Messaging_Send(); case c_Debugging_Messaging_Reply: return new Debugging_Messaging_Reply(); case c_Debugging_Deployment_Status: return new Debugging_Deployment_Status(); case c_Debugging_Info_SetJMC: return new Debugging_Info_SetJMC(); case c_Profiling_Stream: return new Profiling_Stream(); } } return null; }