コード例 #1
0
        static IEnumerable <RemoteValue> GetPointerChildren(RemoteValue value, int offset, int count)
        {
            var    result      = new List <RemoteValue>();
            SbType pointeeType = value.GetTypeInfo()?.GetPointeeType();

            if (pointeeType == null)
            {
                // If we cannot get the pointee type, just return the empty list.
                return(result);
            }
            ulong byteSize    = pointeeType.GetByteSize();
            ulong baseAddress = value.GetValueAsUnsigned() + (ulong)offset * byteSize;

            for (int n = 0; n < count; ++n)
            {
                ulong       address    = baseAddress + (ulong)n * byteSize;
                RemoteValue childValue =
                    value.CreateValueFromAddress($"[{offset + n}]", address, pointeeType);
                if (childValue != null)
                {
                    result.Add(childValue);
                }
            }
            return(result);
        }
コード例 #2
0
        public override Task <CreateValueFromAddressResponse> CreateValueFromAddress(
            CreateValueFromAddressRequest request, ServerCallContext context)
        {
            RemoteValue value            = valueStore.GetObject(request.Value.Id);
            RemoteValue expressionResult = value.CreateValueFromAddress(
                request.Name, request.Address, typeStore.GetObject(request.Type.Id));
            var response = new CreateValueFromAddressResponse();

            if (expressionResult != null)
            {
                response.ExpressionResult = GrpcFactoryUtils.CreateValue(
                    expressionResult, valueStore.AddObject(expressionResult));
            }
            return(Task.FromResult(response));
        }
コード例 #3
0
 public RemoteValue CreateValueFromAddress(string name, ulong address, SbType type) =>
 remoteProxy.CreateValueFromAddress(name, address, type);
コード例 #4
0
 public virtual RemoteValue CreateValueFromAddress(
     string name, ulong address, SbType type) => value.CreateValueFromAddress(name, address,
                                                                              type);