Commit Graph
505 Commits
Author SHA1 Message Date
Henrik Rydgård 39c8cbbde1 Use the new kernel module description thing to annotate GPRs in the register viewer 2026-07-28 00:15:41 +02:00
Henrik RydgårdandClaude Opus 5 9b577b5f46 Show module.section+offset next to addresses in exception/stack-trace logs
Added KernelModuleAddressDescription() (Core/HLE/sceKernelModule.cpp),
which looks up which currently loaded module (and text/data/bss/segment
section within it) an address falls in, e.g. "EBOOT.BIN.text+1234".
Wired it into:

- Core_MemoryException/Core_ExecException/Core_BreakException
  (Core/Core.cpp), appended next to every address/pc/ra shown in their
  log lines.
- FormatStackTrace (Core/MemFault.cpp), appended per-frame next to the
  existing symbol description.

This makes crash/exception logs actionable even when there's no symbol
at the faulting address - you at least get which module and section
it's in, useful for reverse engineering unfamiliar code.

Verified live via headless: injected a MIPS break instruction at the
current PC (through Tools/wsdbg) and confirmed the log line changed from
"break instruction hit at 088040ac" to "break instruction hit at 088040ac
[sceDisplayWaitVblank Test.text+ac]".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XDNwPPuidmNxQGRJxBuRL6
2026-07-27 23:44:14 +02:00
Henrik Rydgård 02aedb598d Detect the main VSH module and log 2026-07-27 23:44:14 +02:00
Henrik Rydgård 26ff5fdb00 Robustness fix 2026-07-25 14:53:40 +02:00
Henrik RydgårdandClaude Sonnet 5 ca34a14fd8 Resolve unresolved-import calls to a module/NID in the "Unknown syscall" log
A call through a still-pending import gets written as a generic "invalid
syscall" opcode (WriteFuncMissingStub) that no longer carries the
original module name or NID by the time it's actually invoked - but the
address of the syscall instruction itself is exactly the stubAddr every
pending FuncSymbolImport already records. Added
KernelFindImportByStubAddr() to search loaded modules' importedFuncs for
a match, and use it in GetSyscallFuncPointer's unknown-syscall path.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-25 14:52:19 +02:00
Henrik Rydgård 16c7ec390f Headless: Start taking logic out of the "HeadlessHost"
Also update some agent files
2026-07-21 11:01:48 +02:00
Henrik Rydgård 3fd9b42f95 Fix playback of framedumps for headless 2026-07-18 19:09:46 +02:00
Henrik Rydgård a6516c8d66 __KernelModuleDoState: Only apply function replacement on state load. Improves performance of rewind states 2026-07-14 20:31:39 +02:00
Henrik Rydgård f60e27a9b7 Just some refactoring of the GPUStatistics struct, and more use of StringWriter 2026-05-29 14:40:31 +02:00
Henrik Rydgård eca6f98a53 Register another function in ModuleMgrForKernel. Logging cleanup 2026-04-14 12:41:14 -06:00
Henrik Rydgård 56be37a2e4 Correct two minor bugs causing reported crashes 2026-03-13 10:16:25 +01:00
Katharine Chui f4be7a990b Fix Driver 76 not creating adhoc sockets
Driver 76 uses sceKernelGetModuleIdList to get a module list
after calling sceUtilityLoadNetModule, then go module by module
with sceKernelQueryModuleInfo to check if at least pspnet_adhoc.prx
was loaded.

Load modules during sceUtilityLoadNetModule, expand success lying
modules to have real names, add adhoc modules to the success lying
list, list lied modules during sceKernelGetModuleIdList.
2026-02-15 22:24:27 +01:00
Henrik Rydgård 6ae4fee26b Reduce the limit for ELF size to 24MB (still unreasonably large) 2026-02-05 13:26:20 +01:00
Henrik Rydgård 5f7a937466 Rename ValidSize to ClampValidSizeAt 2025-12-30 20:31:07 +01:00
Henrik Rydgård 9caec3ec2d Fix #21065 - add checks in __KernelLoadModule to avoid buffer overflows 2025-12-15 23:35:07 +01:00
Henrik Rydgård 7975261b02 Minor compiler warning fix 2025-09-23 13:08:07 -06:00
oltolm de3abcf579 fix compiler warnings 2025-09-19 11:36:11 +02:00
Henrik Rydgård f2df336f79 Resolve #20746 by checking addresses harshly in MIPSAnalyst
By fixing up badly aligned addresses in HLESubscriber.cpp.

This should help eliminate any bad usage within PPSSPP itself, while
also keeping existing websocket code working.

