|
From: <sv...@va...> - 2006-10-03 20:39:04
|
Author: sewardj
Date: 2006-10-03 21:38:59 +0100 (Tue, 03 Oct 2006)
New Revision: 6159
Log:
Minor build-system adjustments, mostly.
Modified:
branches/AIX5/coregrind/Makefile.am
branches/AIX5/coregrind/m_clientstate.c
branches/AIX5/coregrind/m_cpuid.S
branches/AIX5/coregrind/m_libcassert.c
branches/AIX5/coregrind/m_libcprint.c
branches/AIX5/coregrind/m_threadmodel.c
branches/AIX5/coregrind/pub_core_libcassert.h
branches/AIX5/coregrind/vg_preloaded.c
Modified: branches/AIX5/coregrind/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/coregrind/Makefile.am 2006-10-03 20:33:07 UTC (rev 6158=
)
+++ branches/AIX5/coregrind/Makefile.am 2006-10-03 20:38:59 UTC (rev 6159=
)
@@ -51,7 +51,7 @@
m_vkiscnums.c
else
valgrind_SOURCES =3D \
- launcher.c \
+ launcher-linux.c \
m_debuglog.c
endif
=20
Modified: branches/AIX5/coregrind/m_clientstate.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
--- branches/AIX5/coregrind/m_clientstate.c 2006-10-03 20:33:07 UTC (rev =
6158)
+++ branches/AIX5/coregrind/m_clientstate.c 2006-10-03 20:38:59 UTC (rev =
6159)
@@ -31,6 +31,7 @@
*/
=20
#include "pub_core_basics.h"
+#include "pub_core_vki.h"
#include "pub_core_clientstate.h"
=20
/*-----------------------------------------------------------------*/
Modified: branches/AIX5/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
--- branches/AIX5/coregrind/m_cpuid.S 2006-10-03 20:33:07 UTC (rev 6158)
+++ branches/AIX5/coregrind/m_cpuid.S 2006-10-03 20:38:59 UTC (rev 6159)
@@ -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: branches/AIX5/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
--- branches/AIX5/coregrind/m_libcassert.c 2006-10-03 20:33:07 UTC (rev 6=
158)
+++ branches/AIX5/coregrind/m_libcassert.c 2006-10-03 20:38:59 UTC (rev 6=
159)
@@ -29,6 +29,8 @@
*/
=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"
@@ -38,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 "vki_unistd.h"
=20
/* ---------------------------------------------------------------------
Assertery.
@@ -61,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 */ \
@@ -75,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 */ \
@@ -98,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*/
@@ -107,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
@@ -142,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");
@@ -168,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);
@@ -250,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: branches/AIX5/coregrind/m_libcprint.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
--- branches/AIX5/coregrind/m_libcprint.c 2006-10-03 20:33:07 UTC (rev 61=
58)
+++ branches/AIX5/coregrind/m_libcprint.c 2006-10-03 20:38:59 UTC (rev 61=
59)
@@ -29,6 +29,7 @@
*/
=20
#include "pub_core_basics.h"
+#include "pub_core_vki.h"
#include "pub_core_debuglog.h"
#include "pub_core_libcbase.h"
#include "pub_core_libcassert.h"
Modified: branches/AIX5/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
--- branches/AIX5/coregrind/m_threadmodel.c 2006-10-03 20:33:07 UTC (rev =
6158)
+++ branches/AIX5/coregrind/m_threadmodel.c 2006-10-03 20:38:59 UTC (rev =
6159)
@@ -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
@@ -61,6 +61,7 @@
*/
=20
#include "pub_core_basics.h"
+#include "pub_core_vki.h"
#include "pub_core_errormgr.h"
#include "pub_core_execontext.h"
#include "pub_core_libcassert.h"
Modified: branches/AIX5/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
--- branches/AIX5/coregrind/pub_core_libcassert.h 2006-10-03 20:33:07 UTC=
(rev 6158)
+++ branches/AIX5/coregrind/pub_core_libcassert.h 2006-10-03 20:38:59 UTC=
(rev 6159)
@@ -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: branches/AIX5/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
--- branches/AIX5/coregrind/vg_preloaded.c 2006-10-03 20:33:07 UTC (rev 6=
158)
+++ branches/AIX5/coregrind/vg_preloaded.c 2006-10-03 20:38:59 UTC (rev 6=
159)
@@ -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
|