コード例 #1
0
        /// <summary>
        /// Unbound responses
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void ViceBridge_ViceResponse(object?sender, ViceResponseEventArgs e)
        {
            Debug.WriteLine($"Got unbounded {e.Response.GetType().Name}");
            uiFactory.StartNew(() =>
            {
                switch (e.Response)
                {
                case StoppedResponse:
                    if (executionStatusViewModel.IsDebugging)
                    {
                        executionStatusViewModel.IsDebuggingPaused = true;
                        stoppedExecution.SetResult();
                        stoppedExecution = new TaskCompletionSource();
                    }
                    else
                    {
                        // when not debugging, stopping VICE is not desired. i.e. when a checkpoint is added
                        viceBridge.EnqueueCommand(new ExitCommand());
                    }
                    break;

                case ResumedResponse:
                    if (executionStatusViewModel.IsDebugging)
                    {
                        executionStatusViewModel.IsDebuggingPaused = false;
                        resumedExecution.SetResult();
                        resumedExecution = new TaskCompletionSource();
                    }
                    break;
                }
            });
        }
コード例 #2
0
 void ViceBridge_ViceResponse(object?sender, ViceResponseEventArgs e)
 {
     switch (e.Response)
     {
     case RegistersResponse registerResponse:
         if (!IsLoadingMappings)
         {
             _ = uiFactory.StartNew(() => UpdateRegistersFromResponseAsync(registerResponse));
         }
         break;
     }
 }