MCPcopy Create free account
hub / github.com/Inori/GPCS4 / loadFile

Method loadFile

GPCS4/Loader/ELFMapper.cpp:19–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17LOG_CHANNEL(Loader.ELFMapper);
18
19bool ELFMapper::loadFile(std::string const &filePath, NativeModule *mod)
20{
21 plat::file_uptr file = {};
22 bool retVal = false;
23
24 do
25 {
26 if (mod == nullptr)
27 {
28 LOG_ERR("Null module pointer");
29 break;
30 }
31
32 m_moduleData = mod;
33
34 if (!plat::LoadFile(filePath, mod->m_fileMemory))
35 {
36 LOG_ERR("failed to load file %s", filePath.c_str());
37 break;
38 }
39
40 retVal = true;
41 } while (false);
42 return retVal;
43}
44
45bool ELFMapper::validateHeader()
46{

Callers 1

loadModuleFromFileMethod · 0.80

Calls 2

LoadFileFunction · 0.85
c_strMethod · 0.45

Tested by

no test coverage detected