feat(libkernel): implement missing PRX function stubs #4065

Closed
YousefMohsen0 wants to merge 10 commits from upstream-pr/4065 into main
YousefMohsen0 commented 2026-10-11 22:33:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by YousefMohsen0 on 2026-10-11T22:33:37Z.


What

Implemented C++ signatures for 5 previously unparameterized PRX function stubs in libSceAudioOut, libSceNet, and libkernel:

Library Function Signature
libSceAudioOut sceAudioOut2UserGetSupportedAttributes int(user_id, void* attributes, uint32_t* num_attributes)
libSceNet sceNetResolverAbort int(rid)
libkernel sceCoredumpWriteUserString int(const char* string)
libkernel sceCoredumpAttachUserMemoryFile int(const void* addr, size_t size)
libkernel sceCoredumpAttachMemoryRegion int(const void* addr, size_t size)

Each stub validates its arguments, returns appropriate error codes for invalid pointers, and calls NotImplemented_nid_no_patch(__func__) for the unimplemented body. sceNetResolverAbort additionally removes the resolver from the registry and notifies waiters.

Tested

Linux (Ubuntu 24.04, GCC 13.3), BUILD_TESTING=ON:

  • ninja -C build: default target (all libraries, tools and tests) builds clean, 0 errors
  • ctest --test-dir build -R 'audio_out|guest_pad|guest_rtc|patched_libraries|nid': 14/14 pass
  • ctest --test-dir build: 685/685 pass
  • python3 tools/check_conventions.py --base origin/main: all conventions checks passed
  • Verified all 5 new NIDs present in built .prx files via nm -D

No title run: stubs throw at runtime per convention.

Checklist

  • Based on current main; no other open PR implements the same functions
  • 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 (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4822896698 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4065). Originally posted by [YousefMohsen0](https://github.com/YousefMohsen0) on 2026-10-11T22:33:37Z. --- ### What Implemented C++ signatures for 5 previously unparameterized PRX function stubs in libSceAudioOut, libSceNet, and libkernel: | Library | Function | Signature | |---|---|---| | libSceAudioOut | `sceAudioOut2UserGetSupportedAttributes` | `int(user_id, void* attributes, uint32_t* num_attributes)` | | libSceNet | `sceNetResolverAbort` | `int(rid)` | | libkernel | `sceCoredumpWriteUserString` | `int(const char* string)` | | libkernel | `sceCoredumpAttachUserMemoryFile` | `int(const void* addr, size_t size)` | | libkernel | `sceCoredumpAttachMemoryRegion` | `int(const void* addr, size_t size)` | Each stub validates its arguments, returns appropriate error codes for invalid pointers, and calls `NotImplemented_nid_no_patch(__func__)` for the unimplemented body. `sceNetResolverAbort` additionally removes the resolver from the registry and notifies waiters. ### Tested Linux (Ubuntu 24.04, GCC 13.3), `BUILD_TESTING=ON`: - `ninja -C build`: default target (all libraries, tools and tests) builds clean, 0 errors - `ctest --test-dir build -R 'audio_out|guest_pad|guest_rtc|patched_libraries|nid'`: 14/14 pass - `ctest --test-dir build`: 685/685 pass - `python3 tools/check_conventions.py --base origin/main`: all conventions checks passed - Verified all 5 new NIDs present in built `.prx` files via `nm -D` No title run: stubs throw at runtime per convention. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
copilot-pull-request-reviewer[bot] commented 2026-10-11 22:33:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by copilot-pull-request-reviewer[bot] on 2026-10-11T22:33:42Z.

Review: COMMENTED


Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5485320684 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4065#pullrequestreview-5485320684). Originally posted by [copilot-pull-request-reviewer[bot]](https://github.com/apps/copilot-pull-request-reviewer) on 2026-10-11T22:33:42Z. **Review:** COMMENTED --- Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
github-actions[bot] commented 2026-10-11 22:45:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T22:45:04Z.


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
#3728 sceNetResolverAbort
#3821 core/libs/prx/libkernel/System/src/Coredump.cpp L76-78, L81-83 sceCoredumpAttachMemoryRegion
sceCoredumpAttachUserMemoryFile
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114739119 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4065#issuecomment-6114739119). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T22:45:04Z. --- <!-- 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 | |---|---|---|---| | #3728 | | `sceNetResolverAbort` | | | #3821 | `core/libs/prx/libkernel/System/src/Coredump.cpp` [L76-78](https://github.com/boykopovar/AnyPS5/blob/9bc362351780feb4ac57e0c10790ce5727f78cc6/core/libs/prx/libkernel/System/src/Coredump.cpp#L76-L78), [L81-83](https://github.com/boykopovar/AnyPS5/blob/9bc362351780feb4ac57e0c10790ce5727f78cc6/core/libs/prx/libkernel/System/src/Coredump.cpp#L81-L83) | `sceCoredumpAttachMemoryRegion`<br>`sceCoredumpAttachUserMemoryFile` | |
copilot-pull-request-reviewer[bot] commented 2026-10-12 07:26:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by copilot-pull-request-reviewer[bot] on 2026-10-12T07:26:22Z.

Review: COMMENTED


Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5487625099 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4065#pullrequestreview-5487625099). Originally posted by [copilot-pull-request-reviewer[bot]](https://github.com/apps/copilot-pull-request-reviewer) on 2026-10-12T07:26:22Z. **Review:** COMMENTED --- Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Pull request closed

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!4065
No description provided.