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>()); }
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()); }
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); }
public LineEntryInfo GetLineEntry() => FrameInfoUtils.CreateLineEntryInfo(grpcSbFrame.LineEntry);