| 2317 | } |
| 2318 | |
| 2319 | DbgSubprogram* DbgModule::FindSubprogram(DbgType* dbgType, const char * methodName) |
| 2320 | { |
| 2321 | dbgType = dbgType->GetPrimaryType(); |
| 2322 | dbgType->PopulateType(); |
| 2323 | |
| 2324 | if (dbgType->mNeedsGlobalsPopulated) |
| 2325 | PopulateTypeGlobals(dbgType); |
| 2326 | |
| 2327 | for (auto methodNameEntry : dbgType->mMethodNameList) |
| 2328 | { |
| 2329 | if ((methodNameEntry->mCompileUnitId != -1) && (strcmp(methodNameEntry->mName, methodName) == 0)) |
| 2330 | { |
| 2331 | // If we hot-replaced this type then we replaced and parsed all the methods too |
| 2332 | if (!dbgType->mCompileUnit->mDbgModule->IsObjectFile()) |
| 2333 | dbgType->mCompileUnit->mDbgModule->MapCompileUnitMethods(methodNameEntry->mCompileUnitId); |
| 2334 | methodNameEntry->mCompileUnitId = -1; |
| 2335 | } |
| 2336 | } |
| 2337 | |
| 2338 | DbgSubprogram* result = NULL; |
| 2339 | for (auto method : dbgType->mMethodList) |
| 2340 | { |
| 2341 | if (strcmp(method->mName, methodName) == 0) |
| 2342 | { |
| 2343 | method->PopulateSubprogram(); |
| 2344 | if ((result == NULL) || (method->mBlock.mLowPC != 0)) |
| 2345 | result = method; |
| 2346 | } |
| 2347 | } |
| 2348 | |
| 2349 | return result; |
| 2350 | } |
| 2351 | |
| 2352 | void DbgModule::Fail(const StringImpl& error) |
| 2353 | { |
nothing calls this directly
no test coverage detected