// Get a thread at the specified index in the thread list.
        public override Task <GetThreadAtIndexResponse> GetThreadAtIndex(
            GetThreadAtIndexRequest request, ServerCallContext context)
        {
            var sbProcess    = GrpcLookupUtils.GetProcess(request.Process, processStore);
            var sbThread     = sbProcess.GetThreadAtIndex(request.Index);
            var grpcSbThread = new GrpcSbThread();

            if (sbThread != null)
            {
                var remoteThread = remoteThreadFactory.Create(sbThread);
                grpcSbThread.Id = threadStore.AddObject(remoteThread);
            }
            return(Task.FromResult(new GetThreadAtIndexResponse {
                Thread = grpcSbThread
            }));
        }
Exemplo n.º 2
0
 public RemoteThread GetThread() => _threadFactory.Create(_sbFrame.GetThread());