mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-06 06:55:09 +00:00
Minor logging improvements
This commit is contained in:
parent
f11efcd324
commit
aa00adc9ec
5 changed files with 27 additions and 21 deletions
|
|
@ -33,10 +33,12 @@ void rx::printStackTrace(ucontext_t *context, int fileno) {
|
|||
|
||||
char buffer[1024];
|
||||
|
||||
flockfile(stderr);
|
||||
if (int r = unw_init_local2(&cursor, context, UNW_INIT_SIGNAL_FRAME)) {
|
||||
int len = snprintf(buffer, sizeof(buffer), "unw_init_local: %s\n",
|
||||
unw_strerror(r));
|
||||
write(fileno, buffer, len);
|
||||
funlockfile(stderr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -67,6 +69,7 @@ void rx::printStackTrace(ucontext_t *context, int fileno) {
|
|||
write(fileno, buffer, len);
|
||||
count++;
|
||||
} while (unw_step(&cursor) > 0 && count < 32);
|
||||
funlockfile(stderr);
|
||||
}
|
||||
|
||||
void rx::printStackTrace(ucontext_t *context, orbis::Thread *thread,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue