1386 |
|
sigregs *r = &sigsegv_regs; |
1387 |
|
char str[256]; |
1388 |
|
if (crash_reason == NULL) |
1389 |
< |
crash_reason = "SIGSEGV!"; |
1389 |
> |
crash_reason = "SIGSEGV"; |
1390 |
|
sprintf(str, "%s\n" |
1391 |
|
" pc %08lx lr %08lx ctr %08lx msr %08lx\n" |
1392 |
|
" xer %08lx cr %08lx \n" |
1412 |
|
printf(str); |
1413 |
|
VideoQuitFullScreen(); |
1414 |
|
|
1415 |
– |
{ |
1416 |
– |
static int (*backtrace_fn)(void**, int); |
1417 |
– |
static char** (*backtrace_symbols_fn)(void* const*, int); |
1418 |
– |
backtrace_fn = dlsym(RTLD_DEFAULT, "backtrace"); |
1419 |
– |
backtrace_symbols_fn = dlsym(RTLD_DEFAULT, "backtrace_symbols"); |
1420 |
– |
void *frame_ptrs[64]; |
1421 |
– |
int count = backtrace_fn(frame_ptrs, 64); |
1422 |
– |
char **fnames = backtrace_symbols_fn(frame_ptrs, count); |
1423 |
– |
int i; |
1424 |
– |
for (i = 0; i < count; i++) |
1425 |
– |
printf("%s", fnames[i]); |
1426 |
– |
free(fnames); |
1427 |
– |
} |
1428 |
– |
|
1415 |
|
#ifdef ENABLE_MON |
1416 |
|
// Start up mon in real-mode |
1417 |
|
printf("Welcome to the sheep factory.\n"); |