From 5a8e4c1c2e451bb5ce1948cb698d29625a6b5194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 15 Mar 2025 17:52:39 +0100 Subject: [PATCH] Assorted debugger stuff --- Core/HLE/sceKernelModule.cpp | 6 +++--- Core/HLE/sceUtility.cpp | 14 +++++++------- UI/ImDebugger/ImDebugger.cpp | 11 ++++++++--- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index e5ffc05b8b..a864f25e82 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -277,9 +277,9 @@ public: const char *GetTypeName() override { return GetStaticTypeName(); } static const char *GetStaticTypeName() { return "Module"; } void GetQuickInfo(char *ptr, int size) override { - snprintf(ptr, size, "%s %d.%d name=%s gp=%08x entry=%08x", - isFake ? "faked " : "", - nm.version[0], nm.version[1], + snprintf(ptr, size, "%d.%d %sname=%s gp=%08x entry=%08x", + nm.version[1], nm.version[0], + isFake ? "(faked) " : "", nm.name, nm.gp_value, nm.entry_addr); diff --git a/Core/HLE/sceUtility.cpp b/Core/HLE/sceUtility.cpp index 75c18d8340..961657886c 100644 --- a/Core/HLE/sceUtility.cpp +++ b/Core/HLE/sceUtility.cpp @@ -108,13 +108,13 @@ static const ModuleLoadInfo moduleLoadInfo[] = { ModuleLoadInfo(0x104, 0x00002000, "net_parse_http"), ModuleLoadInfo(0x105, 0x00028000, "net_http", httpModuleDeps), ModuleLoadInfo(0x106, 0x00044000, "net_ssl", sslModuleDeps), - ModuleLoadInfo(0x107, 0x00010000, "0x107"), + ModuleLoadInfo(0x107, 0x00010000, "unk_0x107"), ModuleLoadInfo(0x108, 0x00008000, "usb_pspcm", httpStorageModuleDeps), ModuleLoadInfo(0x200, 0x00000000, "usb_mic"), ModuleLoadInfo(0x201, 0x00000000, "usb_cam"), ModuleLoadInfo(0x202, 0x00000000, "usb_gps"), - ModuleLoadInfo(0x203, 0x00000000, "0x203"), - ModuleLoadInfo(0x2ff, 0x00000000, "0x2ff"), + ModuleLoadInfo(0x203, 0x00000000, "usb_unk_0x203"), + ModuleLoadInfo(0x2ff, 0x00000000, "unk_0x2ff"), ModuleLoadInfo(0x300, 0x00000000, "av_avcodec", &NotifyLoadStatusAvcodec), ModuleLoadInfo(0x301, 0x00000000, "av_sascore"), ModuleLoadInfo(0x302, 0x00008000, "av_atrac3plus", atrac3PlusModuleDeps, &NotifyLoadStatusAtrac), // TODO: 0x8000 is likely too large. @@ -123,16 +123,16 @@ static const ModuleLoadInfo moduleLoadInfo[] = { ModuleLoadInfo(0x305, 0x0000a300, "av_vaudio"), ModuleLoadInfo(0x306, 0x00004000, "av_aac"), ModuleLoadInfo(0x307, 0x00000000, "av_g729"), - ModuleLoadInfo(0x308, 0x0003c000, "av_", mp4ModuleDeps), + ModuleLoadInfo(0x308, 0x0003c000, "av_mp4", mp4ModuleDeps), ModuleLoadInfo(0x3fe, 0x00000000, "me_stuff"), ModuleLoadInfo(0x3ff, 0x00000000, "me_core"), // ME Core? ModuleLoadInfo(0x400, 0x0000c000, "np_common"), ModuleLoadInfo(0x401, 0x00018000, "np_service"), ModuleLoadInfo(0x402, 0x00048000, "np_matching2"), - ModuleLoadInfo(0x403, 0x0000e000, "0x403"), + ModuleLoadInfo(0x403, 0x0000e000, "np_unk_0x403"), ModuleLoadInfo(0x500, 0x00000000, "np_drm"), ModuleLoadInfo(0x600, 0x00000000, "irda"), - ModuleLoadInfo(0x601, 0x00000000, "0x601"), + ModuleLoadInfo(0x601, 0x00000000, "unk_0x601"), }; // Only a single dialog is allowed at a time. @@ -576,7 +576,7 @@ static int LoadModuleInternal(u32 module) { u32 allocSize = info->size; u32 address = 0; char name[128]; - snprintf(name, sizeof(name), "UtilityModule/%x", module); + snprintf(name, sizeof(name), "UtilityModule/%3x_%s", module, info->name); if (allocSize != 0) { address = userMemory.Alloc(allocSize, false, name); } diff --git a/UI/ImDebugger/ImDebugger.cpp b/UI/ImDebugger/ImDebugger.cpp index dadf583bee..bc466c5772 100644 --- a/UI/ImDebugger/ImDebugger.cpp +++ b/UI/ImDebugger/ImDebugger.cpp @@ -1575,6 +1575,10 @@ void ImDebugger::Frame(MIPSDebugInterface *mipsDebug, GPUDebugInterface *gpuDebu } ImGui::EndMenu(); } + if (ImGui::BeginMenu("Core")) { + ImGui::MenuItem("Scheduler", nullptr, &cfg_.schedulerOpen); + ImGui::EndMenu(); + } if (ImGui::BeginMenu("CPU")) { ImGui::MenuItem("CPU debugger", nullptr, &cfg_.disasmOpen); ImGui::MenuItem("GPR regs", nullptr, &cfg_.gprOpen); @@ -1582,8 +1586,9 @@ void ImDebugger::Frame(MIPSDebugInterface *mipsDebug, GPUDebugInterface *gpuDebu ImGui::MenuItem("VFPU regs", nullptr, &cfg_.vfpuOpen); ImGui::MenuItem("Callstacks", nullptr, &cfg_.callstackOpen); ImGui::MenuItem("Breakpoints", nullptr, &cfg_.breakpointsOpen); - ImGui::MenuItem("Scheduler", nullptr, &cfg_.schedulerOpen); - ImGui::Separator(); + ImGui::EndMenu(); + } + if (ImGui::BeginMenu("Memory")) { for (int i = 0; i < 4; i++) { char title[64]; snprintf(title, sizeof(title), "Memory %d", i + 1); @@ -1592,7 +1597,7 @@ void ImDebugger::Frame(MIPSDebugInterface *mipsDebug, GPUDebugInterface *gpuDebu ImGui::MenuItem("Memory Dumper", nullptr, &cfg_.memDumpOpen); ImGui::EndMenu(); } - if (ImGui::BeginMenu("HLE")) { + if (ImGui::BeginMenu("OS HLE")) { ImGui::MenuItem("File System Browser", nullptr, &cfg_.filesystemBrowserOpen); ImGui::MenuItem("Kernel Objects", nullptr, &cfg_.kernelObjectsOpen); ImGui::MenuItem("Threads", nullptr, &cfg_.threadsOpen);