Additionally, this makes some end addresses exclusive instead of
inclusive, which simplifies address math.
2025-09-03 20:32:19 +02:00
Henrik RydgårdandGitHub c24e8f84e6 Merge pull request #20433 from Kethen/early_plugin_load
Run module_start of plugins before starting boot module
2025-07-24 10:25:55 +02:00
Henrik Rydgård df23d178e5 Module loading: Also check plain ELF modules if they should be HLE:d.
- Fixes #20568
2025-06-26 14:25:04 +02:00
Henrik Rydgård b9b3669798 Log the name of started modules 2025-06-26 13:23:15 +02:00
Henrik Rydgård 413f468b6d Unrelated comment 2025-06-14 08:44:17 +02:00
Katharine Chui 7bab953c92 verify thread wait type before resuming thread from plugin waiting 2025-06-13 23:29:49 +02:00
Katharine Chui 326448636b Run module_start of plugins before starting boot module 2025-06-13 23:29:49 +02:00
Henrik Rydgård e3ad5951e3 Add alignment check for function exports (but don't reject, just log) 2025-06-13 10:34:05 +02:00
Henrik Rydgård bc0d3ae26c Remove bad check for exported variables (they don't need to be aligned) 2025-06-13 10:33:46 +02:00
Henrik Rydgård ba148e5ec7 JIT/IRJit: Delete an old "function preloading" experiment
This caused some confusion while trying to debug #20502
2025-06-11 15:45:18 +02:00
Henrik Rydgård 44d06ec42f Add some sanity checks guided by Android crash reports 2025-06-07 16:35:19 +02:00
Henrik Rydgård 5260be6f69 Warning fixes, alignment checks 2025-05-15 09:48:23 +02:00
Henrik Rydgård fba2489c79 Remove dubious parallelization in ELF loading, initialize a var, add some checks 2025-05-15 09:48:23 +02:00
Henrik Rydgård 77d9c769fa ImDebugger: Fix a couple of software rendering-related crashes 2025-04-30 11:50:43 +02:00
Henrik Rydgård dbe6ec80a0 Fix some bad "for (auto x : y)" usage 2025-04-29 16:46:14 +02:00
Henrik Rydgård a870c2155d Always load sceCcc if possible (disable HLE). PRX dumping fix. 2025-04-06 23:34:16 +02:00
Henrik Rydgård 62cd4bbefc Minor cleanups and fixes. sceJpeg will not work without HLE, so removed from disable-list. 2025-04-03 18:16:10 +02:00
Henrik Rydgård a555fe8924 Partially implement sceReg 2025-04-03 14:13:50 +02:00
Henrik Rydgård 343ca2600a Add a developer setting to disable individual HLE modules, allowing them to be loaded properly.
Some games survive with a loaded sceAtrac, and start talking to
sceAudioCodec instead, the underlying library, though unsuccessfully
since it's not properly implemented yet.
2025-04-02 10:19:24 +02:00
Henrik Rydgård 5e18576f59 Separate imports and exports for listing. 2025-04-02 10:09:19 +02:00
Henrik Rydgård 2fddf50653 Correct PRX dumping (was using the wrong size) 2025-04-02 10:09:19 +02:00
Henrik Rydgård 4a15ff950c ImDebugger: Add new Modules windows, turn the old Modules window into what will be a symbol browser 2025-04-02 10:09:19 +02:00
Henrik Rydgård 95efd11bcb More minor cleanup 2025-03-31 12:20:39 +02:00
Henrik Rydgård a79f986411 More module loading cleanup, choose better filenames for dumped PRX files 2025-03-31 12:09:25 +02:00
Henrik Rydgård 7e2f724d35 Minor cleanup in __KernelLoadELFFromPtr 2025-03-31 11:53:39 +02:00
Henrik Rydgård 4e25f44eef Rename some module-related functions to include HLE where appropriate 2025-03-31 11:17:50 +02:00
Henrik Rydgård 2bfe327dbd Expose PSPThread in the same manner 2025-03-31 10:24:03 +02:00
Henrik Rydgård 644f5e4e6c Expose PSPModule (so the debugger can access it later) 2025-03-31 09:56:08 +02:00
Henrik Rydgård dd7cac5cdc Some const correctness 2025-03-27 02:13:01 +01:00
Henrik Rydgård ae8f8c4abd Refactor TakeGameScreenshot a bit. 2025-03-20 17:41:44 +01:00
Henrik Rydgård ef4e04c8a1 Pass more filename information into elf loading. Allow dumping PRX into elf. 2025-03-19 10:42:32 +01:00
Henrik Rydgård c4241e283a Prepare to generalize file dumping 2025-03-19 09:46:25 +01:00
Henrik Rydgård cef14adf67 Assorted logging fixes and cleanup 2025-03-18 13:48:12 +01:00