static void report_and_quit ( const Char* report, Addr ip, Addr sp, Addr fp, Addr lr ) { Addr stacktop; Addr ips[BACKTRACE_DEPTH]; ThreadState *tst = VG_(get_ThreadState)( VG_(get_lwp_tid)(VG_(gettid)()) ); // If necessary, fake up an ExeContext which is of our actual real CPU // state. Could cause problems if we got the panic/exception within the // execontext/stack dump/symtab code. But it's better than nothing. if (0 == ip && 0 == sp && 0 == fp) { GET_REAL_PC_SP_AND_FP(ip, sp, fp); } stacktop = tst->os_state.valgrind_stack_init_SP; VG_(get_StackTrace2)(ips, BACKTRACE_DEPTH, ip, sp, fp, lr, sp, stacktop); VG_(pp_StackTrace) (ips, BACKTRACE_DEPTH); // Don't print this, as it's not terribly interesting and avoids a // dependence on m_scheduler/, which would be crazy. //VG_(printf)("\nBasic block ctr is approximately %llu\n", VG_(bbs_done) ); pp_sched_status(); VG_(printf)("\n"); VG_(printf)("Note: see also the FAQ.txt in the source distribution.\n"); VG_(printf)("It contains workarounds to several common problems.\n"); VG_(printf)("\n"); VG_(printf)("If that doesn't help, please report this bug to: %s\n\n", report); VG_(printf)("In the bug report, send all the above text, the valgrind\n"); VG_(printf)("version, and what Linux distro you are using. Thanks.\n\n"); VG_(exit)(1); }
static void report_and_quit ( const Char* report, Addr ip, Addr sp, Addr fp, Addr lr ) { Addr stacktop; Addr ips[BACKTRACE_DEPTH]; ThreadState *tst = VG_(get_ThreadState)( VG_(lwpid_to_vgtid)( VG_(gettid)() ) ); // If necessary, fake up an ExeContext which is of our actual real CPU // state. Could cause problems if we got the panic/exception within the // execontext/stack dump/symtab code. But it's better than nothing. if (0 == ip && 0 == sp && 0 == fp) { GET_REAL_PC_SP_AND_FP(ip, sp, fp); } stacktop = tst->os_state.valgrind_stack_init_SP; VG_(get_StackTrace2)(0/*tid is unknown*/, ips, BACKTRACE_DEPTH, ip, sp, fp, lr, sp, stacktop); VG_(pp_StackTrace) (ips, BACKTRACE_DEPTH); VG_(show_sched_status)(); VG_(printf)("\n"); VG_(printf)("Note: see also the FAQ.txt in the source distribution.\n"); VG_(printf)("It contains workarounds to several common problems.\n"); VG_(printf)("\n"); VG_(printf)("If that doesn't help, please report this bug to: %s\n\n", report); VG_(printf)("In the bug report, send all the above text, the valgrind\n"); VG_(printf)("version, and what Linux distro you are using. Thanks.\n\n"); VG_(exit)(1); }