Beispiel #1
0
        private async Task InvalidateFunctions(uint functionIndexStart, uint functionIndexEnd)
        {
            var fbb = Debugger.BeginRequest();
            int requestDataOffset = ListFunctionsRequest.CreateListFunctionsRequest(
                fbb, Handle, functionIndexStart, functionIndexEnd);
            var response = await Debugger.CommitRequest(
                fbb, RequestData.ListFunctionsRequest, requestDataOffset);

            var responseData = new ListFunctionsResponse();

            response.GetResponseData(responseData);

            var functionEntry = new xe.debug.proto.FunctionEntry();

            for (int i = 0; i < responseData.EntryLength; ++i)
            {
                responseData.GetEntry(functionEntry, i);
                var function = new Function(Debugger, this, functionEntry);
                functions.Add(function);
            }

            functions.Sort((Function a, Function b) => {
                return((int)((long)a.AddressStart - (long)b.AddressStart));
            });
        }
Beispiel #2
0
 public Function(Debugger debugger, Module module, xe.debug.proto.FunctionEntry functionEntry)
 {
     this.self     = this;
     this.Debugger = debugger;
     this.Module   = module;
     Identifier    = functionEntry.Identifier;
     AddressStart  = functionEntry.AddressStart;
     AddressEnd    = functionEntry.AddressEnd;
     Name          = functionEntry.Name;
 }
Beispiel #3
0
 public static int CreateFunctionEntry(FlatBufferBuilder builder,
                                       ulong identifier   = 0,
                                       uint address_start = 0,
                                       uint address_end   = 0,
                                       int name           = 0)
 {
     builder.StartObject(4);
     FunctionEntry.AddIdentifier(builder, identifier);
     FunctionEntry.AddName(builder, name);
     FunctionEntry.AddAddressEnd(builder, address_end);
     FunctionEntry.AddAddressStart(builder, address_start);
     return(FunctionEntry.EndFunctionEntry(builder));
 }
Beispiel #4
0
 public FunctionEntry GetEntry(FunctionEntry obj, int j)
 {
     int o = __offset(4); return(o != 0 ? obj.__init(__indirect(__vector(o) + j * 4), bb) : null);
 }
Beispiel #5
0
 public static FunctionEntry GetRootAsFunctionEntry(ByteBuffer _bb, FunctionEntry obj)
 {
     return(obj.__init(_bb.GetInt(_bb.Position) + _bb.Position, _bb));
 }
 public FunctionEntry GetEntry(FunctionEntry obj, int j)
 {
     int o = __offset(4); return o != 0 ? obj.__init(__indirect(__vector(o) + j * 4), bb) : null;
 }
Beispiel #7
0
 public static FunctionEntry GetRootAsFunctionEntry(ByteBuffer _bb, FunctionEntry obj)
 {
     return (obj.__init(_bb.GetInt(_bb.Position) + _bb.Position, _bb));
 }