527 |
|
} |
528 |
|
fclose(proc_file); |
529 |
|
} else { |
530 |
+ |
char str[256]; |
531 |
|
sprintf(str, GetString(STR_PROC_CPUINFO_WARN), strerror(errno)); |
532 |
|
WarningAlert(str); |
533 |
|
} |
669 |
|
return true; |
670 |
|
} |
671 |
|
|
672 |
+ |
#ifdef USE_SDL |
673 |
|
static bool init_sdl() |
674 |
|
{ |
675 |
|
int sdl_flags = 0; |
702 |
|
signal(SIGTERM, SIG_DFL); |
703 |
|
return true; |
704 |
|
} |
705 |
+ |
#endif |
706 |
|
|
707 |
|
int main(int argc, char **argv) |
708 |
|
{ |
1380 |
|
sigregs *r = &sigsegv_regs; |
1381 |
|
char str[256]; |
1382 |
|
if (crash_reason == NULL) |
1383 |
< |
crash_reason = "SIGSEGV"; |
1383 |
> |
crash_reason = "SIGSEGV!"; |
1384 |
|
sprintf(str, "%s\n" |
1385 |
|
" pc %08lx lr %08lx ctr %08lx msr %08lx\n" |
1386 |
|
" xer %08lx cr %08lx \n" |
1406 |
|
printf(str); |
1407 |
|
VideoQuitFullScreen(); |
1408 |
|
|
1409 |
+ |
{ |
1410 |
+ |
static int (*backtrace_fn)(void**, int); |
1411 |
+ |
static char** (*backtrace_symbols_fn)(void* const*, int); |
1412 |
+ |
backtrace_fn = dlsym(RTLD_DEFAULT, "backtrace"); |
1413 |
+ |
backtrace_symbols_fn = dlsym(RTLD_DEFAULT, "backtrace_symbols"); |
1414 |
+ |
void *frame_ptrs[64]; |
1415 |
+ |
int count = backtrace_fn(frame_ptrs, 64); |
1416 |
+ |
char **fnames = backtrace_symbols_fn(frame_ptrs, count); |
1417 |
+ |
int i; |
1418 |
+ |
for (i = 0; i < count; i++) |
1419 |
+ |
printf("%s", fnames[i]); |
1420 |
+ |
free(fnames); |
1421 |
+ |
} |
1422 |
+ |
|
1423 |
|
#ifdef ENABLE_MON |
1424 |
|
// Start up mon in real-mode |
1425 |
|
printf("Welcome to the sheep factory.\n"); |