public override bool IsMatch(Commands.Debugging_Execution_BreakpointDef breakpointDef) { if(breakpointDef.m_flags != BreakpointDef.c_HARD) return false; if(breakpointDef.m_IP != m_breakpointDef.m_IP) return false; if(breakpointDef.m_md != m_breakpointDef.m_md) return false; CorDebugThread thread = m_function.Process.GetThread(breakpointDef.m_pid); CorDebugFrame frame = thread.Chain.ActiveFrame; if(frame.AppDomain != m_function.AppDomain) return false; return true; }
public override bool ShouldBreak(Commands.Debugging_Execution_BreakpointDef breakpointDef) { if ((breakpointDef.m_flags & BreakpointDef.c_EXCEPTION_CAUGHT) != 0) { //This if statement remains for compatibility with TinyCLR pre exception filtering support. if((breakpointDef.m_flags & BreakpointDef.c_EXCEPTION_UNWIND) == 0) return false; } return true; }
public bool SetBreakpoints( Commands.Debugging_Execution_BreakpointDef[ ] breakpoints ) { Commands.Debugging_Execution_Breakpoints cmd = new Commands.Debugging_Execution_Breakpoints( ); cmd.m_data = breakpoints; return IncomingMessage.IsPositiveAcknowledge( SyncMessage( Commands.c_Debugging_Execution_Breakpoints, 0, cmd ) ); }
private void RpcReceiveReply( IncomingMessage msg, Commands.Debugging_Messaging_Reply reply ) { Commands.Debugging_Messaging_Address addr = reply.m_addr; EndPointRegistration eep; eep = RpcFind( addr.m_from_Type, addr.m_from_Id, false ); Commands.Debugging_Messaging_Reply.Reply res = new Commands.Debugging_Messaging_Reply.Reply( ); res.m_found = ( eep != null ) ? 1u : 0u; res.m_addr = addr; msg.Reply( CreateConverter( ), Flags.c_NonCritical, res ); if( eep != null ) { lock( eep.m_req_Outbound.SyncRoot ) { foreach( EndPointRegistration.OutboundRequest or in eep.m_req_Outbound ) { if( or.Seq == addr.m_seq && or.Type == addr.m_to_Type && or.Id == addr.m_to_Id ) { or.Reply = reply.m_data; break; } } } } }
internal bool RpcReply( Commands.Debugging_Messaging_Address addr, byte[ ] data ) { Commands.Debugging_Messaging_Reply cmd = new Commands.Debugging_Messaging_Reply( ); cmd.m_addr = addr; cmd.m_data = data; IncomingMessage reply = SyncMessage( Commands.c_Debugging_Messaging_Reply, 0, cmd ); if( reply != null ) { Commands.Debugging_Messaging_Reply.Reply res = new Commands.Debugging_Messaging_Reply.Reply( ); if( res != null && res.m_found != 0 ) { return true; } } return false; }
private void RpcReceiveSend( IncomingMessage msg, Commands.Debugging_Messaging_Send send ) { Commands.Debugging_Messaging_Address addr = send.m_addr; EndPointRegistration eep; eep = RpcFind( addr.m_to_Type, addr.m_to_Id, true ); Commands.Debugging_Messaging_Send.Reply res = new Commands.Debugging_Messaging_Send.Reply( ); res.m_found = ( eep != null ) ? 1u : 0u; res.m_addr = addr; msg.Reply( CreateConverter( ), Flags.c_NonCritical, res ); if( eep != null ) { Message msgNew = new Message( eep.m_ep, addr, send.m_data ); EndPointRegistration.InboundRequest ir = new EndPointRegistration.InboundRequest( eep, msgNew ); ThreadPool.QueueUserWorkItem( new WaitCallback( RpcReceiveSendDispatch ), ir ); } }
private EndPointRegistration.OutboundRequest RpcSend_Setup( Commands.Debugging_Messaging_Address addr, byte[ ] data ) { EndPointRegistration eep = RpcFind( addr.m_from_Type, addr.m_from_Id, false ); EndPointRegistration.OutboundRequest or = null; if( eep != null ) { bool fSuccess = false; or = new EndPointRegistration.OutboundRequest( eep, addr.m_seq, addr.m_to_Type, addr.m_to_Id ); eep.m_req_Outbound.Add( or ); Commands.Debugging_Messaging_Send cmd = new Commands.Debugging_Messaging_Send( ); cmd.m_addr = addr; cmd.m_data = data; IncomingMessage reply = SyncMessage( Commands.c_Debugging_Messaging_Send, 0, cmd ); if( reply != null ) { Commands.Debugging_Messaging_Send.Reply res = reply.Payload as Commands.Debugging_Messaging_Send.Reply; if( res != null && res.m_found != 0 ) { fSuccess = true; } } if( !IsRunning ) { fSuccess = false; } if( !fSuccess ) { eep.m_req_Outbound.Remove( or ); or = null; } } return or; }
internal byte[ ] RpcSend( Commands.Debugging_Messaging_Address addr, int timeout, byte[ ] data ) { EndPointRegistration.OutboundRequest or = null; byte[ ] res = null; try { or = RpcSend_Setup( addr, data ); if( or != null ) { or.WaitHandle.WaitOne( timeout, false ); res = or.Reply; } } finally { if( or != null ) { or.Owner.m_req_Outbound.Remove( or ); } } return res; }
internal bool RpcCheck( Commands.Debugging_Messaging_Address addr ) { Commands.Debugging_Messaging_Query cmd = new Commands.Debugging_Messaging_Query( ); cmd.m_addr = addr; IncomingMessage reply = SyncMessage( Commands.c_Debugging_Messaging_Query, 0, cmd ); if( reply != null ) { Commands.Debugging_Messaging_Query.Reply res = reply.Payload as Commands.Debugging_Messaging_Query.Reply; if( res != null && res.m_found != 0 ) { return true; } } return false; }
private void RpcReceiveQuery( IncomingMessage msg, Commands.Debugging_Messaging_Query query ) { Commands.Debugging_Messaging_Address addr = query.m_addr; EndPointRegistration eep = RpcFind( addr.m_to_Type, addr.m_to_Id, true ); Commands.Debugging_Messaging_Query.Reply res = new Commands.Debugging_Messaging_Query.Reply( ); res.m_found = ( eep != null ) ? 1u : 0u; res.m_addr = addr; msg.Reply( CreateConverter( ), Flags.c_NonCritical, res ); }
internal Message(EndPoint source, Commands.Debugging_Messaging_Address addr, byte[] payload) { m_source = source; m_addr = addr; m_payload = payload; }