| 1188 | } |
| 1189 | |
| 1190 | void 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 | |
| 1215 | void VMManager::ClearELFInfo() |
| 1216 | { |
nothing calls this directly
no test coverage detected