|
From: <sv...@va...> - 2006-10-17 02:03:21
|
Author: sewardj
Date: 2006-10-17 03:03:11 +0100 (Tue, 17 Oct 2006)
New Revision: 6289
Log:
Merge r6159 (parts of):
Minor build-system adjustments, mostly.
Modified:
trunk/coregrind/m_cpuid.S
trunk/coregrind/m_libcassert.c
trunk/coregrind/m_threadmodel.c
trunk/coregrind/pub_core_libcassert.h
trunk/coregrind/vg_preloaded.c
Modified: trunk/coregrind/m_cpuid.S
=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_cpuid.S 2006-10-17 02:01:12 UTC (rev 6288)
+++ trunk/coregrind/m_cpuid.S 2006-10-17 02:03:11 UTC (rev 6289)
@@ -60,8 +60,6 @@
VG_(has_cpuid):
movq $1, %rax
ret
-#elif defined(VGA_appc32)
-//CAB: TODO
#endif
=20
/*
@@ -143,13 +141,13 @@
movq %rbp, %rsp
popq %rbp
ret
-#elif defined(VGA_appc32)
-//CAB: TODO
#endif
- =20
+
+#if defined(VGA_x86) || defined(VGA_amd64) =20
/* Let the linker know we don't need an executable stack */
.section .note.GNU-stack,"",@progbits
- =09
+#endif
+
##--------------------------------------------------------------------##
##--- end ---##
##--------------------------------------------------------------------##
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 2006-10-17 02:01:12 UTC (rev 6288)
+++ trunk/coregrind/m_libcassert.c 2006-10-17 02:03:11 UTC (rev 6289)
@@ -30,6 +30,7 @@
=20
#include "pub_core_basics.h"
#include "pub_core_vki.h"
+#include "pub_core_vkiscnums.h"
#include "pub_core_threadstate.h"
#include "pub_core_libcbase.h"
#include "pub_core_libcassert.h"
@@ -39,7 +40,6 @@
#include "pub_core_syscall.h"
#include "pub_core_tooliface.h" // For VG_(details).{name,bug_report=
s_to}
#include "pub_core_options.h" // For VG_(clo_xml)
-#include "pub_core_vkiscnums.h"
=20
/* ---------------------------------------------------------------------
Assertery.
@@ -62,7 +62,7 @@
: "=3Dr" (pc),\
"=3Dr" (sp),\
"=3Dr" (fp));
-#elif defined(VGP_ppc32_linux)
+#elif defined(VGP_ppc32_linux) || defined(VGP_ppc32_aix5)
# define GET_REAL_PC_SP_AND_FP(pc, sp, fp) \
asm("mflr 0;" /* r0 =3D lr */ \
"bl m_libcassert_get_ip;" /* lr =3D pc */ \
@@ -76,7 +76,7 @@
"=3Dr" (fp) \
: /* reads none */ \
: "r0" /* trashed */ );
-#elif defined(VGP_ppc64_linux)
+#elif defined(VGP_ppc64_linux) || defined(VGP_ppc64_aix5)
# define GET_REAL_PC_SP_AND_FP(pc, sp, fp) \
asm("mflr 0;" /* r0 =3D lr */ \
"bl .m_libcassert_get_ip;" /* lr =3D pc */ \
@@ -99,7 +99,9 @@
/* Pull down the entire world */
void VG_(exit)( Int status )
{
+# if defined(VGO_linux)
(void)VG_(do_syscall1)(__NR_exit_group, status );
+# endif
(void)VG_(do_syscall1)(__NR_exit, status );
/* Why are we still alive here? */
/*NOTREACHED*/
@@ -108,7 +110,7 @@
}
=20
// Print the scheduler status.
-static void pp_sched_status ( void )
+void VG_(show_sched_status) ( void )
{
Int i;=20
VG_(printf)("\nsched status:\n");=20
@@ -143,11 +145,7 @@
ips, BACKTRACE_DEPTH, ip, sp, fp, lr, sp, stackt=
op);
VG_(pp_StackTrace) (ips, BACKTRACE_DEPTH);
=20
- // 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) );
-=20
- pp_sched_status();
+ 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");
@@ -169,7 +167,7 @@
=20
static Bool entered =3D False;
if (entered)=20
- VG_(exit)(2);
+ VG_(exit)(2);
entered =3D True;
=20
va_start(vargs, format);
@@ -251,7 +249,7 @@
"Valgrind has to exit now. Sorry. Bye!");
VG_(message)(Vg_UserMsg,
"");
- pp_sched_status();
+ VG_(show_sched_status)();
VG_(exit)(1);
}
=20
Modified: trunk/coregrind/m_threadmodel.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_threadmodel.c 2006-10-17 02:01:12 UTC (rev 6288)
+++ trunk/coregrind/m_threadmodel.c 2006-10-17 02:03:11 UTC (rev 6289)
@@ -7,7 +7,7 @@
This file is part of Valgrind, a dynamic binary instrumentation
framework.
=20
- Copyright (C) 2005 Jeremy Fitzhardinge
+ Copyright (C) 2005-2006 Jeremy Fitzhardinge
je...@go...
=20
This program is free software; you can redistribute it and/or
Modified: trunk/coregrind/pub_core_libcassert.h
=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/pub_core_libcassert.h 2006-10-17 02:01:12 UTC (rev 62=
88)
+++ trunk/coregrind/pub_core_libcassert.h 2006-10-17 02:03:11 UTC (rev 62=
89)
@@ -71,6 +71,9 @@
extern void VG_(unimplemented) ( Char* msg )
__attribute__((__noreturn__));
=20
+/* Show the state of all threads. Mostly for debugging V. */
+extern void VG_(show_sched_status) ( void );
+
#endif // __PUB_CORE_LIBCASSERT_H
=20
/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/vg_preloaded.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/vg_preloaded.c 2006-10-17 02:01:12 UTC (rev 6288)
+++ trunk/coregrind/vg_preloaded.c 2006-10-17 02:03:11 UTC (rev 6289)
@@ -55,7 +55,7 @@
void VG_NOTIFY_ON_LOAD(freeres)( void )
{
int res;
-#ifndef __UCLIBC__
+#if !defined(__UCLIBC__) && !defined(VGO_aix5)
extern void __libc_freeres(void);
__libc_freeres();
#endif
|