feat(libkernel): implement coredump user data calls #4197

Merged
MarcZX10 merged 1 commit from upstream-pr/4197 into main 2026-10-13 05:24:29 +00:00
MarcZX10 commented 2026-10-12 01:06:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-12T01:06:38Z.


What

Carries only screamm’s first ready commit from #4144, preserving its original author. Implements sceCoredumpWriteUserData and sceCoredumpDebugTextOut: because the core dump handler is not invoked in this runtime, WriteUserData returns the not-in-handler error and stores no data, while debug text is written to stderr with the existing coredump prefix.

The signatures come from Orbital and SharpProspero; the outside-handler rule is supported by Vita documentation. Error 0x81180003 is shadPS4’s PS4 numbering and is unverified on PS5; that uncertainty is recorded in TechnicalDebt. sceCoredumpWriteUserString and the other undocumented calls remain throwing stubs.

Coordination: open #3821 implements the separate attach calls. It shares the error constant and region-validation helper in Coredump.cpp; this PR does not implement those attach calls. The changes are independent, but a small textual rebase may be needed if #3821 lands first.

Tested

  • Linux Release configure with GCC, BUILD_TESTING=ON, and ANYPS5_ENABLE_SPIRV_TOOLS=ON completed.
  • Built guest_coredump_user_data_tests with Ninja (62/62 steps).
  • ctest --test-dir /tmp/AnyPS5-4173-build -R '^guest_coredump_user_data$' --output-on-failure --timeout 60 passed (1/1).
  • python3 tools/check_conventions.py --base upstream/main --head HEAD passed.
  • git diff --check passed.

Checklist

  • Based on current main; no other open PR implements these calls
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none; see coordination note about #3821’s adjacent helper
  • AI-assisted: yes (original commit co-authored by Claude; carried and validated with Codex)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4823732785 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4197). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-12T01:06:38Z. --- ### What Carries only screamm’s first ready commit from #4144, preserving its original author. Implements `sceCoredumpWriteUserData` and `sceCoredumpDebugTextOut`: because the core dump handler is not invoked in this runtime, `WriteUserData` returns the not-in-handler error and stores no data, while debug text is written to stderr with the existing coredump prefix. The signatures come from Orbital and SharpProspero; the outside-handler rule is supported by Vita documentation. Error `0x81180003` is shadPS4’s PS4 numbering and is unverified on PS5; that uncertainty is recorded in TechnicalDebt. `sceCoredumpWriteUserString` and the other undocumented calls remain throwing stubs. Coordination: open #3821 implements the separate attach calls. It shares the error constant and region-validation helper in `Coredump.cpp`; this PR does not implement those attach calls. The changes are independent, but a small textual rebase may be needed if #3821 lands first. ### Tested - Linux Release configure with GCC, `BUILD_TESTING=ON`, and `ANYPS5_ENABLE_SPIRV_TOOLS=ON` completed. - Built `guest_coredump_user_data_tests` with Ninja (62/62 steps). - `ctest --test-dir /tmp/AnyPS5-4173-build -R '^guest_coredump_user_data$' --output-on-failure --timeout 60` passed (1/1). - `python3 tools/check_conventions.py --base upstream/main --head HEAD` passed. - `git diff --check` passed. ### Checklist - [x] Based on current `main`; no other open PR implements these calls - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in TechnicalDebt - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none; see coordination note about #3821’s adjacent helper - [x] AI-assisted: yes (original commit co-authored by Claude; carried and validated with Codex)
github-actions[bot] commented 2026-10-12 01:06:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T01:06:57Z.


Progress report (e51428b → c8379be)

📈 System libraries: 87.98% (+0.06%, +2 implemented functions)

✅ 2 implemented
Library Name
libkernel sceCoredumpDebugTextOut
libkernel sceCoredumpWriteUserData
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6115946803 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4197#issuecomment-6115946803). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-12T01:06:57Z. --- <!-- progress-report --> ### Progress report (e51428b → c8379be) 📈 **System libraries**: 87.98% (+0.06%, +2 implemented functions) <details> <summary>✅ 2 implemented</summary> | Library | Name | | - | - | | libkernel | `sceCoredumpDebugTextOut` | | libkernel | `sceCoredumpWriteUserData` | </details>
blawesom commented 2026-10-12 17:32:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-12T17:32:06Z.


Independent verification of your rebase — the new head builds and passes the full local suite on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON, AMD RX 9070 XT / RADV): 960/960, conventions green. From my side this is merge-ready.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6129316344 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4197#issuecomment-6129316344). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-12T17:32:06Z. --- **Independent verification of your rebase** — the new head builds and passes the full local suite on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, `BUILD_TESTING=ON`, AMD RX 9070 XT / RADV): **960/960**, conventions green. From my side this is merge-ready.
MarcZX10 commented 2026-10-12 19:43:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-12T19:43:42Z.


Thanks for independently verifying the rebased head. The full Linux suite result (960/960) and conventions check are useful confirmation.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6131396981 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4197#issuecomment-6131396981). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-12T19:43:42Z. --- Thanks for independently verifying the rebased head. The full Linux suite result (960/960) and conventions check are useful confirmation.
xXPBSXx commented 2026-10-12 20:40:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T20:40:45Z.


Windows test of head 7fc689fbe merged onto current main (fa0cc752a, clean merge; built together with four other open PRs, so the run is for the combination): Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, full build 0 errors, -j2.

guest_coredump_user_data (the test this PR changes) passes. The seven tests of the five PRs (guest_coredump_user_data, guest_np_web_api2, guest_execvp, guest_math, guest_wide_conversion, guest_wide_strings, guest_character) all pass.

Not checked: that the test fails without the change, Linux, a title run.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6132242711 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4197#issuecomment-6132242711). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-12T20:40:45Z. --- Windows test of head `7fc689fbe` merged onto current `main` (`fa0cc752a`, clean merge; built together with four other open PRs, so the run is for the combination): Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, full build 0 errors, `-j2`. `guest_coredump_user_data` (the test this PR changes) passes. The seven tests of the five PRs (`guest_coredump_user_data`, `guest_np_web_api2`, `guest_execvp`, `guest_math`, `guest_wide_conversion`, `guest_wide_strings`, `guest_character`) all pass. Not checked: that the test fails without the change, Linux, a title run. AI-assisted (Claude Code).
oneandonlydean commented 2026-10-13 00:58:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-13T00:58:07Z.


Needs a rebase: it conflicts with #3821 in Coredump.cpp, the CMake list and two files under docs/dev/debt/. Please put it on top of the helper #3821 added.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6135724663 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4197#issuecomment-6135724663). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-13T00:58:07Z. --- Needs a rebase: it conflicts with #3821 in `Coredump.cpp`, the CMake list and two files under `docs/dev/debt/`. Please put it on top of the helper #3821 added.
MarcZX10 commented 2026-10-13 04:44:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T04:44:13Z.


Rebased onto current main and resolved the overlap with merged #3821, preserving screamm as the commit author and the existing commit metadata.

Linux validation (GCC 12.2, Release, Ninja, BUILD_TESTING=ON, SPIRV-Tools off): configured successfully; built guest_coredump_user_data_tests and guest_coredump_attach_tests; guest_coredump_user_data and guest_coredump_attach both passed (2/2). tools/check_conventions.py --base upstream/main --head HEAD and git diff --check pass.

The focused Linux tests passed; I did not run a Windows build. Updated head: c8379be9226271befd37624611390822de276d6c.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6138413874 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4197#issuecomment-6138413874). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-13T04:44:13Z. --- Rebased onto current `main` and resolved the overlap with merged #3821, preserving screamm as the commit author and the existing commit metadata. Linux validation (GCC 12.2, Release, Ninja, `BUILD_TESTING=ON`, SPIRV-Tools off): configured successfully; built `guest_coredump_user_data_tests` and `guest_coredump_attach_tests`; `guest_coredump_user_data` and `guest_coredump_attach` both passed (2/2). `tools/check_conventions.py --base upstream/main --head HEAD` and `git diff --check` pass. The focused Linux tests passed; I did not run a Windows build. Updated head: `c8379be9226271befd37624611390822de276d6c`.
github-actions[bot] commented 2026-10-13 04:48:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-13T04:48:13Z.


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.

Pull request Conflicting files (lines on main) Same exports Same new files
#4588 core/libs/prx/libkernel/Unimplemented.cpp L8-17
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6138458034 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4197#issuecomment-6138458034). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-13T04:48:13Z. --- <!-- pr-overlap --> 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**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #4588 | `core/libs/prx/libkernel/Unimplemented.cpp` [L8-17](https://github.com/boykopovar/AnyPS5/blob/7e181fcc3809f3d7070522dd3bd9a3a111ea93a6/core/libs/prx/libkernel/Unimplemented.cpp#L8-L17) | | |
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!4197
No description provided.