Repository navigation
feat(libkernel): log guest exception context - #7655
Conversation
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Windows run, since the description covers Linux only. Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), Windows 11 26300, WinLibs GCC 15.2.0 r7, Release, The build is clean. The existing guest exception tests pass 3 runs of 3: AI-assisted |
|
Checked the context dump: the fixed 768-byte buffer holds the longest line (~520 bytes), it only uses |
What
Log the saved guest signal context before invoking a guest exception handler: signal number, RIP/RSP, flags, trap/error/fault fields, and general-purpose registers. Format into a fixed buffer and write directly to stderr, avoiding the normal logger in the POSIX signal-handler path. Debug-raise APIs now print exception codes in hex and include the caller address. These diagnostics do not change handler or termination behavior.
Tested
Linux x86-64:
cmake --build build --target libs --parallelpassed; no source errors reported. Manual runtime check produced:[src/Exception.cpp:576 sceKernelDebugRaiseExceptionOnReleaseMode] ... c1=0xa0020004 c2=0x00000000 caller=...The process still terminates on its existing SIGILL. The guest-register dump path was not exercised by that run because the unhandled host SIGILL bypasses guest exception dispatch. Windows not tested.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)