MCPcopy Create free account
hub / github.com/beefytech/Beef / ParseSymbolData

Method ParseSymbolData

IDEHelper/Linker/BlCvParser.cpp:234–474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232}
233
234void BlCvParser::ParseSymbolData(void* symbolData, int size, void* relocData, int numRelocs)
235{
236// static int itrCount = 0;
237// itrCount++;
238//
239// if (itrCount == 0x32)
240// {
241// NOP;
242// }
243
244 uint8* data = (uint8*)symbolData;
245 uint8* symDataEnd = data + size;
246
247 int sig = GET(int32);
248 if (sig != CV_SIGNATURE_C13)
249 {
250 Fail("Invalid debug signature");
251 return;
252 }
253
254 bool relocFailed = false;
255 uint8* fileChecksumStart = NULL;
256 uint8* fileChecksumEnd = NULL;
257
258 COFFRelocation* nextReloc = (COFFRelocation*)relocData;
259 COFFRelocation* relocEnd = nextReloc + numRelocs;
260 const char* strTable = NULL;
261
262 while (data < symDataEnd)
263 {
264 int sectionNum = GET(int32);
265 int sectionLen = GET(int32);
266 uint8* sectionStart = data;
267 uint8* sectionEnd = data + sectionLen;
268 if (sectionNum == DEBUG_S_STRINGTABLE)
269 {
270 //BF_ASSERT(mCurModule->mStrTab.size() == 0);
271 //mCurModule->mStrTab.insert(mCurModule->mStrTab.begin(), (char*)sectionStart, (char*)sectionEnd);
272 strTable = (char*)sectionStart;
273 }
274 else if (sectionNum == DEBUG_S_FILECHKSMS)
275 {
276 fileChecksumStart = sectionStart;
277 fileChecksumEnd = sectionEnd;
278 }
279 data = sectionEnd;
280 PTR_ALIGN(data, (uint8*)symbolData, 4);
281 }
282
283 //int bytesPerFile = 24;
284
285 // Handle DEBUG_S_FILECHKSMS
286 if (fileChecksumStart != NULL)
287 {
288 data = fileChecksumStart;
289 uint8* sectionStart = data;
290 uint8* sectionEnd = fileChecksumEnd;
291

Callers

nothing calls this directly

Calls 9

FailFunction · 0.85
BlCvLineInfoBlockClass · 0.85
AddToStringTableMethod · 0.80
resizeMethod · 0.45
reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
AllocMethod · 0.45
backMethod · 0.45

Tested by

no test coverage detected