MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / UpdateELFInfo

Method UpdateELFInfo

pcsx2/VMManager.cpp:1190–1213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1188}
1189
1190void VMManager::UpdateELFInfo(std::string elf_path)
1191{
1192 Error error;
1193 ElfObject elfo;
1194 if (elf_path.empty() || !cdvdLoadElf(&elfo, elf_path, false, &error))
1195 {
1196 if (!elf_path.empty())
1197 Console.Error(fmt::format("Failed to read ELF being loaded: {}: {}", elf_path, error.GetDescription()));
1198
1199 s_elf_path = {};
1200 s_elf_text_range = {};
1201 s_elf_entry_point = 0xFFFFFFFFu;
1202 s_current_crc = 0;
1203 return;
1204 }
1205
1206 elfo.LoadHeaders();
1207 s_current_crc = elfo.GetCRC();
1208 s_elf_entry_point = elfo.GetEntryPoint();
1209 s_elf_text_range = elfo.GetTextRange();
1210 s_elf_path = std::move(elf_path);
1211
1212 R5900SymbolImporter.OnElfChanged(elfo.ReleaseData(), s_elf_path);
1213}
1214
1215void VMManager::ClearELFInfo()
1216{

Callers

nothing calls this directly

Calls 10

cdvdLoadElfFunction · 0.85
GetDescriptionMethod · 0.80
LoadHeadersMethod · 0.80
GetEntryPointMethod · 0.80
GetTextRangeMethod · 0.80
OnElfChangedMethod · 0.80
formatFunction · 0.50
emptyMethod · 0.45
ErrorMethod · 0.45
GetCRCMethod · 0.45

Tested by

no test coverage detected