Merge pull request #55 from georgemoralis/skmp/stubs-log-return-addr

stubs: also log return address
This commit is contained in:
georgemoralis 2023-10-15 19:33:02 +03:00 committed by GitHub
commit 2d4d39c54b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -19,12 +19,12 @@
#define MAX_STUBS 128
u64 UnresolvedStub() {
LOG_ERROR("Unresolved Stub: called, returning zero\n");
LOG_ERROR("Unresolved Stub: called, returning zero to {}\n", __builtin_return_address(0));
return 0;
}
static u64 UnknownStub() {
LOG_ERROR("Stub: Unknown (nid: Unknown) called, returning zero\n");
LOG_ERROR("Stub: Unknown (nid: Unknown) called, returning zero to {}\n", __builtin_return_address(0));
return 0;
}
@ -36,9 +36,9 @@ template <int stub_index>
static u64 CommonStub() {
auto entry = stub_nids[stub_index];
if (entry) {
LOG_ERROR("Stub: {} (nid: {}) called, returning zero\n", entry->name, entry->nid);
LOG_ERROR("Stub: {} (nid: {}) called, returning zero to {}\n", entry->name, entry->nid, __builtin_return_address(0));
} else {
LOG_ERROR("Stub: Unknown (nid: {}) called, returning zero\n", stub_nids_unknown[stub_index]);
LOG_ERROR("Stub: Unknown (nid: {}) called, returning zero to {}\n", stub_nids_unknown[stub_index], __builtin_return_address(0));
}
return 0;
}