コード例 #1
0
        public List <InstructionInfo> ReadInstructionInfos(SbAddress address,
                                                           uint count, string flavor)
        {
            ReadInstructionInfosResponse response = null;

            if (connection.InvokeRpc(() =>
            {
                response = client.ReadInstructionInfos(
                    new ReadInstructionInfosRequest
                {
                    Target = grpcSbTarget,
                    Address = new GrpcSbAddress {
                        Id = address.GetId()
                    },
                    Count = count,
                    Flavor = flavor,
                });
            }))
            {
                var instructions = new List <InstructionInfo>();
                foreach (var instruction in response.Instructions)
                {
                    instructions.Add(new InstructionInfo(
                                         instruction.Address,
                                         instruction.Operands,
                                         instruction.Comment,
                                         instruction.Mnemonic,
                                         instruction.SymbolName,
                                         FrameInfoUtils.CreateLineEntryInfo(instruction.LineEntry)));
                }
                return(instructions);
            }
            return(new List <InstructionInfo>());
        }
コード例 #2
0
        List <FrameInfoPair> ToFrameInfoPairList(GetFramesWithInfoResponse response)
        {
            var frames = RemoteObjectUtils.CreateRemoteObjects(
                p => frameFactory.Create(connection, p),
                p => frameFactory.Delete(connection, p),
                response.FramesWithInfo.Select(p => p.Frame));

            return(response.FramesWithInfo.Zip(frames,
                                               (p, f) => new FrameInfoPair(f, FrameInfoUtils.CreateFrameInfo(
                                                                               p.Info, moduleFactory, connection))).ToList());
        }
コード例 #3
0
        public FrameInfo <SbModule>?GetInfo(FrameInfoFlags fields)
        {
            var request = new GetInfoRequest()
            {
                Frame  = grpcSbFrame,
                Fields = (uint)fields
            };
            GetInfoResponse response = null;

            if (connection.InvokeRpc(() =>
            {
                response = client.GetInfo(request);
            }))
            {
                if (response.Info != null)
                {
                    return(FrameInfoUtils.CreateFrameInfo(response.Info, moduleFactory, connection));
                }
            }
            return(null);
        }
コード例 #4
0
 public LineEntryInfo GetLineEntry() =>
 FrameInfoUtils.CreateLineEntryInfo(grpcSbFrame.LineEntry);