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

Method SetupIDSizes

renderdoc/android/jdwp_connection.cpp:112–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112void Connection::SetupIDSizes()
113{
114 Command cmd(CommandSet::VirtualMachine, 7);
115 if(!SendReceive(cmd))
116 return;
117
118 int32_t fieldIDSize = 0;
119 int32_t methodIDSize = 0;
120 int32_t objectIDSize = 0;
121 int32_t referenceTypeIDSize = 0;
122 int32_t frameIDSize = 0;
123
124 cmd.GetData()
125 .Read(fieldIDSize)
126 .Read(methodIDSize)
127 .Read(objectIDSize)
128 .Read(referenceTypeIDSize)
129 .Read(frameIDSize)
130 .Done();
131
132 if(objectIDSize != referenceTypeIDSize)
133 {
134 RDCWARN("objectID (%d) is not the same size as referenceTypeID (%d). Could cause problems!",
135 objectIDSize, referenceTypeIDSize);
136 }
137
138 // we only support 4 or 8 bytes
139 if(fieldIDSize != 4 && fieldIDSize != 8)
140 {
141 RDCLOG("fieldID size %d is unsupported!", fieldIDSize);
142 error = true;
143 return;
144 }
145
146 fieldID::setSize(fieldIDSize);
147
148 // we only support 4 or 8 bytes
149 if(methodIDSize != 4 && methodIDSize != 8)
150 {
151 RDCLOG("methodID size %d is unsupported!", methodIDSize);
152 error = true;
153 return;
154 }
155
156 methodID::setSize(methodIDSize);
157
158 // we only support 4 or 8 bytes
159 if(objectIDSize != 4 && objectIDSize != 8)
160 {
161 RDCLOG("objectID size %d is unsupported!", objectIDSize);
162 error = true;
163 return;
164 }
165
166 objectID::setSize(objectIDSize);
167
168 // we only support 4 or 8 bytes
169 if(referenceTypeIDSize != 4 && referenceTypeIDSize != 8)

Callers 1

InjectLibrariesFunction · 0.80

Calls 4

setSizeFunction · 0.85
DoneMethod · 0.80
ReadMethod · 0.45
GetDataMethod · 0.45

Tested by

no test coverage detected