#include "pub_core_libcbase.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcprint.h"
-#include "pub_core_libcproc.h" // For VG_(gettid)()
-#include "pub_core_stacktrace.h"
+//zz hash inklood "pub_cor_libcproc.h" // For VG_(gettid)()
+//zz hash inklood "pub_cor_stacktrace.h"
#include "pub_core_syscall.h"
#include "pub_core_tooliface.h" // For VG_(details).{name,bug_reports_to}
#include "vki_unistd.h"
Assertery.
------------------------------------------------------------------ */
-#if defined(VGP_x86_linux)
-# define GET_REAL_SP_AND_FP(sp, fp) \
- asm("movl %%esp, %0;" \
- "movl %%ebp, %1;" \
- : "=r" (sp),\
- "=r" (fp));
-#elif defined(VGP_amd64_linux)
-# define GET_REAL_SP_AND_FP(sp, fp) \
- asm("movq %%rsp, %0;" \
- "movq %%rbp, %1;" \
- : "=r" (sp),\
- "=r" (fp));
-#elif defined(VGP_ppc32_linux)
-# define GET_REAL_SP_AND_FP(sp, fp) \
- asm("mr %0,1;" \
- "mr %1,1;" \
- : "=r" (sp),\
- "=r" (fp));
-#else
-# error Unknown platform
-#endif
-
-#define BACKTRACE_DEPTH 100 // nice and deep!
+//zz #if defined(VGP_x86_linux)
+//zz # define GET_REAL_SP_AND_FP(sp, fp) \
+//zz asm("movl %%esp, %0;" \
+//zz "movl %%ebp, %1;" \
+//zz : "=r" (sp),\
+//zz "=r" (fp));
+//zz #elif defined(VGP_amd64_linux)
+//zz # define GET_REAL_SP_AND_FP(sp, fp) \
+//zz asm("movq %%rsp, %0;" \
+//zz "movq %%rbp, %1;" \
+//zz : "=r" (sp),\
+//zz "=r" (fp));
+//zz #elif defined(VGP_ppc32_linux)
+//zz # define GET_REAL_SP_AND_FP(sp, fp) \
+//zz asm("mr %0,1;" \
+//zz "mr %1,1;" \
+//zz : "=r" (sp),\
+//zz "=r" (fp));
+//zz #else
+//zz # error Unknown platform
+//zz #endif
+//zz
+//zz #define BACKTRACE_DEPTH 100 // nice and deep!
/* Pull down the entire world */
void VG_(exit)( Int status )
if (VG_(threads)[i].status == VgTs_Empty) continue;
VG_(printf)( "\nThread %d: status = %s\n", i,
VG_(name_of_ThreadStatus)(VG_(threads)[i].status) );
- VG_(get_and_pp_StackTrace)( i, BACKTRACE_DEPTH );
+//zz VG_(get_and_pp_StackTrace)( i, BACKTRACE_DEPTH );
}
VG_(printf)("\n");
}
__attribute__ ((noreturn))
static void report_and_quit ( const Char* report, Addr ip, Addr sp, Addr fp )
{
- Addr stacktop, ips[BACKTRACE_DEPTH];
- ThreadState *tst;
-
- 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) {
- ip = (Addr)__builtin_return_address(0);
- GET_REAL_SP_AND_FP(sp, fp);
- }
-
- stacktop = tst->os_state.valgrind_stack_base +
- tst->os_state.valgrind_stack_szB;
-
- VG_(get_StackTrace2)(ips, BACKTRACE_DEPTH, ip, sp, fp, sp, stacktop);
- VG_(pp_StackTrace) (ips, BACKTRACE_DEPTH);
+//zz Addr stacktop;
+//zz Addr ips[BACKTRACE_DEPTH];
+//zz ThreadState *tst;
+//zz
+//zz tst = VG_(get_ThreadState)( VG_(get_lwp_tid)(VG_(gettid)()) );
+//zz
+//zz // If necessary, fake up an ExeContext which is of our actual real CPU
+//zz // state. Could cause problems if we got the panic/exception within the
+//zz // execontext/stack dump/symtab code. But it's better than nothing.
+//zz if (0 == ip && 0 == sp && 0 == fp) {
+//zz ip = (Addr)__builtin_return_address(0);
+//zz GET_REAL_SP_AND_FP(sp, fp);
+//zz }
+//zz
+//zz stacktop = tst->os_state.valgrind_stack_base +
+//zz tst->os_state.valgrind_stack_szB;
+//zz
+//zz VG_(get_StackTrace2)(ips, BACKTRACE_DEPTH, ip, sp, fp, sp, stacktop);
+//zz 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.