|
From: <sv...@va...> - 2005-06-26 20:50:08
|
Author: njn
Date: 2005-06-26 21:50:05 +0100 (Sun, 26 Jun 2005)
New Revision: 4036
Log:
While we're not printing stacktraces from assertion failures, might
as well disable pp_sched_status() -- which produces traces that are less
useful than the main one that has been disabled -- and break the
circular dependence between m_libcassert and m_threadstate.
Modified:
trunk/coregrind/m_libcassert.c
Modified: trunk/coregrind/m_libcassert.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_libcassert.c 2005-06-26 20:44:48 UTC (rev 4035)
+++ trunk/coregrind/m_libcassert.c 2005-06-26 20:50:05 UTC (rev 4036)
@@ -29,7 +29,7 @@
*/
=20
#include "pub_core_basics.h"
-#include "pub_core_threadstate.h"
+//zz hash include "pub_core_threadstate.h"
#include "pub_core_libcbase.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcprint.h"
@@ -43,30 +43,32 @@
Assertery.
------------------------------------------------------------------ */
=20
-//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 : "=3Dr" (sp),\
-//zz "=3Dr" (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 : "=3Dr" (sp),\
-//zz "=3Dr" (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 : "=3Dr" (sp),\
-//zz "=3Dr" (fp));
-//zz #else
-//zz # error Unknown platform
-//zz #endif
-//zz=20
-//zz #define BACKTRACE_DEPTH 100 // nice and deep!
+#if 0 //zz
+#if defined(VGP_x86_linux)
+# define GET_REAL_SP_AND_FP(sp, fp) \
+ asm("movl %%esp, %0;" \
+ "movl %%ebp, %1;" \
+ : "=3Dr" (sp),\
+ "=3Dr" (fp));
+#elif defined(VGP_amd64_linux)
+# define GET_REAL_SP_AND_FP(sp, fp) \
+ asm("movq %%rsp, %0;" \
+ "movq %%rbp, %1;" \
+ : "=3Dr" (sp),\
+ "=3Dr" (fp));
+#elif defined(VGP_ppc32_linux)
+# define GET_REAL_SP_AND_FP(sp, fp) \
+ asm("mr %0,1;" \
+ "mr %1,1;" \
+ : "=3Dr" (sp),\
+ "=3Dr" (fp));
+#else
+# error Unknown platform
+#endif
=20
+#define BACKTRACE_DEPTH 100 // nice and deep!
+#endif //zz
+
/* Pull down the entire world */
void VG_(exit)( Int status )
{
@@ -79,19 +81,19 @@
}
=20
// Print the scheduler status.
-static void pp_sched_status ( void )
-{
- Int i;=20
- VG_(printf)("\nsched status:\n");=20
- VG_(printf)(" running_tid=3D%d\n", VG_(get_running_tid)());
- for (i =3D 1; i < VG_N_THREADS; i++) {
- if (VG_(threads)[i].status =3D=3D VgTs_Empty) continue;
- VG_(printf)( "\nThread %d: status =3D %s\n", i,=20
- VG_(name_of_ThreadStatus)(VG_(threads)[i].status) );
+//zz static void pp_sched_status ( void )
+//zz {
+//zz Int i;=20
+//zz VG_(printf)("\nsched status:\n");=20
+//zz VG_(printf)(" running_tid=3D%d\n", VG_(get_running_tid)());
+//zz for (i =3D 1; i < VG_N_THREADS; i++) {
+//zz if (VG_(threads)[i].status =3D=3D VgTs_Empty) continue;
+//zz VG_(printf)( "\nThread %d: status =3D %s\n", i,=20
+//zz VG_(name_of_ThreadStatus)(VG_(threads)[i].status=
) );
//zz VG_(get_and_pp_StackTrace)( i, BACKTRACE_DEPTH );
- }
- VG_(printf)("\n");
-}
+//zz }
+//zz VG_(printf)("\n");
+//zz }
=20
__attribute__ ((noreturn))
static void report_and_quit ( const Char* report, Addr ip, Addr sp, Addr=
fp )
@@ -115,12 +117,12 @@
//zz=20
//zz VG_(get_StackTrace2)(ips, BACKTRACE_DEPTH, ip, sp, fp, sp, stack=
top);
//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.
- //VG_(printf)("\nBasic block ctr is approximately %llu\n", VG_(bbs_do=
ne) );
-
- pp_sched_status();
+//zz=20
+//zz // Don't print this, as it's not terribly interesting and avoids=
a
+//zz // dependence on m_scheduler/, which would be crazy.
+//zz //VG_(printf)("\nBasic block ctr is approximately %llu\n", VG_(b=
bs_done) );
+//zz=20
+//zz 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");
@@ -218,7 +220,7 @@
"Valgrind has to exit now. Sorry. Bye!");
VG_(message)(Vg_UserMsg,
"");
- pp_sched_status();
+//zz pp_sched_status();
VG_(exit)(1);
}
=20
|