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

Method ParseDebugLineInfo

IDEHelper/DbgModule.cpp:4757–4985  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4755}
4756
4757bool DbgModule::ParseDebugLineInfo(const uint8*& dataPtr, int compileUnitIdx)
4758{
4759 BP_ZONE("ParseDebugLineInfo");
4760
4761 const uint8* data = dataPtr;
4762 const int startOffset = (int)(data - mDebugLineData);
4763 int length = GET(int);
4764 if (length == 0)
4765 return false;
4766 DbgCompileUnit* dwCompileUnit = mCompileUnits[compileUnitIdx];
4767 const uint8* dataEnd = data + length;
4768 short version = GET(short);
4769 int headerLength = GET(int);
4770 char minimumInstructionLength = GET(char);
4771 int maximumOperationsPerInstruction = 1;
4772 char defaultIsStmt = GET(char);
4773 char lineBase = GET(char);
4774 char lineRange = GET(char);
4775 char opcodeBase = GET(char);
4776 for (int i = 0; i < opcodeBase - 1; i++)
4777 {
4778 char standardOpcodeLengths = GET(char);
4779 }
4780
4781 Array<const char*> directoryNames;
4782 while (true)
4783 {
4784 const char* name = DataGetString(data);
4785 if (name[0] == 0)
4786 break;
4787 directoryNames.push_back(name);
4788 }
4789
4790 DbgSrcFileReference* dwSrcFileRef = NULL;
4791
4792 HashSet<String> foundPathSet;
4793
4794 int curFileIdx = 0;
4795
4796 DbgSubprogram* curSubprogram = NULL;
4797
4798 #define ADD_LINEDATA(lineData) \
4799 lineBuilder.Add(dwCompileUnit, lineData, dwSrcFileRef->mSrcFile, NULL);
4800
4801 while (true)
4802 {
4803 const char* path = DataGetString(data);
4804 if (path[0] == 0)
4805 break;
4806 int directoryIdx = (int)DecodeULEB128(data);
4807 int lastModificationTime = (int)DecodeULEB128(data);
4808 int fileLength = (int)DecodeULEB128(data);
4809
4810 String filePath;
4811 if (directoryIdx > 0)
4812 filePath = String(directoryNames[directoryIdx - 1]) + "/";
4813 filePath += path;
4814 filePath = GetAbsPath(filePath, dwCompileUnit->mCompileDir);

Callers

nothing calls this directly

Calls 9

DecodeULEB128Function · 0.85
StringClass · 0.85
DecodeSLEB128Function · 0.85
frontMethod · 0.80
DataGetStringFunction · 0.70
push_backMethod · 0.45
c_strMethod · 0.45
sizeMethod · 0.45
CommitMethod · 0.45

Tested by

no test coverage detected