mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-19 09:54:54 +00:00
elfviewer : detailed program headers info
This commit is contained in:
parent
a8a598aee4
commit
98068809aa
3 changed files with 111 additions and 6 deletions
|
@ -17,7 +17,7 @@ void ElfViewer::display(bool enabled)
|
|||
static int selected = -1;
|
||||
ImGui::Begin("Self/Elf Viewer", &enabled);
|
||||
|
||||
ImGui::BeginChild("Left Tree pane", ImVec2(200, 0), false);//left tree
|
||||
ImGui::BeginChild("Left Tree pane", ImVec2(300, 0), false);//left tree
|
||||
if (elf->isSelfFile())
|
||||
{
|
||||
if (ImGui::TreeNode("Self"))
|
||||
|
@ -57,7 +57,9 @@ void ElfViewer::display(bool enabled)
|
|||
const auto* elf_header = elf->GetElfHeader();
|
||||
for (u16 i = 0; i < elf_header->e_phnum; i++)
|
||||
{
|
||||
if (ImGui::TreeNodeEx((void*)(intptr_t)i,ImGuiTreeNodeFlags_Leaf | ImGuiTreeNodeFlags_NoTreePushOnOpen, "%d", i))
|
||||
const auto* pheader = elf->GetProgramHeader();
|
||||
std::string ProgramInfo = elf->ElfPheaderFlagsStr((pheader + i)->p_flags) + " " + elf->ElfPheaderTypeStr((pheader + i)->p_type);
|
||||
if (ImGui::TreeNodeEx((void*)(intptr_t)i,ImGuiTreeNodeFlags_Leaf | ImGuiTreeNodeFlags_NoTreePushOnOpen, "%d - %s", i,ProgramInfo.c_str()))
|
||||
{
|
||||
if (ImGui::IsItemClicked())
|
||||
selected = ELF_PROGRAM_HEADER_START + i;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue