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

Method ParseTypeData

IDEHelper/Linker/BlCvParser.cpp:151–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151void BlCvParser::ParseTypeData(void* typeData, int size)
152{
153 uint8* data = (uint8*)typeData;
154 uint8* dataEnd = data + size;
155
156 int sig = GET(int32);
157 if (sig != CV_SIGNATURE_C13)
158 {
159 Fail("Invalid debug signature");
160 return;
161 }
162
163 bool useWorkList = true;
164
165 if (*(int16*)(data + 2) == LF_TYPESERVER2)
166 {
167 lfTypeServer2& typeServer = *(lfTypeServer2*)(data + 2);
168
169 String filePath = (char*)typeServer.name;
170 String fixedFilePath = FixPathAndCase(filePath);
171 auto itr = mCodeView->mTypeServerFiles.find(fixedFilePath);
172 if (itr == mCodeView->mTypeServerFiles.end())
173 {
174 auto itrPair = mCodeView->mTypeServerFiles.insert(std::make_pair(fixedFilePath, (BlCvTypeSource*)NULL));
175 BlPdbParser* pdbParser = new BlPdbParser();
176 pdbParser->mTypeSource = new BlCvTypeSource;
177 itrPair.first->second = pdbParser->mTypeSource;
178 pdbParser->mTypeSource->mTypeServerLib = pdbParser;
179 pdbParser->mTypeSource->Init(mCodeView);
180
181 if (FileExists(filePath))
182 {
183 pdbParser->mFileName = filePath;
184 }
185 else
186 {
187 String fileName = GetFileName(filePath);
188 String checkFilePath;
189 if (mCurModule->mObjectData->mLib != NULL)
190 checkFilePath = GetFileDir(mCurModule->mObjectData->mLib->mFileName);
191 else
192 checkFilePath = GetFileDir(mCurModule->mObjectData->mName);
193 checkFilePath += fileName;
194 pdbParser->mFileName = checkFilePath;
195 }
196
197 if (useWorkList)
198 {
199 mCodeView->mTypeWorkThread.Add(pdbParser->mTypeSource);
200 }
201 else
202 {
203 pdbParser->Load(pdbParser->mFileName);
204 }
205
206 mCurModule->mTypeSource = pdbParser->mTypeSource;
207 }
208 else

Callers 1

RunMethod · 0.45

Calls 7

FailFunction · 0.85
findMethod · 0.80
ScanTypeDataMethod · 0.80
endMethod · 0.45
InitMethod · 0.45
AddMethod · 0.45
LoadMethod · 0.45

Tested by

no test coverage detected