fix on loading elf file instead of self

This commit is contained in:
georgemoralis 2023-05-22 13:58:41 +03:00
parent 5f0b15e2fa
commit 76987fb932
1 changed files with 8 additions and 6 deletions

View File

@ -273,13 +273,15 @@ void Elf::DebugDump() {
spdlog::set_default_logger(std::make_shared<spdlog::logger>("shadps4 logger", begin(sinks), end(sinks))); spdlog::set_default_logger(std::make_shared<spdlog::logger>("shadps4 logger", begin(sinks), end(sinks)));
auto f = std::make_unique<spdlog::pattern_formatter>("%v", spdlog::pattern_time_type::local, std::string("")); // disable eol auto f = std::make_unique<spdlog::pattern_formatter>("%v", spdlog::pattern_time_type::local, std::string("")); // disable eol
spdlog::set_formatter(std::move(f)); spdlog::set_formatter(std::move(f));
spdlog::info(SElfHeaderStr()); if (m_self != nullptr) {//if we load elf instead
spdlog::info("\n"); spdlog::info(SElfHeaderStr());
for (u16 i = 0; i < m_self->segment_count; i++) spdlog::info("\n");
{ for (u16 i = 0; i < m_self->segment_count; i++)
spdlog::info(SELFSegHeader(i)); {
spdlog::info(SELFSegHeader(i));
}
spdlog::info("\n");
} }
spdlog::info("\n");
spdlog::info(ElfHeaderStr()); spdlog::info(ElfHeaderStr());