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

Method CheckSourceFileExist

IDEHelper/DbgModule.cpp:7316–7341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7314}*/
7315
7316DbgFileExistKind DbgModule::CheckSourceFileExist(const StringImpl& path)
7317{
7318 DbgFileExistKind existsKind = DbgFileExistKind_NotFound;
7319
7320 if (path.StartsWith("$Emit"))
7321 return DbgFileExistKind_Found;
7322
7323 if (FileExists(path))
7324 existsKind = DbgFileExistKind_Found;
7325
7326 String oldSourceCommand = GetOldSourceCommand(path);
7327 if (!oldSourceCommand.IsEmpty())
7328 {
7329 int crPos = (int)oldSourceCommand.IndexOf('\n');
7330 if (crPos != -1)
7331 {
7332 String targetPath = oldSourceCommand.Substring(0, crPos);
7333 if (FileExists(targetPath))
7334 existsKind = DbgFileExistKind_Found;
7335 else
7336 existsKind = DbgFileExistKind_HasOldSourceCommand;
7337 }
7338 }
7339
7340 return existsKind;
7341}
7342
7343void DbgModule::EnableWriting(addr_target address)
7344{

Callers 1

IsStepFilteredMethod · 0.80

Calls 4

SubstringMethod · 0.80
StartsWithMethod · 0.45
IsEmptyMethod · 0.45
IndexOfMethod · 0.45

Tested by

no test coverage detected