MCPcopy Create free account
hub / github.com/baldurk/renderdoc / InvokeInstance

Method InvokeInstance

renderdoc/android/jdwp_connection.cpp:564–605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

562}
563
564value Connection::InvokeInstance(threadID thread, classID clazz, methodID method, objectID object,
565 const rdcarray<value> &arguments, InvokeOptions options)
566{
567 Command cmd;
568 CommandData data = cmd.GetData();
569
570 // static or instance invoke
571 if(object == 0)
572 {
573 cmd.commandset = CommandSet::ClassType;
574 cmd.command = 3;
575
576 data.Write(clazz).Write(thread).Write(method);
577 }
578 else
579 {
580 cmd.commandset = CommandSet::ObjectReference;
581 cmd.command = 6;
582
583 data.Write(object).Write(thread).Write(clazz).Write(method);
584 }
585
586 WriteVector<value>(data, arguments, [](CommandData &d, const value &v) { d.Write(v); });
587
588 data.Write((int32_t)options);
589
590 if(!SendReceive(cmd))
591 return {};
592
593 value returnValue;
594 taggedObjectID exception;
595
596 cmd.GetData().Read(returnValue).Read(exception).Done();
597
598 if(exception.id != 0)
599 {
600 RDCERR("Exception encountered while invoking method");
601 return {};
602 }
603
604 return returnValue;
605}
606
607rdcstr Connection::GetString(objectID str)
608{

Callers 2

InjectLibrariesFunction · 0.80

Calls 4

DoneMethod · 0.80
GetDataMethod · 0.45
WriteMethod · 0.45
ReadMethod · 0.45

Tested by

no test coverage detected