chore(sceSysmodule): log unknown module id loading

This commit is contained in:
boykopovar 2026-09-12 18:00:34 +03:00
parent d225df7449
commit b4db9fdd69
3 changed files with 9 additions and 4 deletions

View File

@ -10,8 +10,9 @@ Releases will be published after the first full successful launch of at least on
Execution reaches `_start`, stack unwinding and exception handling tables are built. All unimplemented functions throw std::runtime_error. `what()` is printed to stderr and the process terminates. Execution reaches `_start`, stack unwinding and exception handling tables are built. All unimplemented functions throw std::runtime_error. `what()` is printed to stderr and the process terminates.
Shader initialization via `sceAgcCreate*` passes. Shader initialization via `sceAgcCreate*` passes.
Audio output and video output initialization pass
Now: `sceAudioOutInit not implemented`. Now: `sceNpUniversalDataSystemInitialize not implemented`.
On Windows, after printing an unhandled exception the process exits with STATUS_STACK_BUFFER_OVERRUN due to the difficulty of manually [implementing proper exception handling](core/libs/prx/libc/src/exception). On Windows, after printing an unhandled exception the process exits with STATUS_STACK_BUFFER_OVERRUN due to the difficulty of manually [implementing proper exception handling](core/libs/prx/libc/src/exception).

View File

@ -105,7 +105,9 @@ int APS5_VABI sceSysmoduleIsLoaded(std::uint16_t id) {
throw std::runtime_error("sceSysmoduleIsLoaded: invalid id 0"); throw std::runtime_error("sceSysmoduleIsLoaded: invalid id 0");
} }
if (!findModuleName(id)) { if (!findModuleName(id)) {
throw std::runtime_error(std::string("sceSysmoduleIsLoaded: unknown id ") + std::to_string(id)); APS5_LOG_OUT("unknown id: %u", static_cast<unsigned>(id));
// throw std::runtime_error(std::string("sceSysmoduleIsLoaded: unknown id ") + std::to_string(id));
return 0;
} }
std::lock_guard<std::mutex> lock(gMutex); std::lock_guard<std::mutex> lock(gMutex);
auto it = gLoadCount.find(id); auto it = gLoadCount.find(id);
@ -120,7 +122,9 @@ int APS5_VABI sceSysmoduleLoadModule(std::uint16_t id) {
throw std::runtime_error("sceSysmoduleLoadModule: invalid id 0"); throw std::runtime_error("sceSysmoduleLoadModule: invalid id 0");
} }
if (!findModuleName(id)) { if (!findModuleName(id)) {
throw std::runtime_error(std::string("sceSysmoduleLoadModule: unknown id ") + std::to_string(id)); APS5_LOG_OUT("unknown id: %u", static_cast<unsigned>(id));
// throw std::runtime_error(std::string("sceSysmoduleLoadModule: unknown id ") + std::to_string(id));
return 0;
} }
std::lock_guard<std::mutex> lock(gMutex); std::lock_guard<std::mutex> lock(gMutex);
gLoadCount[id]++; gLoadCount[id]++;

View File

@ -10,7 +10,7 @@
extern "C" { extern "C" {
void* APS5_VABI memset_nid_postfix(void* s, int c, size_t n) { void* APS5_VABI memset_nid_postfix(void* s, int c, size_t n) {
APS5_LOG_OUT("s=%p c=%d n=%zu", s, c, n); // APS5_LOG_OUT("s=%p c=%d n=%zu", s, c, n);
return std::memset(s, c, n); return std::memset(s, c, n);
} }