| 4532 | } |
| 4533 | |
| 4534 | void DbgModule::ParseDebugFrameData() |
| 4535 | { |
| 4536 | BP_ZONE("ParseDebugFrameData"); |
| 4537 | |
| 4538 | const uint8* data = mDebugFrameData; |
| 4539 | if (data == NULL) |
| 4540 | return; |
| 4541 | |
| 4542 | mParsedFrameDescriptors = true; |
| 4543 | Dictionary<addr_target, DwCommonFrameDescriptor*> commonFrameDescriptorMap; |
| 4544 | |
| 4545 | while (true) |
| 4546 | { |
| 4547 | addr_target relSectionAddr = (addr_target)(data - mDebugFrameData); |
| 4548 | |
| 4549 | int length = GET(int); |
| 4550 | if (length == 0) |
| 4551 | break; |
| 4552 | |
| 4553 | const uint8* dataEnd = data + length; |
| 4554 | |
| 4555 | int cieID = GET(int); |
| 4556 | |
| 4557 | if (cieID < 0) |
| 4558 | { |
| 4559 | BP_ALLOC_T(DwCommonFrameDescriptor); |
| 4560 | DwCommonFrameDescriptor* commonFrameDescriptor = mAlloc.Alloc<DwCommonFrameDescriptor>(); |
| 4561 | |
| 4562 | char version = GET(char); |
| 4563 | commonFrameDescriptor->mDbgModule = this; |
| 4564 | commonFrameDescriptor->mAugmentation = DataGetString(data); |
| 4565 | |
| 4566 | if (version >= 4) |
| 4567 | { |
| 4568 | commonFrameDescriptor->mPointerSize = GET(int8); |
| 4569 | commonFrameDescriptor->mSegmentSize = GET(int8); |
| 4570 | } |
| 4571 | |
| 4572 | commonFrameDescriptor->mCodeAlignmentFactor = (int)DecodeULEB128(data); |
| 4573 | commonFrameDescriptor->mDataAlignmentFactor = (int)DecodeSLEB128(data); |
| 4574 | commonFrameDescriptor->mReturnAddressColumn = (int)DecodeULEB128(data); |
| 4575 | commonFrameDescriptor->mInstData = data; |
| 4576 | commonFrameDescriptor->mInstLen = (int)(dataEnd - data); |
| 4577 | |
| 4578 | mDebugTarget->mCommonFrameDescriptors.push_back(commonFrameDescriptor); |
| 4579 | if (version < 3) |
| 4580 | commonFrameDescriptorMap[relSectionAddr] = commonFrameDescriptor; |
| 4581 | else |
| 4582 | commonFrameDescriptorMap[mDebugFrameAddress + relSectionAddr] = commonFrameDescriptor; |
| 4583 | } |
| 4584 | else |
| 4585 | { |
| 4586 | addr_target lowPC = GET(addr_target); |
| 4587 | addr_target highPC = lowPC + GET(addr_target); |
| 4588 | |
| 4589 | DwCommonFrameDescriptor* commonFrameDescriptor = commonFrameDescriptorMap[(addr_target)cieID]; |
| 4590 | |
| 4591 | BF_ASSERT(commonFrameDescriptor != NULL); |
nothing calls this directly
no test coverage detected