You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
1
(5) |
2
(15) |
3
(20) |
|
4
(4) |
5
(11) |
6
(8) |
7
(36) |
8
(23) |
9
(6) |
10
(4) |
|
11
(4) |
12
(19) |
13
(17) |
14
(33) |
15
(16) |
16
(17) |
17
(4) |
|
18
(4) |
19
(30) |
20
(22) |
21
(23) |
22
(29) |
23
(20) |
24
(12) |
|
25
(7) |
26
(33) |
27
(10) |
28
(12) |
29
(19) |
30
(15) |
31
(8) |
|
From: <sv...@va...> - 2009-01-22 23:00:22
|
Author: njn Date: 2009-01-22 23:00:18 +0000 (Thu, 22 Jan 2009) New Revision: 9036 Log: Remove a duplicated #include. Modified: branches/DARWIN/none/tests/x86/bug137714-x86.c Modified: branches/DARWIN/none/tests/x86/bug137714-x86.c =================================================================== --- branches/DARWIN/none/tests/x86/bug137714-x86.c 2009-01-22 22:55:11 UTC (rev 9035) +++ branches/DARWIN/none/tests/x86/bug137714-x86.c 2009-01-22 23:00:18 UTC (rev 9036) @@ -2,7 +2,6 @@ #include <stdio.h> #include <assert.h> #include <stdlib.h> -#include <assert.h> typedef unsigned char UChar; typedef unsigned int UInt; |
|
From: <sv...@va...> - 2009-01-22 22:55:20
|
Author: njn
Date: 2009-01-22 22:55:11 +0000 (Thu, 22 Jan 2009)
New Revision: 9035
Log:
- Get rid of some relics of when ppc/darwin was supported.
- Add a comment about supp-file generation on Darwin.
- Undefine the not-used VGO_darwin_version.
Modified:
branches/DARWIN/configure.in
Modified: branches/DARWIN/configure.in
===================================================================
--- branches/DARWIN/configure.in 2009-01-22 22:44:30 UTC (rev 9034)
+++ branches/DARWIN/configure.in 2009-01-22 22:55:11 UTC (rev 9035)
@@ -220,8 +220,6 @@
AC_MSG_CHECKING([for a supported OS])
AC_SUBST(VGCONF_OS)
-# DDD: why are the Darwin supps set in the kernel check instead of the libc
-# check?
DEFAULT_SUPP=""
case "${host_os}" in
@@ -277,11 +275,19 @@
AC_MSG_CHECKING([for the kernel version])
kernel=`uname -r`
-
+
+ # Nb: for Darwin we set DEFAULT_SUPP here. That's because Darwin
+ # has only one relevant version, the OS version. The `uname` check
+ # is a good way to get that version (i.e. "Darwin 9.6.0" is Mac OS
+ # X 10.5.6, and "Darwin 10.x" would presumably be Mac OS X 10.6.x
+ # Snow Leopard and darwin10.supp), and we don't know of an macros
+ # similar to __GLIBC__ to get that info.
+ #
+ # XXX: `uname -r` won't do the right thing for cross-compiles, but
+ # that's not a problem yet.
case "${kernel}" in
9.*)
AC_MSG_RESULT([Darwin 9.x (${kernel}) / Mac OS X 10.5 Leopard])
- AC_DEFINE([VGO_darwin_version], 0x900, [foo])
DEFAULT_SUPP="darwin9.supp ${DEFAULT_SUPP}"
;;
*)
@@ -477,13 +483,10 @@
test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_LINUX \
-o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_LINUX \
-o x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 \
- -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_AIX5 \
- -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_DARWIN \
- -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_DARWIN )
+ -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_AIX5 )
AM_CONDITIONAL(VGCONF_ARCHS_INCLUDE_PPC64,
test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX \
- -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5 \
- -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_DARWIN )
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5 )
# Set up VGCONF_PLATFORMS_INCLUDE_<platform>. Either one or two of these
# become defined.
@@ -508,11 +511,6 @@
test x$VGCONF_PLATFORM_PRI_CAPS = xX86_DARWIN)
AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_AMD64_DARWIN,
test x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_DARWIN)
-AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_PPC32_DARWIN,
- test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_DARWIN \
- -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_DARWIN)
-AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_PPC64_DARWIN,
- test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_DARWIN)
# Similarly, set up VGCONF_OF_IS_<os>. Exactly one of these becomes defined.
@@ -528,9 +526,7 @@
-o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5)
AM_CONDITIONAL(VGCONF_OS_IS_DARWIN,
test x$VG_PLATFORM_PRI = xX86_DARWIN \
- -o x$VG_PLATFORM_PRI = xAMD64_DARWIN \
- -o x$VG_PLATFORM_PRI = xPPC32_DARWIN \
- -o x$VG_PLATFORM_PRI = xPPC64_DARWIN)
+ -o x$VG_PLATFORM_PRI = xAMD64_DARWIN)
# Sometimes, in the Makefile.am files, it's useful to know whether or not
@@ -734,13 +730,14 @@
darwin)
AC_MSG_RESULT(Darwin)
AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin])
- # DEFAULT_SUPP set by kernel version check
+ # DEFAULT_SUPP set by kernel version check above.
;;
*)
AC_MSG_RESULT(unsupported version)
AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.9])
AC_MSG_ERROR([or AIX 5.1 or 5.2 or 5.3 GLIBC_VERSION])
+ AC_MSG_ERROR([or Darwin libc])
;;
esac
|
|
From: <sv...@va...> - 2009-01-22 22:44:36
|
Author: sewardj Date: 2009-01-22 22:44:30 +0000 (Thu, 22 Jan 2009) New Revision: 9034 Log: Move the test for __sync_bool_compare_and_swap almost to the bottom, so it can use $mflag_primary. This makes the word size for which the test is done (-m32 or -m64) be the same as for which it is actually needed, and in some situations unbreaks building of the regtests in 32-bit mode on a 64-bit machine. For the same reason, apply $mflag_primary to the test for OpenMP. Modified: trunk/configure.in Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2009-01-22 22:36:02 UTC (rev 9033) +++ trunk/configure.in 2009-01-22 22:44:30 UTC (rev 9034) @@ -1215,24 +1215,6 @@ fi -# does this compiler have built-in functions for atomic memory access ? -AC_MSG_CHECKING([if gcc supports __sync_bool_compare_and_swap]) - -AC_TRY_LINK(, -[ - int variable = 1; - return (__sync_bool_compare_and_swap(&variable, 1, 2) - && __sync_add_and_fetch(&variable, 1) ? 1 : 0) -], -[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_BUILTIN_ATOMIC, 1, [Define to 1 if gcc supports __sync_bool_compare_and_swap() a.o.]) -], -[ - AC_MSG_RESULT([no]) -]) - - # does the ppc assembler support "mtocrf" et al? AC_MSG_CHECKING([if ppc32/64 as supports mtocrf/mfocrf]) @@ -1647,7 +1629,7 @@ AC_MSG_CHECKING([for OpenMP]) safe_CFLAGS=$CFLAGS -CFLAGS="-fopenmp" +CFLAGS="-fopenmp $mflag_primary" AC_LINK_IFELSE( [ @@ -1670,6 +1652,29 @@ AM_CONDITIONAL([HAVE_OPENMP], [test x$ac_have_openmp = xyes]) +# does this compiler have built-in functions for atomic memory access ? +AC_MSG_CHECKING([if gcc supports __sync_bool_compare_and_swap]) + +safe_CFLAGS=$CFLAGS +CFLAGS="$mflag_primary" + +AC_TRY_LINK(, +[ + int variable = 1; + return (__sync_bool_compare_and_swap(&variable, 1, 2) + && __sync_add_and_fetch(&variable, 1) ? 1 : 0) +], +[ + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_BUILTIN_ATOMIC, 1, [Define to 1 if gcc supports __sync_bool_compare_and_swap() a.o.]) +], +[ + AC_MSG_RESULT([no]) +]) + +CFLAGS=$safe_CFLAGS + + #---------------------------------------------------------------------------- # Ok. We're done checking. #---------------------------------------------------------------------------- |
|
From: <sv...@va...> - 2009-01-22 22:36:11
|
Author: njn
Date: 2009-01-22 22:36:02 +0000 (Thu, 22 Jan 2009)
New Revision: 9033
Log:
Merged r9031 (rename all the arch/OS/platform configure variables) from
trunk.
Removed:
branches/DARWIN/cachegrind/tests/amd64/
branches/DARWIN/cachegrind/tests/ppc32/
branches/DARWIN/cachegrind/tests/ppc64/
branches/DARWIN/memcheck/tests/ppc32/
branches/DARWIN/memcheck/tests/ppc64/
Modified:
branches/DARWIN/Makefile.am
branches/DARWIN/Makefile.flags.am
branches/DARWIN/auxprogs/Makefile.am
branches/DARWIN/cachegrind/Makefile.am
branches/DARWIN/cachegrind/tests/Makefile.am
branches/DARWIN/callgrind/Makefile.am
branches/DARWIN/configure.in
branches/DARWIN/coregrind/Makefile.am
branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c
branches/DARWIN/docs/internals/multiple-architectures.txt
branches/DARWIN/docs/internals/porting-HOWTO.txt
branches/DARWIN/drd/Makefile.am
branches/DARWIN/drd/tests/Makefile.am
branches/DARWIN/exp-omega/Makefile.am
branches/DARWIN/exp-ptrcheck/Makefile.am
branches/DARWIN/exp-ptrcheck/tests/Makefile.am
branches/DARWIN/helgrind/Makefile.am
branches/DARWIN/helgrind/tests/Makefile.am
branches/DARWIN/lackey/Makefile.am
branches/DARWIN/massif/Makefile.am
branches/DARWIN/memcheck/Makefile.am
branches/DARWIN/memcheck/tests/Makefile.am
branches/DARWIN/memcheck/tests/x86/Makefile.am
branches/DARWIN/none/Makefile.am
branches/DARWIN/none/tests/Makefile.am
branches/DARWIN/none/tests/x86/Makefile.am
branches/DARWIN/none/tests/x86/yield.c
branches/DARWIN/tests/Makefile.am
branches/DARWIN/tests/cputest.c
branches/DARWIN/valgrind.pc.in
Modified: branches/DARWIN/Makefile.am
===================================================================
--- branches/DARWIN/Makefile.am 2009-01-22 22:14:54 UTC (rev 9032)
+++ branches/DARWIN/Makefile.am 2009-01-22 22:36:02 UTC (rev 9033)
@@ -43,31 +43,31 @@
CLEANFILES =
DISTCLEANFILES = default.supp
-if VGP_X86_LINUX
+if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
BUILT_SOURCES += valt_load_address_x86_linux.lds
CLEANFILES += valt_load_address_x86_linux.lds
endif
-if VGP_AMD64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
BUILT_SOURCES += valt_load_address_amd64_linux.lds
CLEANFILES += valt_load_address_amd64_linux.lds
endif
-if VGP_PPC32_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
BUILT_SOURCES += valt_load_address_ppc32_linux.lds
CLEANFILES += valt_load_address_ppc32_linux.lds
endif
-if VGP_PPC64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
BUILT_SOURCES += valt_load_address_ppc64_linux.lds
CLEANFILES += valt_load_address_ppc64_linux.lds
endif
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
# No need to generate valt_load_address*.lds; the final executables
# can be linked to be at any address. They will be relocated by
# AIX kernel when they are loaded.
endif
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
# Ditto
endif
-if VGO_DARWIN
+if VGCONF_OS_IS_DARWIN
# GrP untested, possibly hopeless
endif
Modified: branches/DARWIN/Makefile.flags.am
===================================================================
--- branches/DARWIN/Makefile.flags.am 2009-01-22 22:14:54 UTC (rev 9032)
+++ branches/DARWIN/Makefile.flags.am 2009-01-22 22:36:02 UTC (rev 9033)
@@ -10,7 +10,7 @@
# The aim is to give reasonable performance but also to have good
# stack traces, since users often see stack traces extending
# into (and through) the preloads.
-if VGO_DARWIN
+if VGCONF_OS_IS_DARWIN
AM_PIC_FLAG = -dynamic
else
AM_PIC_FLAG = -fpic
@@ -69,13 +69,13 @@
# regtests and performance tests. In fact, these must be used to
# build anything which is built only once on a dual-arch build.
#
-AM_FLAG_M3264_PRI = $(AM_FLAG_M3264_@VG_PLATFORM_PRI@)
-AM_CPPFLAGS_PRI = $(AM_CPPFLAGS_@VG_PLATFORM_PRI@)
-AM_CFLAGS_PRI = $(AM_CFLAGS_@VG_PLATFORM_PRI@)
-AM_CCASFLAGS_PRI = $(AM_CCASFLAGS_@VG_PLATFORM_PRI@)
+AM_FLAG_M3264_PRI = $(AM_FLAG_M3264_@VGCONF_PLATFORM_PRI_CAPS@)
+AM_CPPFLAGS_PRI = $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
+AM_CFLAGS_PRI = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
+AM_CCASFLAGS_PRI = $(AM_CCASFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
-if VGP_HAVE_SECONDARY
- AM_FLAG_M3264_SEC = $(AM_FLAG_M3264_@VG_PLATFORM_SEC@)
+if VGCONF_HAVE_PLATFORM_SEC_CAPS
+ AM_FLAG_M3264_SEC = $(AM_FLAG_M3264_@VGCONF_PLATFORM_SEC_CAPS@)
else
AM_FLAG_M3264_SEC =
endif
Modified: branches/DARWIN/auxprogs/Makefile.am
===================================================================
--- branches/DARWIN/auxprogs/Makefile.am 2009-01-22 22:14:54 UTC (rev 9032)
+++ branches/DARWIN/auxprogs/Makefile.am 2009-01-22 22:36:02 UTC (rev 9033)
@@ -42,7 +42,7 @@
# directly saying how to build libmpiwrap-*.so, instead of
# using automake's standard gunk.
#
-if VGO_AIX5
+if VGCONF_OS_IS_AIX5
HACKY_FLAGS_PRI = -g -O -bE:libmpiwrap_aix5.exp -bM:SRE -bnoentry \
-qflag=w:w -qlanglvl=extended \
`echo $(AM_FLAG_M3264_PRI) | sed s/maix/q/g`
@@ -50,7 +50,7 @@
-qflag=w:w -qlanglvl=extended \
`echo $(AM_FLAG_M3264_SEC) | sed s/maix/q/g`
else
-if VGO_DARWIN
+if VGCONF_OS_IS_DARWIN
HACKY_FLAGS_PRI = -g -O -fno-omit-frame-pointer -Wall -dynamic \
-dynamiclib -all_load $(AM_FLAG_M3264_PRI)
HACKY_FLAGS_SEC = -g -O -fno-omit-frame-pointer -Wall -dynamic \
@@ -68,18 +68,18 @@
##
noinst_PROGRAMS =
if BUILD_MPIWRAP_PRI
-noinst_PROGRAMS += libmpiwrap-@VG_PLATFORM_PRI@.so
-libmpiwrap-@VG_PLATFORM_PRI@.so: libmpiwrap.c
+noinst_PROGRAMS += libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.so
+libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.so: libmpiwrap.c
$(MPI_CC) $(HACKY_FLAGS_PRI) \
-I../include \
- -o libmpiwrap-@VG_PLATFORM_PRI@.so libmpiwrap.c
+ -o libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.so libmpiwrap.c
endif
if BUILD_MPIWRAP_SEC
-noinst_PROGRAMS += libmpiwrap-@VG_PLATFORM_SEC@.so
-libmpiwrap-@VG_PLATFORM_SEC@.so: libmpiwrap.c
+noinst_PROGRAMS += libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.so
+libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.so: libmpiwrap.c
$(MPI_CC) $(HACKY_FLAGS_SEC) \
-I../include \
- -o libmpiwrap-@VG_PLATFORM_SEC@.so libmpiwrap.c
+ -o libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.so libmpiwrap.c
endif
@@ -93,19 +93,19 @@
if BUILD_MPIWRAP_PRI
# convert (eg) X86_LINUX to x86-linux
# really should use sed here, rather than assume tr is available
- pD=`echo @VG_PLATFORM_PRI@ | tr A-Z_ a-z-` ; \
+ pD=`echo @VGCONF_PLATFORM_PRI_CAPS@ | tr A-Z_ a-z-` ; \
$(mkinstalldirs) $(DESTDIR)$(valdir)/$$pD; \
rm -f ./libmpiwrap.so; \
- cp ./libmpiwrap-@VG_PLATFORM_PRI@.so ./libmpiwrap.so; \
+ cp ./libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.so ./libmpiwrap.so; \
$(INSTALL_PROGRAM) ./libmpiwrap.so \
$(DESTDIR)$(valdir)/$$pD; \
rm -f ./libmpiwrap.so
endif
if BUILD_MPIWRAP_SEC
- pD=`echo @VG_PLATFORM_SEC@ | tr A-Z_ a-z-` ; \
+ pD=`echo @VGCONF_PLATFORM_SEC_CAPS@ | tr A-Z_ a-z-` ; \
$(mkinstalldirs) $(DESTDIR)$(valdir)/$$pD; \
rm -f ./libmpiwrap.so; \
- cp ./libmpiwrap-@VG_PLATFORM_SEC@.so ./libmpiwrap.so; \
+ cp ./libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.so ./libmpiwrap.so; \
$(INSTALL_PROGRAM) ./libmpiwrap.so \
$(DESTDIR)$(valdir)/$$pD; \
rm -f ./libmpiwrap.so
@@ -116,27 +116,28 @@
## It would seem that using nodist_SOURCES is the right fix, but
## I can't figure out how to do it.
##
-#nodist_SOURCES = libmpiwrap-@VG_PLATFORM_PRI@.c
-#nodist_SOURCES = libmpiwrap-@VG_PLATFORM_SEC@.c
+#nodist_SOURCES = libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.c
+#nodist_SOURCES = libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.c
libmpiwrap-.c:
rm -f libmpiwrap-.c
touch libmpiwrap-.c
-libmpiwrap-@VG_PLATFORM_PRI@.c:
- rm -f libmpiwrap-@VG_PLATFORM_PRI@.c
- touch libmpiwrap-@VG_PLATFORM_PRI@.c
+libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.c:
+ rm -f libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.c
+ touch libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.c
-if VGP_HAVE_SECONDARY
-libmpiwrap-@VG_PLATFORM_SEC@.c:
- rm -f libmpiwrap-@VG_PLATFORM_SEC@.c
- touch libmpiwrap-@VG_PLATFORM_SEC@.c
+if VGCONF_HAVE_PLATFORM_SEC_CAPS
+libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.c:
+ rm -f libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.c
+ touch libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.c
endif
## cleanery
clean-local:
rm -f libmpiwrap-.c \
- libmpiwrap-@VG_PLATFORM_PRI@.c libmpiwrap-@VG_PLATFORM_SEC@.c
+ libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.c \
+ libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.c
#
#----------------------------------------------------------
Modified: branches/DARWIN/cachegrind/Makefile.am
===================================================================
--- branches/DARWIN/cachegrind/Makefile.am 2009-01-22 22:14:54 UTC (rev 9032)
+++ branches/DARWIN/cachegrind/Makefile.am 2009-01-22 22:36:02 UTC (rev 9033)
@@ -5,28 +5,28 @@
noinst_HEADERS = cg_arch.h cg_sim.c cg_branchpred.c
noinst_PROGRAMS =
-if VGP_X86_LINUX
+if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
noinst_PROGRAMS += cachegrind-x86-linux
endif
-if VGP_AMD64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
noinst_PROGRAMS += cachegrind-amd64-linux
endif
-if VGP_PPC32_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
noinst_PROGRAMS += cachegrind-ppc32-linux
endif
-if VGP_PPC64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
noinst_PROGRAMS += cachegrind-ppc64-linux
endif
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
noinst_PROGRAMS += cachegrind-ppc32-aix5
endif
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
noinst_PROGRAMS += cachegrind-ppc64-aix5
endif
-if VGP_X86_DARWIN
+if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
noinst_PROGRAMS += cachegrind-x86-darwin
endif
-if VGP_AMD64_DARWIN
+if VGCONF_PLATFORMS_INCLUDE_AMD64_DARWIN
noinst_PROGRAMS += cachegrind-amd64-darwin
endif
Modified: branches/DARWIN/cachegrind/tests/Makefile.am
===================================================================
--- branches/DARWIN/cachegrind/tests/Makefile.am 2009-01-22 22:14:54 UTC (rev 9032)
+++ branches/DARWIN/cachegrind/tests/Makefile.am 2009-01-22 22:36:02 UTC (rev 9033)
@@ -3,32 +3,11 @@
include $(top_srcdir)/Makefile.flags.am
SUBDIRS = .
-if VGP_X86_LINUX
+if VGCONF_ARCHS_INCLUDE_X86
SUBDIRS += x86
endif
-if VGP_AMD64_LINUX
-SUBDIRS += amd64
-endif
-if VGP_PPC32_LINUX
-SUBDIRS += ppc32
-endif
-if VGP_PPC64_LINUX
-SUBDIRS += ppc64
-endif
-if VGP_X86_DARWIN
-SUBDIRS += x86
-endif
-if VGP_AMD64_DARWIN
-SUBDIRS += amd64
-endif
-if VGP_PPC32_DARWIN
-SUBDIRS += ppc32
-endif
-if VGP_PPC64_DARWIN
-SUBDIRS += ppc64
-endif
-DIST_SUBDIRS = ${VG_ARCH_ALL} .
+DIST_SUBDIRS = x86 .
noinst_SCRIPTS = filter_stderr filter_cachesim_discards
@@ -47,7 +26,7 @@
# C ones
dlclose_LDADD = -ldl
myprint_so_SOURCES = myprint.c
-if VGO_DARWIN
+if VGCONF_OS_IS_DARWIN
myprint_so_LDFLAGS = $(AM_FLAG_M3264_PRI) -dynamic -dynamiclib -all_load -fpic
else
myprint_so_LDFLAGS = $(AM_FLAG_M3264_PRI) -shared -fPIC
Modified: branches/DARWIN/callgrind/Makefile.am
===================================================================
--- branches/DARWIN/callgrind/Makefile.am 2009-01-22 22:14:54 UTC (rev 9032)
+++ branches/DARWIN/callgrind/Makefile.am 2009-01-22 22:36:02 UTC (rev 9033)
@@ -5,28 +5,28 @@
noinst_HEADERS = global.h costs.h events.h
noinst_PROGRAMS =
-if VGP_X86_LINUX
+if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
noinst_PROGRAMS += callgrind-x86-linux
endif
-if VGP_AMD64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
noinst_PROGRAMS += callgrind-amd64-linux
endif
-if VGP_PPC32_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
noinst_PROGRAMS += callgrind-ppc32-linux
endif
-if VGP_PPC64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
noinst_PROGRAMS += callgrind-ppc64-linux
endif
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
noinst_PROGRAMS += callgrind-ppc32-aix5
endif
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
noinst_PROGRAMS += callgrind-ppc64-aix5
endif
-if VGP_X86_DARWIN
+if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
noinst_PROGRAMS += callgrind-x86-darwin
endif
-if VGP_AMD64_DARWIN
+if VGCONF_PLATFORMS_INCLUDE_AMD64_DARWIN
noinst_PROGRAMS += callgrind-amd64-darwin
endif
Modified: branches/DARWIN/configure.in
===================================================================
--- branches/DARWIN/configure.in 2009-01-22 22:14:54 UTC (rev 9032)
+++ branches/DARWIN/configure.in 2009-01-22 22:36:02 UTC (rev 9033)
@@ -15,7 +15,9 @@
AM_MAINTAINER_MODE
+#----------------------------------------------------------------------------
# Where is VEX ?
+#----------------------------------------------------------------------------
# Nb: For the 2nd arg, the help string, AS_HELP_STRING is the proper way, but
# older autoconfs don't support it... here's what it would say:
#
@@ -50,7 +52,9 @@
# place.
AC_SUBST([DISTCHECK_CONFIGURE_FLAGS], [--with-vex=$VEX_DIR])
-# Checks for programs.
+#----------------------------------------------------------------------------
+# Checks for various programs.
+#----------------------------------------------------------------------------
CFLAGS="-Wno-long-long"
AC_PROG_LN_S
@@ -126,54 +130,49 @@
;;
esac
+#----------------------------------------------------------------------------
+# Arch/OS/platform tests.
+#----------------------------------------------------------------------------
+# We create a number of arch/OS/platform-related variables. We prefix them
+# all with "VGCONF_" which indicates that they are defined at
+# configure-time, and distinguishes them from the VGA_*/VGO_*/VGP_*
+# variables used when compiling C files.
-# Checks for the platform, with the aim of setting VG_ARCH_MAX. Note
-# that VG_ARCH_MAX must be set to reflect the most that this CPU can
-# do: for example if it is a 64-bit capable PowerPC, then it must be
-# set to ppc64 and not ppc32. Ditto for amd64.
-#
-# We will later in this file set VG_ARCH_PRI, which is the arch for
-# the primary target. For example, suppose we do a build on an amd64
-# machine, but --enable-only32bit has been requested. Then
-# VG_ARCH_MAX will be "amd64" since that reflects the most that this
-# cpu can do, but VG_ARCH_PRI will be "x86", since that reflects the
-# arch corresponding to the primary build (VG_PLATFORM_PRI).
-
AC_CANONICAL_HOST
AC_MSG_CHECKING([for a supported CPU])
-AC_SUBST(VG_ARCH_MAX)
-AC_SUBST(VG_ARCH_ALL)
-VG_ARCH_ALL="amd64 ppc32 ppc64 x86"
-
+# ARCH_MAX reflects the most that this CPU can do: for example if it
+# is a 64-bit capable PowerPC, then it must be set to ppc64 and not ppc32.
+# Ditto for amd64. It is used for more configuration below, but is not used
+# outside this file.
case "${host_cpu}" in
i?86)
AC_MSG_RESULT([ok (${host_cpu})])
- VG_ARCH_MAX="x86"
+ ARCH_MAX="x86"
;;
x86_64)
AC_MSG_RESULT([ok (${host_cpu})])
- VG_ARCH_MAX="amd64"
+ ARCH_MAX="amd64"
;;
powerpc64)
-# This value can only happen on Linux, not on AIX
+ # This value can only happen on Linux, not on AIX
AC_MSG_RESULT([ok (${host_cpu})])
- VG_ARCH_MAX="ppc64"
+ ARCH_MAX="ppc64"
;;
powerpc)
-# Complexity. 'powerpc' on AIX implies a 64-bit capable CPU.
-# Whereas in Linux that means only a 32-bit capable CPU.
+ # Complexity. 'powerpc' on AIX implies a 64-bit capable CPU.
+ # Whereas in Linux that means only a 32-bit capable CPU.
AC_MSG_RESULT([ok (${host_cpu})])
case "${host_os}" in
aix5.*)
- VG_ARCH_MAX="ppc64"
+ ARCH_MAX="ppc64"
;;
*)
- VG_ARCH_MAX="ppc32"
+ ARCH_MAX="ppc32"
;;
esac
;;
@@ -184,10 +183,15 @@
;;
esac
+#----------------------------------------------------------------------------
+
# Sometimes it's convenient to subvert the bi-arch build system and
# just have a single build even though the underlying platform is
# capable of both. Hence handle --enable-only64bit and
# --enable-only32bit. Complain if both are issued :-)
+# [Actually, if either of these options are used, I think both get built,
+# but only one gets installed. So if you use an in-place build, both can be
+# used. --njn]
# Check if a 64-bit only build has been requested
AC_CACHE_CHECK([for a 64-bit only build], vg_cv_only64bit,
@@ -209,19 +213,21 @@
[Nonsensical: both --enable-only64bit and --enable-only32bit.])
fi
+#----------------------------------------------------------------------------
-# This variable will collect the individual suppression files
-# depending on the results of autoconf
+# VGCONF_OS is the primary build OS. It is passed in to compilation of many
+# C files via -VGO_$(VGCONF_OS) and -VGP_$(VGCONF_ARCH_PRI)_$(VGCONF_OS).
+AC_MSG_CHECKING([for a supported OS])
+AC_SUBST(VGCONF_OS)
+
+# DDD: why are the Darwin supps set in the kernel check instead of the libc
+# check?
DEFAULT_SUPP=""
-AC_SUBST(DEFAULT_SUPP)
-AC_MSG_CHECKING([for a supported OS])
-AC_SUBST(VG_OS)
-
case "${host_os}" in
*linux*)
AC_MSG_RESULT([ok (${host_os})])
- VG_OS="linux"
+ VGCONF_OS="linux"
# Ok, this is linux. Check the kernel version
AC_MSG_CHECKING([for the kernel version])
@@ -249,20 +255,20 @@
aix5.1.*)
AC_MSG_RESULT([ok (${host_os})])
- VG_OS="aix5"
+ VGCONF_OS="aix5"
;;
aix5.2.*)
AC_MSG_RESULT([ok (${host_os})])
- VG_OS="aix5"
+ VGCONF_OS="aix5"
;;
aix5.3.*)
AC_MSG_RESULT([ok (${host_os})])
- VG_OS="aix5"
+ VGCONF_OS="aix5"
;;
*freebsd*)
AC_MSG_RESULT([ok (${host_os})])
- VG_OS="freebsd"
+ VGCONF_OS="freebsd"
;;
*darwin*)
@@ -291,11 +297,13 @@
;;
esac
+#----------------------------------------------------------------------------
+
# If we are building on a 64 bit platform test to see if the system
# supports building 32 bit programs and disable 32 bit support if it
# does not support building 32 bit programs
-case "$VG_ARCH_MAX-$VG_OS" in
+case "$ARCH_MAX-$VGCONF_OS" in
amd64-linux|ppc64-linux)
AC_MSG_CHECKING([for 32 bit build support])
safe_CFLAGS=$CFLAGS
@@ -317,72 +325,86 @@
[--enable-only32bit was specified but system does not support 32 bit builds])
fi
-# Establish VG_PLATFORM_PRI. This is the primary build target. The
-# entire system, including regression and performance tests, will be
-# built for this target.
+#----------------------------------------------------------------------------
+
+# VGCONF_ARCH_PRI is the arch for the primary build target. By default it's
+# the same as ARCH_MAX. But if, say, we do a build on an amd64 machine, but
+# --enable-only32bit has been requested, then ARCH_MAX (see above) will be
+# "amd64" since that reflects the most that this cpu can do, but
+# VGCONF_ARCH_PRI will be downgraded to "x86", since that reflects the arch
+# corresponding to the primary build (VGCONF_PLATFORM_PRI_CAPS). It is
+# passed in to compilation of many C files via -VGA_$(VGCONF_ARCH_PRI) and
+# -VGP_$(VGCONF_ARCH_PRI)_$(VGCONF_OS).
+AC_SUBST(VGCONF_ARCH_PRI)
+
+# VGCONF_PLATFORM_PRI_CAPS is the primary build target. The entire system,
+# including regression and performance tests, will be built for this target.
+# The "_CAPS" indicates that the name is in capital letters, because it's
+# used to create various Makefile variables, which are all in caps by
+# convention. This is in contrast to VGCONF_ARCH_PRI and VGCONF_OS which
+# are not in caps.
+AC_SUBST(VGCONF_PLATFORM_PRI_CAPS)
+
+# VGCONF_PLATFORM_SEC_CAPS is the secondary build target, if there is one.
+# Valgrind and tools will also be built for this target, but not the
+# regression or performance tests.
#
-# Also establish VG_PLATFORM_SEC, the secondary build target, if
-# possible. The system will also be built for this target, but not
-# the regression or performance tests.
-#
-# Also establish VG_ARCH_PRI, which is the arch for the primary
-# build target. The various makefiles building regression tests
-# sometimes need to see this.
+# By default, the primary arch is the same as the "max" arch, as commented
+# above (at the definition of ARCH_MAX). We may choose to downgrade it in
+# the big case statement just below here, in the case where we're building
+# on a 64 bit machine but have been requested only to do a 32 bit build.
+AC_SUBST(VGCONF_PLATFORM_SEC_CAPS)
+
AC_MSG_CHECKING([for a supported CPU/OS combination])
-AC_SUBST(VG_PLATFORM_PRI)
-AC_SUBST(VG_PLATFORM_SEC)
-AC_SUBST(VG_ARCH_PRI)
-
-# By default, the primary arch is the same as the "max" arch, as
-# commented above (at the definition of VG_ARCH_MAX). We may choose
-# to downgrade it in the big case statement just below here, in the
-# case where we're building on a 64 bit machine but have been
-# requested only to do a 32 bit build.
-VG_ARCH_PRI=$VG_ARCH_MAX
-
-case "$VG_ARCH_MAX-$VG_OS" in
+case "$ARCH_MAX-$VGCONF_OS" in
x86-linux)
- VG_PLATFORM_PRI="X86_LINUX"
- VG_PLATFORM_SEC=""
+ VGCONF_ARCH_PRI="x86"
+ VGCONF_PLATFORM_PRI_CAPS="X86_LINUX"
+ VGCONF_PLATFORM_SEC_CAPS=""
valt_load_address_normal="0x38000000"
valt_load_address_inner="0x28000000"
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
amd64-linux)
if test x$vg_cv_only64bit = xyes; then
- VG_PLATFORM_PRI="AMD64_LINUX"
- VG_PLATFORM_SEC=""
+ VGCONF_ARCH_PRI="amd64"
+ VGCONF_PLATFORM_PRI_CAPS="AMD64_LINUX"
+ VGCONF_PLATFORM_SEC_CAPS=""
elif test x$vg_cv_only32bit = xyes; then
- VG_PLATFORM_PRI="X86_LINUX"
- VG_PLATFORM_SEC=""
- VG_ARCH_PRI="x86"
+ VGCONF_ARCH_PRI="x86"
+ VGCONF_PLATFORM_PRI_CAPS="X86_LINUX"
+ VGCONF_PLATFORM_SEC_CAPS=""
else
- VG_PLATFORM_PRI="AMD64_LINUX"
- VG_PLATFORM_SEC="X86_LINUX"
+ VGCONF_ARCH_PRI="amd64"
+ VGCONF_PLATFORM_PRI_CAPS="AMD64_LINUX"
+ VGCONF_PLATFORM_SEC_CAPS="X86_LINUX"
fi
valt_load_address_normal="0x38000000"
valt_load_address_inner="0x28000000"
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
ppc32-linux)
- VG_PLATFORM_PRI="PPC32_LINUX"
- VG_PLATFORM_SEC=""
+ VGCONF_ARCH_PRI="ppc32"
+ VGCONF_PLATFORM_PRI_CAPS="PPC32_LINUX"
+ VGCONF_PLATFORM_SEC_CAPS=""
valt_load_address_normal="0x38000000"
valt_load_address_inner="0x28000000"
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
ppc64-aix5)
if test x$vg_cv_only64bit = xyes; then
- VG_PLATFORM_PRI="PPC64_AIX5"
- VG_PLATFORM_SEC=""
+ VGCONF_ARCH_PRI="ppc64"
+ VGCONF_PLATFORM_PRI_CAPS="PPC64_AIX5"
+ VGCONF_PLATFORM_SEC_CAPS=""
elif test x$vg_cv_only32bit = xyes; then
- VG_PLATFORM_PRI="PPC32_AIX5"
- VG_PLATFORM_SEC=""
- VG_ARCH_PRI="ppc32"
+ VGCONF_ARCH_PRI="ppc32"
+ VGCONF_PLATFORM_PRI_CAPS="PPC32_AIX5"
+ VGCONF_PLATFORM_SEC_CAPS=""
else
- VG_PLATFORM_PRI="PPC64_AIX5"
- VG_PLATFORM_SEC="PPC32_AIX5"
+ VGCONF_ARCH_PRI="ppc64"
+ VGCONF_PLATFORM_PRI_CAPS="PPC64_AIX5"
+ VGCONF_PLATFORM_SEC_CAPS="PPC32_AIX5"
fi
valt_load_address_normal="0x38000000"
valt_load_address_inner="0x28000000"
@@ -390,15 +412,18 @@
;;
ppc64-linux)
if test x$vg_cv_only64bit = xyes; then
- VG_PLATFORM_PRI="PPC64_LINUX"
- VG_PLATFORM_SEC=""
+ VGCONF_ARCH_PRI="ppc64"
+ VGCONF_PLATFORM_PRI_CAPS="PPC64_LINUX"
+ VGCONF_PLATFORM_SEC_CAPS=""
elif test x$vg_cv_only32bit = xyes; then
- VG_PLATFORM_PRI="PPC32_LINUX"
- VG_PLATFORM_SEC=""
- VG_ARCH_PRI="ppc32"
+ VGCONF_ARCH_PRI="ppc32"
+ VGCONF_PLATFORM_PRI_CAPS="PPC32_LINUX"
+ VGCONF_PLATFORM_SEC_CAPS=""
+ VGCONF_ARCH_PRI="ppc32"
else
- VG_PLATFORM_PRI="PPC64_LINUX"
- VG_PLATFORM_SEC="PPC32_LINUX"
+ VGCONF_ARCH_PRI="ppc64"
+ VGCONF_PLATFORM_PRI_CAPS="PPC64_LINUX"
+ VGCONF_PLATFORM_SEC_CAPS="PPC32_LINUX"
fi
valt_load_address_normal="0x38000000"
valt_load_address_inner="0x28000000"
@@ -428,88 +453,96 @@
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
*)
- VG_PLATFORM_PRI="unknown"
- VG_PLATFORM_SEC="unknown"
+ VGCONF_ARCH_PRI="unknown"
+ VGCONF_PLATFORM_PRI_CAPS="UNKNOWN"
+ VGCONF_PLATFORM_SEC_CAPS="UNKNOWN"
AC_MSG_RESULT([no (${host_cpu}-${host_os})])
AC_MSG_ERROR([Valgrind is platform specific. Sorry. Please consider doing a port.])
;;
esac
-# Set up VGA_<arch>. Either one or two of these become defined.
-#
-AM_CONDITIONAL(VGA_X86,
- test x$VG_PLATFORM_PRI = xX86_LINUX \
- -o x$VG_PLATFORM_SEC = xX86_LINUX \
- -o x$VG_PLATFORM_PRI = xX86_DARWIN \
- -o x$VG_PLATFORM_SEC = xX86_DARWIN)
-AM_CONDITIONAL(VGA_AMD64,
- test x$VG_PLATFORM_PRI = xAMD64_LINUX \
- -o x$VG_PLATFORM_PRI = xAMD64_DARWIN)
-AM_CONDITIONAL(VGA_PPC32,
- test x$VG_PLATFORM_PRI = xPPC32_LINUX \
- -o x$VG_PLATFORM_SEC = xPPC32_LINUX \
- -o x$VG_PLATFORM_PRI = xPPC32_AIX5 \
- -o x$VG_PLATFORM_SEC = xPPC32_AIX5 \
- -o x$VG_PLATFORM_PRI = xPPC32_DARWIN \
- -o x$VG_PLATFORM_SEC = xPPC32_DARWIN)
-AM_CONDITIONAL(VGA_PPC64,
- test x$VG_PLATFORM_PRI = xPPC64_LINUX \
- -o x$VG_PLATFORM_PRI = xPPC64_AIX5 \
- -o x$VG_PLATFORM_PRI = xPPC64_DARWIN)
+#----------------------------------------------------------------------------
-# Set up VGP_<platform>. Either one or two of these become defined.
-#
-AM_CONDITIONAL(VGP_X86_LINUX,
- test x$VG_PLATFORM_PRI = xX86_LINUX \
- -o x$VG_PLATFORM_SEC = xX86_LINUX)
-AM_CONDITIONAL(VGP_AMD64_LINUX,
- test x$VG_PLATFORM_PRI = xAMD64_LINUX)
-AM_CONDITIONAL(VGP_PPC32_LINUX,
- test x$VG_PLATFORM_PRI = xPPC32_LINUX \
- -o x$VG_PLATFORM_SEC = xPPC32_LINUX)
-AM_CONDITIONAL(VGP_PPC64_LINUX,
- test x$VG_PLATFORM_PRI = xPPC64_LINUX)
-AM_CONDITIONAL(VGP_PPC32_AIX5,
- test x$VG_PLATFORM_PRI = xPPC32_AIX5 \
- -o x$VG_PLATFORM_SEC = xPPC32_AIX5)
-AM_CONDITIONAL(VGP_PPC64_AIX5,
- test x$VG_PLATFORM_PRI = xPPC64_AIX5)
-AM_CONDITIONAL(VGP_X86_DARWIN,
- test x$VG_PLATFORM_PRI = xX86_DARWIN)
-AM_CONDITIONAL(VGP_AMD64_DARWIN,
- test x$VG_PLATFORM_PRI = xAMD64_DARWIN)
-AM_CONDITIONAL(VGP_PPC32_DARWIN,
- test x$VG_PLATFORM_PRI = xPPC32_DARWIN \
- -o x$VG_PLATFORM_SEC = xPPC32_DARWIN)
-AM_CONDITIONAL(VGP_PPC64_DARWIN,
- test x$VG_PLATFORM_PRI = xPPC64_DARWIN)
+# Set up VGCONF_ARCHS_INCLUDE_<arch>. Either one or two of these become
+# defined.
+AM_CONDITIONAL(VGCONF_ARCHS_INCLUDE_X86,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xX86_LINUX \
+ -o x$VGCONF_PLATFORM_SEC_CAPS = xX86_LINUX \
+ -0 x$VGCONF_PLATFORM_PRI_CAPS = xX86_DARWIN \
+ -o x$VGCONF_PLATFORM_SEC_CAPS = xX86_DARWIN )
+AM_CONDITIONAL(VGCONF_ARCHS_INCLUDE_AMD64,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_LINUX \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_DARWIN )
+AM_CONDITIONAL(VGCONF_ARCHS_INCLUDE_PPC32,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_LINUX \
+ -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_LINUX \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 \
+ -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_AIX5 \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_DARWIN \
+ -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_DARWIN )
+AM_CONDITIONAL(VGCONF_ARCHS_INCLUDE_PPC64,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5 \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_DARWIN )
-# Similarly, set up VGO_<os>. Exactly one of these becomes defined.
+# Set up VGCONF_PLATFORMS_INCLUDE_<platform>. Either one or two of these
+# become defined.
+AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_X86_LINUX,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xX86_LINUX \
+ -o x$VGCONF_PLATFORM_SEC_CAPS = xX86_LINUX)
+AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_LINUX)
+AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_LINUX \
+ -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_LINUX)
+AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX)
+
+AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 \
+ -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_AIX5)
+AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5)
+
+AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_X86_DARWIN,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xX86_DARWIN)
+AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_AMD64_DARWIN,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_DARWIN)
+AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_PPC32_DARWIN,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_DARWIN \
+ -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_DARWIN)
+AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_PPC64_DARWIN,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_DARWIN)
+
+
+# Similarly, set up VGCONF_OF_IS_<os>. Exactly one of these becomes defined.
# Relies on the assumption that the primary and secondary targets are
# for the same OS, so therefore only necessary to test the primary.
-#
-AM_CONDITIONAL(VGO_LINUX,
- test x$VG_PLATFORM_PRI = xX86_LINUX \
- -o x$VG_PLATFORM_PRI = xAMD64_LINUX \
- -o x$VG_PLATFORM_PRI = xPPC32_LINUX \
- -o x$VG_PLATFORM_PRI = xPPC64_LINUX)
-AM_CONDITIONAL(VGO_AIX5,
- test x$VG_PLATFORM_PRI = xPPC32_AIX5 \
- -o x$VG_PLATFORM_PRI = xPPC64_AIX5)
-AM_CONDITIONAL(VGO_DARWIN,
+AM_CONDITIONAL(VGCONF_OS_IS_LINUX,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xX86_LINUX \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_LINUX \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_LINUX \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX)
+AM_CONDITIONAL(VGCONF_OS_IS_AIX5,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5)
+AM_CONDITIONAL(VGCONF_OS_IS_DARWIN,
test x$VG_PLATFORM_PRI = xX86_DARWIN \
-o x$VG_PLATFORM_PRI = xAMD64_DARWIN \
-o x$VG_PLATFORM_PRI = xPPC32_DARWIN \
-o x$VG_PLATFORM_PRI = xPPC64_DARWIN)
-# Sometimes, in the Makefile.am-s, it's useful to know
-# whether or not there is a secondary target.
-#
-AM_CONDITIONAL(VGP_HAVE_SECONDARY,
- test x$VG_PLATFORM_SEC != x)
+# Sometimes, in the Makefile.am files, it's useful to know whether or not
+# there is a secondary target.
+AM_CONDITIONAL(VGCONF_HAVE_PLATFORM_SEC_CAPS,
+ test x$VGCONF_PLATFORM_SEC_CAPS != x)
+#----------------------------------------------------------------------------
+# Inner Valgrind?
+#----------------------------------------------------------------------------
+
# Check if this should be built as an inner Valgrind, to be run within
# another Valgrind. Choose the load address accordingly.
AC_SUBST(VALT_LOAD_ADDRESS)
@@ -526,6 +559,12 @@
fi
+#----------------------------------------------------------------------------
+# Libc and suppressions
+#----------------------------------------------------------------------------
+# This variable will collect the suppression files to be used.
+AC_SUBST(DEFAULT_SUPP)
+
GLIBC_VERSION=""
AC_EGREP_CPP([GLIBC_22], [
@@ -719,6 +758,10 @@
DEFAULT_SUPP="exp-ptrcheck.supp ${DEFAULT_SUPP}"
+#----------------------------------------------------------------------------
+# Checking for various library functions and other definitions
+#----------------------------------------------------------------------------
+
# Check for CLOCK_MONOTONIC
AC_MSG_CHECKING([for CLOCK_MONOTONIC])
@@ -931,6 +974,10 @@
])
+#----------------------------------------------------------------------------
+# Checking for supported compiler flags.
+#----------------------------------------------------------------------------
+
# does this compiler support -m32 ?
AC_MSG_CHECKING([if gcc accepts -m32])
@@ -1360,13 +1407,18 @@
fi
+#----------------------------------------------------------------------------
# Check for /proc filesystem
+#----------------------------------------------------------------------------
AC_CHECK_FILES(/proc/self/fd /proc/self/exe /proc/self/maps,
[ AC_DEFINE([HAVE_PROC], 1, [can use /proc filesystem]) ],
[])
+#----------------------------------------------------------------------------
# Checks for C header files.
+#----------------------------------------------------------------------------
+
AC_HEADER_STDC
AC_CHECK_HEADERS([ \
asm/unistd.h \
@@ -1384,14 +1436,18 @@
sys/types.h \
])
+#----------------------------------------------------------------------------
# Checks for typedefs, structures, and compiler characteristics.
+#----------------------------------------------------------------------------
AC_TYPE_UID_T
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
+#----------------------------------------------------------------------------
# Checks for library functions.
+#----------------------------------------------------------------------------
AC_FUNC_MEMCMP
AC_FUNC_MMAP
AC_TYPE_SIGNAL
@@ -1440,6 +1496,10 @@
AM_CONDITIONAL([HAVE_PTHREAD_SPINLOCK],
[test x$ac_cv_func_pthread_spin_lock = xyes])
+
+#----------------------------------------------------------------------------
+# MPI checks
+#----------------------------------------------------------------------------
# Do we have a useable MPI setup on the primary and/or secondary targets?
# On Linux, by default, assumes mpicc and -m32/-m64
# On AIX, by default, assumes mpxlc and -q32/-q64
@@ -1447,29 +1507,29 @@
# understands -m32/-m64/-q32/-q64 regardless of what is specified using
# --with-mpicc=.
MPI_CC="mpicc"
-if test x$VG_PLATFORM_PRI = xPPC32_AIX5 \
- -o x$VG_PLATFORM_PRI = xPPC64_AIX5 ; then
+if test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5 ; then
MPI_CC="mpxlc"
fi
mflag_primary=
-if test x$VG_PLATFORM_PRI = xX86_LINUX \
- -o x$VG_PLATFORM_PRI = xPPC32_LINUX ; then
+if test x$VGCONF_PLATFORM_PRI_CAPS = xX86_LINUX \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_LINUX ; then
mflag_primary=$FLAG_M32
-elif test x$VG_PLATFORM_PRI = xAMD64_LINUX \
- -o x$VG_PLATFORM_PRI = xPPC64_LINUX ; then
+elif test x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_LINUX \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX ; then
mflag_primary=$FLAG_M64
-elif test x$VG_PLATFORM_PRI = xPPC32_AIX5 ; then
+elif test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 ; then
mflag_primary=-q32
-elif test x$VG_PLATFORM_PRI = xPPC64_AIX5 ; then
+elif test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5 ; then
mflag_primary=-q64
fi
mflag_secondary=
-if test x$VG_PLATFORM_SEC = xX86_LINUX \
- -o x$VG_PLATFORM_SEC = xPPC32_LINUX ; then
+if test x$VGCONF_PLATFORM_SEC_CAPS = xX86_LINUX \
+ -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_LINUX ; then
mflag_secondary=$FLAG_M32
-elif test x$VG_PLATFORM_SEC = xPPC32_AIX5 ; then
+elif test x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_AIX5 ; then
mflag_secondary=-q32
fi
@@ -1513,7 +1573,7 @@
AC_MSG_CHECKING([secondary target for usable MPI2-compliant C compiler and mpi.h])
saved_CC=$CC
saved_CFLAGS=$CFLAGS
-if test x$VG_PLATFORM_SEC = x ; then
+if test x$VGCONF_PLATFORM_SEC_CAPS = x ; then
CC="$MPI_CC this will surely fail"
else
CC=$MPI_CC
@@ -1538,6 +1598,9 @@
AM_CONDITIONAL(BUILD_MPIWRAP_SEC, test x$ac_have_mpi2_sec = xyes)
+#----------------------------------------------------------------------------
+# Other library checks
+#----------------------------------------------------------------------------
# There now follow some tests for QtCore, Boost, and OpenMP. These
# tests are present because Drd has some regression tests that use
# these packages. All regression test programs all compiled only
@@ -1700,7 +1763,9 @@
AM_CONDITIONAL([HAVE_OPENMP], [test x$ac_have_openmp = xyes])
-# -------------------- ok. We're done. --------------------
+#----------------------------------------------------------------------------
+# Ok. We're done checking.
+#----------------------------------------------------------------------------
AC_OUTPUT(
Makefile
@@ -1723,17 +1788,12 @@
memcheck/Makefile
memcheck/tests/Makefile
memcheck/tests/amd64/Makefile
- memcheck/tests/ppc32/Makefile
- memcheck/tests/ppc64/Makefile
memcheck/tests/x86/Makefile
memcheck/tests/linux/Makefile
memcheck/tests/x86-linux/Makefile
memcheck/docs/Makefile
cachegrind/Makefile
cachegrind/tests/Makefile
- cachegrind/tests/amd64/Makefile
- cachegrind/tests/ppc32/Makefile
- cachegrind/tests/ppc64/Makefile
cachegrind/tests/x86/Makefile
cachegrind/docs/Makefile
cachegrind/cg_annotate
@@ -1774,11 +1834,11 @@
cat<<EOF
- configure.in: VG_ARCH_MAX = ${VG_ARCH_MAX}
- configure.in: VG_ARCH_PRI = ${VG_ARCH_PRI}
+ configure.in: ARCH_MAX = ${ARCH_MAX}
+ configure.in: VGCONF_ARCH_PRI = ${VGCONF_ARCH_PRI}
- Primary build target: ${VG_PLATFORM_PRI}
- Secondary build target: ${VG_PLATFORM_SEC}
+ Primary build target: ${VGCONF_PLATFORM_PRI_CAPS}
+ Secondary build target: ${VGCONF_PLATFORM_SEC_CAPS}
Default supp files: ${DEFAULT_SUPP}
EOF
Modified: branches/DARWIN/coregrind/Makefile.am
===================================================================
--- branches/DARWIN/coregrind/Makefile.am 2009-01-22 22:14:54 UTC (rev 9032)
+++ branches/DARWIN/coregrind/Makefile.am 2009-01-22 22:36:02 UTC (rev 9033)
@@ -21,28 +21,28 @@
default.supp: $(SUPP_FILES)
noinst_LIBRARIES =
-if VGP_X86_LINUX
+if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
noinst_LIBRARIES += libcoregrind_x86_linux.a libreplacemalloc_toolpreload_x86_linux.a
endif
-if VGP_AMD64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
noinst_LIBRARIES += libcoregrind_amd64_linux.a libreplacemalloc_toolpreload_amd64_linux.a
endif
-if VGP_PPC32_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
noinst_LIBRARIES += libcoregrind_ppc32_linux.a libreplacemalloc_toolpreload_ppc32_linux.a
endif
-if VGP_PPC64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
noinst_LIBRARIES += libcoregrind_ppc64_linux.a libreplacemalloc_toolpreload_ppc64_linux.a
endif
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
noinst_LIBRARIES += libcoregrind_ppc32_aix5.a libreplacemalloc_toolpreload_ppc32_aix5.a
endif
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
noinst_LIBRARIES += libcoregrind_ppc64_aix5.a libreplacemalloc_toolpreload_ppc64_aix5.a
endif
-if VGP_X86_DARWIN
+if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
noinst_LIBRARIES += libcoregrind_x86_darwin.a libreplacemalloc_toolpreload_x86_darwin.a
endif
-if VGP_AMD64_DARWIN
+if VGCONF_PLATFORMS_INCLUDE_AMD64_DARWIN
noinst_LIBRARIES += libcoregrind_amd64_darwin.a libreplacemalloc_toolpreload_amd64_darwin.a
endif
@@ -52,25 +52,25 @@
bin_PROGRAMS = \
valgrind no_op_client_for_valgrind
-if VGO_AIX5
+if VGCONF_OS_IS_LINUX
valgrind_SOURCES = \
+ launcher-linux.c \
+ m_debuglog.c
+endif
+if VGCONF_OS_IS_AIX5
+valgrind_SOURCES = \
launcher-aix5.c \
m_debuglog.c \
m_vkiscnums.c
endif
-if VGO_LINUX
+if VGCONF_OS_IS_DARWIN
valgrind_SOURCES = \
- launcher-linux.c \
- m_debuglog.c
-endif
-if VGO_DARWIN
-valgrind_SOURCES = \
launcher-darwin.c \
m_debuglog.c
endif
# Mach RPC interface definitions
-if VGO_DARWIN
+if VGCONF_OS_IS_DARWIN
mach_defs = \
clock.defs \
clock_priv.defs \
@@ -116,28 +116,28 @@
noinst_PROGRAMS =
-if VGP_X86_LINUX
+if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
noinst_PROGRAMS += vgpreload_core-x86-linux.so
endif
-if VGP_AMD64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
noinst_PROGRAMS += vgpreload_core-amd64-linux.so
endif
-if VGP_PPC32_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
noinst_PROGRAMS += vgpreload_core-ppc32-linux.so
endif
-if VGP_PPC64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
noinst_PROGRAMS += vgpreload_core-ppc64-linux.so
endif
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
noinst_PROGRAMS += vgpreload_core-ppc32-aix5.so
endif
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
noinst_PROGRAMS += vgpreload_core-ppc64-aix5.so
endif
-if VGP_X86_DARWIN
+if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
noinst_PROGRAMS += vgpreload_core-x86-darwin.so
endif
-if VGP_AMD64_DARWIN
+if VGCONF_PLATFORMS_INCLUDE_AMD64_DARWIN
noinst_PROGRAMS += vgpreload_core-amd64-darwin.so
endif
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c 2009-01-22 22:14:54 UTC (rev 9032)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c 2009-01-22 22:36:02 UTC (rev 9033)
@@ -1978,7 +1978,7 @@
// * needs to not use fixed-position mmap() on Darwin
// (mmap will cheerfully smash whatever's already there, which might
// be a new mapping from some other thread in a nonblocking call)
-#if defined(VGO_DARWIN)
+#if defined(VGO_darwin)
__builtin_trap();
#endif
Modified: branches/DARWIN/docs/internals/multiple-architectures.txt
===================================================================
--- branches/DARWIN/docs/internals/multiple-architectures.txt 2009-01-22 22:14:54 UTC (rev 9032)
+++ branches/DARWIN/docs/internals/multiple-architectures.txt 2009-01-22 22:36:02 UTC (rev 9033)
@@ -41,21 +41,25 @@
The configure script inspects the CPU. It then sets
- VG_PLATFORM_PRI to be the primary target
- VG_PLATFORM_SEC to be the secondary target, if any
+ VGCONF_PLATFORM_PRI_CAPS to be the primary target
+ VGCONF_PLATFORM_SEC_CAPS to be the secondary target, if any
It also sets one (single-arch build) or two (dual-arch build) of
the following:
- VG_X86_LINUX
- VG_AMD64_LINUX
- VG_PPC32_LINUX
- VG_PPC64_LINUX
+ VGCONF_PLATFORMS_INCLUDE_X86_LINUX
+ VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
+ VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
+ VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
+ ...
-On an amd64 system both VG_X86_LINUX and VG_AMD64_LINUX will be true
-so that two versions of all the tools will be built. Similarly on a
-ppc64 system both VG_PPC32_LINUX and VG_PPC64_LINUX will be defined.
-For the amd64 example, the coregrind libraries will be named:
+On an amd64 system both VGCONF_PLATFORMS_INCLUDE_X86_LINUX and
+VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX will be true so that two versions of
+all the tools will be built. Similarly on a ppc64 system both
+VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX and
+VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX will be defined (unless
+--enable-only32bit or --enable-only64bit is used). For the amd64 example,
+ the coregrind libraries will be named:
libcoregrind_x86_linux.a
libcoregrind_amd64_linux.a
@@ -117,13 +121,8 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In places where compilation should happen twice (on a dual-arch
system), the decision about which directories and flags to use is
-guarded by the symbols:
+guarded by the VGCONF_PLATFORMS_INCLUDE_* symbols.
- VG_X86_LINUX
- VG_AMD64_LINUX
- VG_PPC32_LINUX
- VG_PPC64_LINUX
-
But there are also places where building must only happen once,
for the primary architecture. These places are (at least):
Modified: branches/DARWIN/docs/internals/porting-HOWTO.txt
===================================================================
--- branches/DARWIN/docs/internals/porting-HOWTO.txt 2009-01-22 22:14:54 UTC (rev 9032)
+++ branches/DARWIN/docs/internals/porting-HOWTO.txt 2009-01-22 22:36:02 UTC (rev 9033)
@@ -17,8 +17,7 @@
thorough!) Put in Makefile.am files for them, edit them for the new
architecture name.
-- Update configure.in (use x86 and x86-linux as a guide). Don't forget to
- update VG_ARCH_ALL, VG_PLATFORM_ALL.
+- Update configure.in (use x86 and x86-linux as a guide).
Once it configures ok, get it to compile:
@@ -86,7 +85,6 @@
- Create necessary subdirs (copy linux/ and x86-linux/ subdirs).
- Update configure.in (use linux and x86-linux as a guide).
- Don't forget to update VG_OS_ALL, VG_PLATFORM_ALL.
- Implement all the necessary OS-specific and platform-specific types,
functions, and macros... use the following as templates:
Modified: branches/DARWIN/drd/Makefile.am
===================================================================
--- branches/DARWIN/drd/Makefile.am 2009-01-22 22:14:54 UTC (rev 9032)
+++ branches/DARWIN/drd/Makefile.am 2009-01-22 22:36:02 UTC (rev 9033)
@@ -1,22 +1,22 @@
include $(top_srcdir)/Makefile.tool.am
noinst_PROGRAMS =
-if VGP_X86_LINUX
+if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
noinst_PROGRAMS += drd-x86-linux vgpreload_drd-x86-linux.so
endif
-if VGP_AMD64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
noinst_PROGRAMS += drd-amd64-linux vgpreload_drd-amd64-linux.so
endif
-if VGP_PPC32_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
noinst_PROGRAMS += drd-ppc32-linux vgpreload_drd-ppc32-linux.so
endif
-if VGP_PPC64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
noinst_PROGRAMS += drd-ppc64-linux vgpreload_drd-ppc64-linux.so
endif
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
noinst_PROGRAMS += drd-ppc32-aix5 vgpreload_drd-ppc32-aix5.so
endif
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
noinst_PROGRAMS += drd-ppc64-aix5 vgpreload_drd-ppc64-aix5.so
endif
Modified: branches/DARWIN/drd/tests/Makefile.am
===================================================================
--- branches/DARWIN/drd/tests/Makefile.am 2009-01-22 22:14:54 UTC (rev 9032)
+++ branches/DARWIN/drd/tests/Makefile.am 2009-01-22 22:36:02 UTC (rev 9033)
@@ -197,8 +197,8 @@
trylock.vgtest
AM_CFLAGS = $(WERROR) -Wall @FLAG_W_EXTRA@ -Wno-inline -Wno-unused-parameter\
- -g $(AM_FLAG_M3264_PRI) -DVGA_$(VG_ARCH_PRI)=1 -DVGO_$(VG_OS)=1 \
- -DVGP_$(VG_ARCH_PRI)_$(VG_OS)=1
+ -g $(AM_FLAG_M3264_PRI) -DVGA_$(VGCONF_ARCH_PRI)=1 \
+ -DVGO_$(VGCONF_OS)=1 -DVGP_$(VGCONF_ARCH_PRI)_$(VGCONF_OS)=1
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \
-I$(top_builddir)/include -I$(top_srcdir)/VEX/pub
AM_CXXFLAGS = $(AM_CFLAGS)
Modified: branches/DARWIN/exp-omega/Makefile.am
===================================================================
--- branches/DARWIN/exp-omega/Makefile.am 2009-01-22 22:14:54 UTC (rev 9032)
+++ branches/DARWIN/exp-omega/Makefile.am 2009-01-22 22:36:02 UTC (rev 9033)
@@ -12,28 +12,28 @@
##zz
##zz # include memcheck/ for mac_shared.h
##zz noinst_PROGRAMS =
-##zz if VGP_X86_LINUX
+##zz if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
##zz noinst_PROGRAMS += exp-omega-x86-linux vgpreload_exp-omega-x86-linux.so
##zz endif
-##zz if VGP_AMD64_LINUX
+##zz if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
##zz noinst_PROGRAMS += exp-omega-amd64-linux vgpreload_exp-omega-amd64-linux.so
##zz endif
-##zz if VGP_PPC32_LINUX
+##zz if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
##zz noinst_PROGRAMS += exp-omega-ppc32-linux vgpreload_exp-omega-ppc32-linux.so
##zz endif
-##zz if VGP_PPC64_LINUX
+##zz if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
##zz noinst_PROGRAMS += exp-omega-ppc64-linux vgpreload_exp-omega-ppc64-linux.so
##zz endif
-##zz if VGP_PPC32_AIX5
+##zz if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
##zz noinst_PROGRAMS += exp-omega-ppc32-aix5 vgpreload_exp-omega-ppc32-aix5.so
##zz endif
-##zz if VGP_PPC64_AIX5
+##zz if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
##zz noinst_PROGRAMS += exp-omega-ppc64-aix5 vgpreload_exp-omega-ppc64-aix5.so
##zz endif
-##zz if VGP_X86_DARWIN
+##zz if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
##zz noinst_PROGRAMS += exp-omega-x86-darwin vgpreload_exp-omega-x86-darwin.so
##zz endif
-##zz if VGP_AMD64_DARWIN
+##zz if VGCONF_PLATFORMS_INCLUDE_AMD64_DARWIN
##zz noinst_PROGRAMS += exp-omega-amd64-darwin vgpreload_exp-omega-amd64-darwin.so
##zz endif
##zz
Modified: branches/DARWIN/exp-ptrcheck/Makefile.am
===================================================================
--- branches/DARWIN/exp-ptrcheck/Makefile.am 2009-01-22 22:14:54 UTC (rev 9032)
+++ branches/DARWIN/exp-ptrcheck/Makefile.am 2009-01-22 22:36:02 UTC (rev 9033)
@@ -1,22 +1,22 @@
include $(top_srcdir)/Makefile.tool.am
noinst_PROGRAMS =
-if VGP_X86_LINUX
+if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
noinst_PROGRAMS += exp-ptrcheck-x86-linux vgpreload_exp-ptrcheck-x86-linux.so
endif
-if VGP_AMD64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
noinst_PROGRAMS += exp-ptrcheck-amd64-linux vgpreload_exp-ptrcheck-amd64-linux.so
endif
-if VGP_PPC32_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
noinst_PROGRAMS += exp-ptrcheck-ppc32-linux vgpreload_exp-ptrcheck-ppc32-linux.so
endif
-if VGP_PPC64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
noinst_PROGRAMS += exp-ptrcheck-ppc64-linux vgpreload_exp-ptrcheck-ppc64-linux.so
endif
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
noinst_PROGRAMS += exp-ptrcheck-ppc32-aix5 vgpreload_exp-ptrcheck-ppc32-aix5.so
endif
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
noinst_PROGRAMS += exp-ptrcheck-ppc64-aix5 vgpreload_exp-ptrcheck-ppc64-aix5.so
endif
Modified: branches/DARWIN/exp-ptrcheck/tests/Makefile.am
===================================================================
--- branches/DARWIN/exp-ptrcheck/tests/Makefile.am 2009-01-22 22:14:54 UTC (rev 9032)
+++ branches/DARWIN/exp-ptrcheck/tests/Makefile.am 2009-01-22 22:36:02 UTC (rev 9033)
@@ -3,20 +3,10 @@
include $(top_srcdir)/Makefile.flags.am
#SUBDIRS = .
-#if VGP_X86_LINUX
+#if VGCONF_ARCHS_INCLUDE_X86
#SUBDIRS += x86
-#endif
-#if VGP_AMD64_LINUX
-#SUBDIRS += amd64
-#endif
-#if VGP_PPC32_LINUX
-#SUBDIRS += ppc32
-#endif
-#if VGP_PPC64_LINUX
-#SUBDIRS += ppc64
-#endif
-#DIST_SUBDIRS = ${VG_ARCH_ALL} .
+#DIST_SUBDIRS = x86 .
noinst_SCRIPTS = filter_stderr filter_add filter_suppgen \
sh_script
@@ -88,7 +78,7 @@
# DDD: not sure if these ones should work on Darwin or not... if not, should
# be moved into x86-linux/.
-if ! VGO_DARWIN
+if ! VGCONF_OS_IS_DARWIN
check_PROGRAMS += \
ccc
endif
@@ -146,15 +136,15 @@
# Build shared object for preen_invars
preen_invars_SOURCES = preen_invars.c
preen_invars_DEPENDENCIES = preen_invars_so.so
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
preen_invars_LDADD = -ldl
preen_invars_LDFLAGS = $(AM_FLAG_M3264_PRI)
else
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
preen_invars_LDADD = -ldl
preen_invars_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
else
-if VGO_DARWIN
+if VGCONF_OS_IS_DARWIN
preen_invars_LDADD = -ldl
preen_invars_LDFLAGS = $(AM_FLAG_M3264_PRI)
else
@@ -169,14 +159,14 @@
preen_invars_so_so_LDADD =
preen_invars_so_so_DEPENDENCIES =
preen_invars_so_so_CFLAGS = -fpic $(AM_FLAG_M3264_PRI) -g
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
preen_invars_so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared
else
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
preen_invars_so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
-Wl,-G -Wl,-bnogc
else
-if VGO_DARWIN
+if VGCONF_OS_IS_DARWIN
preen_invars_so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -dynamic \
-dynamiclib -all_load
else
Modified: branches/DARWIN/helgrind/Makefile.am
===================================================================
--- branches/DARWIN/helgrind/Makefile.am 2009-01-22 22:14:54 UTC (rev 9032)
+++ branches/DARWIN/helgrind/Makefile.am 2009-01-22 22:36:02 UTC (rev 9033)
@@ -1,28 +1,28 @@
include $(top_srcdir)/Makefile.tool.am
noinst_PROGRAMS =
-if VGP_X86_LINUX
+if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
noinst_PROGRAMS += helgrind-x86-linux vgpreload_helgrind-x86-linux.so
endif
-if VGP_AMD64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
noinst_PROGRAMS += helgrind-amd64-linux vgpreload_helgrind-amd64-linux.so
endif
-if VGP_PPC32_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
noinst_PROGRAMS += helgrind-ppc32-linux vgpreload_helgrind-ppc32-linux.so
endif
-if VGP_PPC64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
noinst_PROGRAMS += helgrind-ppc64-linux vgpreload_helgrind-ppc64-linux.so
endif
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
noinst_PROGRAMS += helgrind-ppc32-aix5 vgpreload_helgrind-ppc32-aix5.so
endif
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
noinst_PROGRAMS += helgrind-ppc64-aix5 vgpreload_helgrind-ppc64-aix5.so
endif
-if VGP_X86_DARWIN
+if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
noinst_PROGRAMS += helgrind-x86-darwin vgpreload_helgrind-x86-darwin.so
endif
-if VGP_AMD64_DARWIN
+if VGCONF_PLATFORMS_INCLUDE_AMD64_DARWIN
noinst_PROGRAMS += helgrind-amd64-darwin vgpreload_helgrind-amd64-darwin.so
endif
Modified: branches/DARWIN/helgrind/tests/Makefile.am
===================================================================
--- branches/DARWIN/helgrind/tests/Makefile.am 2009-01-22 22:14:54 UTC (rev 9032)
+++ branches/DARWIN/helgrind/tests/Makefile.am 2009-01-22 22:36:02 UTC (rev 9033)
@@ -157,7 +157,7 @@
# DDD: all of these use barriers and/or spinlocks, which are optional in
# pthreads and Darwin doesn't support. Could do a configure-time test like
# the one done for Qt above.
-if ! VGO_DARWIN
+if ! VGCONF_OS_IS_DARWIN
check_PROGRAMS += \
bar_bad \
bar_trivial \
Modified: branches/DARWIN/lackey/Makefile.am
===================================================================
--- branches/DARWIN/lackey/Makefile.am 2009-01-22 22:14:54 UTC (rev 9032)
+++ branches/DARWIN/lackey/Makefile.am 2009-01-22 22:36:02 UTC (rev 9033)
@@ -1,28 +1,28 @@
include $(top_srcdir)/Makefile.tool.am
noinst_PROGRAMS =
-if VGP_X86_LINUX
+if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
noinst_PROGRAMS += lackey-x86-linux
endif
-if VGP_AMD64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
noinst_PROGRAMS += lackey-amd64-linux
endif
-if VGP_PPC32_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
noinst_PROGRAMS += lackey-ppc32-linux
endif
-if VGP_PPC64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
noinst_PROGRAMS += lackey-ppc64-linux
endif
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
noinst_PROGRAMS += lackey-ppc32-aix5
endif
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
noinst_PROGRAMS += lackey-ppc64-aix5
endif
-if VGP_X86_DARWIN
+if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
noinst_PROGRAMS += lackey-x86-darwin
endif
-if VGP_AMD64_DARWIN
+if VGCONF_PLATFORMS_INCLUDE_AMD64_DARWIN
noinst_PROGRAMS += lackey-amd64-darwin
endif
Modified: branches/DARWIN/massif/Makefile.am
===================================================================
--- branches/DARWIN/massif/Makefile.am 2009-01-22 22:14:54 UTC (rev 9032)
+++ branches/DARWIN/massif/Makefile.am 2009-01-22 22:36:02 UTC (rev 9033)
@@ -5,28 +5,28 @@
bin_SCRIPTS = ms_print
noinst_PROGRAMS =
-if VGP_X86_LINUX
+if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
noinst_PROGRAMS += massif-x86-linux vgpreload_massif-x86-linux.so
endif
-if VGP_AMD64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
noinst_PROGRAMS += massif-amd64-linux vgpreload_massif-amd64-linux.so
endif
-if VGP_PPC32_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
noinst_PROGRAMS += massif-ppc32-linux vgpreload_massif-ppc32-linux.so
endif
-if VGP_PPC64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
noinst_PROGRAMS += massif-ppc64-linux vgpreload_massif-ppc64-linux.so
endif
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
noinst_PROGRAMS += massif-ppc32-aix5 vgpreload_massif-ppc32-aix5.so
endif
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
noinst_PROGRAMS += massif-ppc64-aix5 vgpreload_massif-ppc64-aix5.so
endif
-if VGP_X86_DARWIN
+if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
noinst_PROGRAMS += massif-x86-darwin vgpreload_massif-x86-darwin.so
endif
-if VGP_AMD64_DARWIN
+if VGCONF_PLATFORMS_INCLUDE_AMD64_DARWIN
noinst_PROGRAMS += massif-amd64-darwin vgpreload_massif-amd64-darwin.so
endif
Modified: branches/DARWIN/memcheck/Makefile.am
===================================================================
--- branches/DARWIN/memcheck/Makefile.am 2009-01-22 22:14:54 UTC (rev 9032)
+++ branches/DARWIN/memcheck/Makefile.am 2009-01-22 22:36:02 UTC (rev 9033)
@@ -1,28 +1,28 @@
include $(top_srcdir)/Makefile.tool.am
noinst_PROGRAMS =
-if VGP_X86_LINUX
+if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
noinst_PROGRAMS += memcheck-x86-linux vgpreload_memcheck-x86-linux.so
endif
-if VGP_AMD64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
noinst_PROGRAMS += memcheck-amd64-linux vgpreload_memcheck-amd64-linux.so
endif
-if VGP_PPC32_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
noinst_PROGRAMS += memcheck-ppc32-linux vgpreload_memcheck-ppc32-linux.so
endif
-if VGP_PPC64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
noinst_PROGRAMS += memcheck-ppc64-linux vgpreload_memcheck-ppc64-linux.so
endif
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
noinst_PROGRAMS += memcheck-ppc32-aix5 vgpreload_memcheck-ppc32-aix5.so
endif
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
noinst_PROGRAMS += memcheck-ppc64-aix5 vgpreload_memcheck-ppc64-aix5.so
endif
-if VGP_X86_DARWIN
+if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
noinst_PROGRAMS += memcheck-x86-darwin vgpreload_memcheck-x86-darwin.so
endif
-if VGP_AMD64_DARWIN
+if VGCONF_PLATFORMS_INCLUDE_AMD64_DARWIN
noinst_PROGRAMS += memcheck-amd64-darwin vgpreload_memcheck-amd64-darwin.so
endif
Modified: branches/DARWIN/memcheck/tests/Makefile.am
===================================================================
--- branches/DARWIN/memcheck/tests/Makefile.am 2009-01-22 22:14:54 UTC (rev 9032)
+++ branches/DARWIN/memcheck/tests/Makefile.am 2009-01-22 22:36:02 UTC (rev 9033)
@@ -5,30 +5,24 @@
SUBDIRS = .
# Arch-specific tests.
-if VGA_X86
+if VGCONF_ARCHS_INCLUDE_X86
SUBDIRS += x86
endif
-if VGA_AMD64
+if VGCONF_ARCHS_INCLUDE_AMD64
SUBDIRS += amd64
endif
-if VGA_PPC32
-SUBDIRS += ppc32
-endif
-if VGA_PPC64
-SUBDIRS += ppc64
-endif
# OS-specific tests
-if VGO_LINUX
+if VGCONF_OS_IS_LINUX
SUBDIRS += linux
endif
# Platform-specific tests
-if VGP_X86_LINUX
+if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
SUBDIRS += x86-linux
endif
-DIST_SUBDIRS = ${VG_ARCH_ALL} .
+DIST_SUBDIRS = x86 amd64 linux x86-linux .
noinst_SCRIPTS = filter_allocs filter_leak_check_size \
filter_stderr filter_stderr_backtrace filter_xml \
@@ -242,8 +236,9 @@
# Extra stuff for C tests
memcmptest_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -fno-builtin-memcmp
oset_test_CFLAGS = $(AM_FLAG_M3264_PRI) \
- -DVGA_$(VG_ARCH_PRI)=1 -DVGO_$(VG_OS)=1 \
- -DVGP_$(VG_ARCH_PRI)_$(VG_OS)=1
+ -DVGA_$(VGCONF_ARCH_PRI)=1 \
+ -DVGO_$(VGCONF_OS)=1 \
+ -DVGP_$(VGCONF_ARCH_PRI)_$(VGCONF_OS)=1
vcpu_bz2_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O2 -g
vcpu_fbench_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O2 -g
vcpu_fnfns_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O2 -g
@@ -279,8 +274,8 @@
long_namespace_xml_SOURCES = long_namespace_xml.cpp
deep_templates_CXXFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O -gstabs
-if VGP_PPC32_AIX5
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
else
# persuade the AIX linker not to junk apparently unused
# function descriptors. Unfortunately -Wl,-G -Wl,-bnogc
@@ -299,15 +294,15 @@
# Build shared object for wrap7
wrap7_SOURCES = wrap7.c
wrap7_DEPENDENCIES = wrap7so.so
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
wrap7_LDADD = `pwd`/wrap7so.so
wrap7_LDFLAGS = $(AM_FLAG_M3264_PRI)
else
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
wrap7_LDADD = `pwd`/wrap7so.so
wrap7_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
else
-if VGO_DARWIN
+if VGCONF_OS_IS_DARWIN
wrap7_LDADD = `pwd`/wrap7so.so
wrap7_LDFLAGS = $(AM_FLAG_M3264_PRI)
else
@@ -322,14 +317,14 @@
wrap7so_so_LDAD...
[truncated message content] |
|
From: <sv...@va...> - 2009-01-22 22:32:44
|
Author: njn
Date: 2009-01-22 21:56:32 +0000 (Thu, 22 Jan 2009)
New Revision: 9031
Log:
Rename all the arch/OS/platform-related variables in configure.in to make it
clearer what they mean:
- They all have VGCONF_ prefixes now, to indicate they come out of
configure.in (and are clearly distinguished from the VGA_/VGO_/VGP_
#defines passed in to C files).
- The ones that refer to the primary *or* secondary platform have _INCLUDES_
in them.
- The ones that are in all-caps have a _CAPS suffix.
So, for example, what was VGP_X86_LINUX is now
VGCONF_PLATFORMS_INCLUDE_X86_LINUX, which is more verbose but also a lot
clearer. The names of the #defines used in the C files (VGA_x86, VGO_linux,
etc) are unchanged.
cputest.c: changed to reflect the Valgrind installation's capabilities,
rather than the machine's capabilities. In particular, if
--enable-only32bit is used on a 64-bit machine, then this program will claim
to only support 32-bits. Also use the VGA/VGO/VGP macros which are clearer
than the __i386__ ones. (This is partially merged from the DARWIN branch.)
configure.in: clean up the comments, distinguish different sections more
clearly, and generally make it more readable.
valgrind.pc.in: try to make this more accurate. I doubt anyone's using it.
It doesn't appear to be set up to handle dual-architecture builds.
Modified:
trunk/Makefile.am
trunk/Makefile.flags.am
trunk/auxprogs/Makefile.am
trunk/cachegrind/Makefile.am
trunk/cachegrind/tests/Makefile.am
trunk/callgrind/Makefile.am
trunk/configure.in
trunk/coregrind/Makefile.am
trunk/docs/internals/multiple-architectures.txt
trunk/docs/internals/porting-HOWTO.txt
trunk/drd/Makefile.am
trunk/drd/tests/Makefile.am
trunk/exp-omega/Makefile.am
trunk/exp-ptrcheck/Makefile.am
trunk/exp-ptrcheck/tests/Makefile.am
trunk/helgrind/Makefile.am
trunk/lackey/Makefile.am
trunk/massif/Makefile.am
trunk/memcheck/Makefile.am
trunk/memcheck/tests/Makefile.am
trunk/none/Makefile.am
trunk/none/tests/Makefile.am
trunk/none/tests/x86/Makefile.am
trunk/none/tests/x86/yield.c
trunk/tests/Makefile.am
trunk/tests/cputest.c
trunk/valgrind.pc.in
Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/Makefile.am 2009-01-22 21:56:32 UTC (rev 9031)
@@ -42,28 +42,28 @@
CLEANFILES =
DISTCLEANFILES = default.supp
-if VGP_X86_LINUX
+if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
BUILT_SOURCES += valt_load_address_x86_linux.lds
CLEANFILES += valt_load_address_x86_linux.lds
endif
-if VGP_AMD64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
BUILT_SOURCES += valt_load_address_amd64_linux.lds
CLEANFILES += valt_load_address_amd64_linux.lds
endif
-if VGP_PPC32_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
BUILT_SOURCES += valt_load_address_ppc32_linux.lds
CLEANFILES += valt_load_address_ppc32_linux.lds
endif
-if VGP_PPC64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
BUILT_SOURCES += valt_load_address_ppc64_linux.lds
CLEANFILES += valt_load_address_ppc64_linux.lds
endif
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
# No need to generate valt_load_address*.lds; the final executables
# can be linked to be at any address. They will be relocated by
# AIX kernel when they are loaded.
endif
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
# Ditto
endif
Modified: trunk/Makefile.flags.am
===================================================================
--- trunk/Makefile.flags.am 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/Makefile.flags.am 2009-01-22 21:56:32 UTC (rev 9031)
@@ -51,13 +51,13 @@
# regtests and performance tests. In fact, these must be used to
# build anything which is built only once on a dual-arch build.
#
-AM_FLAG_M3264_PRI = $(AM_FLAG_M3264_@VG_PLATFORM_PRI@)
-AM_CPPFLAGS_PRI = $(AM_CPPFLAGS_@VG_PLATFORM_PRI@)
-AM_CFLAGS_PRI = $(AM_CFLAGS_@VG_PLATFORM_PRI@)
-AM_CCASFLAGS_PRI = $(AM_CCASFLAGS_@VG_PLATFORM_PRI@)
+AM_FLAG_M3264_PRI = $(AM_FLAG_M3264_@VGCONF_PLATFORM_PRI_CAPS@)
+AM_CPPFLAGS_PRI = $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
+AM_CFLAGS_PRI = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
+AM_CCASFLAGS_PRI = $(AM_CCASFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
-if VGP_HAVE_SECONDARY
- AM_FLAG_M3264_SEC = $(AM_FLAG_M3264_@VG_PLATFORM_SEC@)
+if VGCONF_HAVE_PLATFORM_SEC_CAPS
+ AM_FLAG_M3264_SEC = $(AM_FLAG_M3264_@VGCONF_PLATFORM_SEC_CAPS@)
else
AM_FLAG_M3264_SEC =
endif
Modified: trunk/auxprogs/Makefile.am
===================================================================
--- trunk/auxprogs/Makefile.am 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/auxprogs/Makefile.am 2009-01-22 21:56:32 UTC (rev 9031)
@@ -43,7 +43,7 @@
# directly saying how to build libmpiwrap-*.so, instead of
# using automake's standard gunk.
#
-if VGO_AIX5
+if VGCONF_OS_IS_AIX5
HACKY_FLAGS_PRI = -g -O -bE:libmpiwrap_aix5.exp -bM:SRE -bnoentry \
-qflag=w:w -qlanglvl=extended \
`echo $(AM_FLAG_M3264_PRI) | sed s/maix/q/g`
@@ -62,18 +62,18 @@
##
noinst_PROGRAMS =
if BUILD_MPIWRAP_PRI
-noinst_PROGRAMS += libmpiwrap-@VG_PLATFORM_PRI@.so
-libmpiwrap-@VG_PLATFORM_PRI@.so: libmpiwrap.c
+noinst_PROGRAMS += libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.so
+libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.so: libmpiwrap.c
$(MPI_CC) $(HACKY_FLAGS_PRI) \
-I../include \
- -o libmpiwrap-@VG_PLATFORM_PRI@.so libmpiwrap.c
+ -o libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.so libmpiwrap.c
endif
if BUILD_MPIWRAP_SEC
-noinst_PROGRAMS += libmpiwrap-@VG_PLATFORM_SEC@.so
-libmpiwrap-@VG_PLATFORM_SEC@.so: libmpiwrap.c
+noinst_PROGRAMS += libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.so
+libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.so: libmpiwrap.c
$(MPI_CC) $(HACKY_FLAGS_SEC) \
-I../include \
- -o libmpiwrap-@VG_PLATFORM_SEC@.so libmpiwrap.c
+ -o libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.so libmpiwrap.c
endif
@@ -87,19 +87,19 @@
if BUILD_MPIWRAP_PRI
# convert (eg) X86_LINUX to x86-linux
# really should use sed here, rather than assume tr is available
- pD=`echo @VG_PLATFORM_PRI@ | tr A-Z_ a-z-` ; \
+ pD=`echo @VGCONF_PLATFORM_PRI_CAPS@ | tr A-Z_ a-z-` ; \
$(mkinstalldirs) $(DESTDIR)$(valdir)/$$pD; \
rm -f ./libmpiwrap.so; \
- cp ./libmpiwrap-@VG_PLATFORM_PRI@.so ./libmpiwrap.so; \
+ cp ./libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.so ./libmpiwrap.so; \
$(INSTALL_PROGRAM) ./libmpiwrap.so \
$(DESTDIR)$(valdir)/$$pD; \
rm -f ./libmpiwrap.so
endif
if BUILD_MPIWRAP_SEC
- pD=`echo @VG_PLATFORM_SEC@ | tr A-Z_ a-z-` ; \
+ pD=`echo @VGCONF_PLATFORM_SEC_CAPS@ | tr A-Z_ a-z-` ; \
$(mkinstalldirs) $(DESTDIR)$(valdir)/$$pD; \
rm -f ./libmpiwrap.so; \
- cp ./libmpiwrap-@VG_PLATFORM_SEC@.so ./libmpiwrap.so; \
+ cp ./libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.so ./libmpiwrap.so; \
$(INSTALL_PROGRAM) ./libmpiwrap.so \
$(DESTDIR)$(valdir)/$$pD; \
rm -f ./libmpiwrap.so
@@ -110,27 +110,28 @@
## It would seem that using nodist_SOURCES is the right fix, but
## I can't figure out how to do it.
##
-#nodist_SOURCES = libmpiwrap-@VG_PLATFORM_PRI@.c
-#nodist_SOURCES = libmpiwrap-@VG_PLATFORM_SEC@.c
+#nodist_SOURCES = libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.c
+#nodist_SOURCES = libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.c
libmpiwrap-.c:
rm -f libmpiwrap-.c
touch libmpiwrap-.c
-libmpiwrap-@VG_PLATFORM_PRI@.c:
- rm -f libmpiwrap-@VG_PLATFORM_PRI@.c
- touch libmpiwrap-@VG_PLATFORM_PRI@.c
+libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.c:
+ rm -f libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.c
+ touch libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.c
-if VGP_HAVE_SECONDARY
-libmpiwrap-@VG_PLATFORM_SEC@.c:
- rm -f libmpiwrap-@VG_PLATFORM_SEC@.c
- touch libmpiwrap-@VG_PLATFORM_SEC@.c
+if VGCONF_HAVE_PLATFORM_SEC_CAPS
+libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.c:
+ rm -f libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.c
+ touch libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.c
endif
## cleanery
clean-local:
rm -f libmpiwrap-.c \
- libmpiwrap-@VG_PLATFORM_PRI@.c libmpiwrap-@VG_PLATFORM_SEC@.c
+ libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.c \
+ libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.c
#
#----------------------------------------------------------
Modified: trunk/cachegrind/Makefile.am
===================================================================
--- trunk/cachegrind/Makefile.am 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/cachegrind/Makefile.am 2009-01-22 21:56:32 UTC (rev 9031)
@@ -5,22 +5,22 @@
noinst_HEADERS = cg_arch.h cg_sim.c cg_branchpred.c
noinst_PROGRAMS =
-if VGP_X86_LINUX
+if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
noinst_PROGRAMS += cachegrind-x86-linux
endif
-if VGP_AMD64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
noinst_PROGRAMS += cachegrind-amd64-linux
endif
-if VGP_PPC32_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
noinst_PROGRAMS += cachegrind-ppc32-linux
endif
-if VGP_PPC64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
noinst_PROGRAMS += cachegrind-ppc64-linux
endif
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
noinst_PROGRAMS += cachegrind-ppc32-aix5
endif
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
noinst_PROGRAMS += cachegrind-ppc64-aix5
endif
Modified: trunk/cachegrind/tests/Makefile.am
===================================================================
--- trunk/cachegrind/tests/Makefile.am 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/cachegrind/tests/Makefile.am 2009-01-22 21:56:32 UTC (rev 9031)
@@ -3,7 +3,7 @@
include $(top_srcdir)/Makefile.flags.am
SUBDIRS = .
-if VGA_X86
+if VGCONF_ARCHS_INCLUDE_X86
SUBDIRS += x86
endif
Modified: trunk/callgrind/Makefile.am
===================================================================
--- trunk/callgrind/Makefile.am 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/callgrind/Makefile.am 2009-01-22 21:56:32 UTC (rev 9031)
@@ -5,22 +5,22 @@
noinst_HEADERS = global.h costs.h events.h
noinst_PROGRAMS =
-if VGP_X86_LINUX
+if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
noinst_PROGRAMS += callgrind-x86-linux
endif
-if VGP_AMD64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
noinst_PROGRAMS += callgrind-amd64-linux
endif
-if VGP_PPC32_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
noinst_PROGRAMS += callgrind-ppc32-linux
endif
-if VGP_PPC64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
noinst_PROGRAMS += callgrind-ppc64-linux
endif
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
noinst_PROGRAMS += callgrind-ppc32-aix5
endif
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
noinst_PROGRAMS += callgrind-ppc64-aix5
endif
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/configure.in 2009-01-22 21:56:32 UTC (rev 9031)
@@ -15,7 +15,9 @@
AM_MAINTAINER_MODE
+#----------------------------------------------------------------------------
# Where is VEX ?
+#----------------------------------------------------------------------------
# Nb: For the 2nd arg, the help string, AS_HELP_STRING is the proper way, but
# older autoconfs don't support it... here's what it would say:
#
@@ -50,7 +52,9 @@
# place.
AC_SUBST([DISTCHECK_CONFIGURE_FLAGS], [--with-vex=$VEX_DIR])
-# Checks for programs.
+#----------------------------------------------------------------------------
+# Checks for various programs.
+#----------------------------------------------------------------------------
CFLAGS="-Wno-long-long"
AC_PROG_LN_S
@@ -125,51 +129,49 @@
;;
esac
+#----------------------------------------------------------------------------
+# Arch/OS/platform tests.
+#----------------------------------------------------------------------------
+# We create a number of arch/OS/platform-related variables. We prefix them
+# all with "VGCONF_" which indicates that they are defined at
+# configure-time, and distinguishes them from the VGA_*/VGO_*/VGP_*
+# variables used when compiling C files.
-# Checks for the platform, with the aim of setting VG_ARCH_MAX. Note
-# that VG_ARCH_MAX must be set to reflect the most that this CPU can
-# do: for example if it is a 64-bit capable PowerPC, then it must be
-# set to ppc64 and not ppc32. Ditto for amd64.
-#
-# We will later in this file set VG_ARCH_PRI, which is the arch for
-# the primary target. For example, suppose we do a build on an amd64
-# machine, but --enable-only32bit has been requested. Then
-# VG_ARCH_MAX will be "amd64" since that reflects the most that this
-# cpu can do, but VG_ARCH_PRI will be "x86", since that reflects the
-# arch corresponding to the primary build (VG_PLATFORM_PRI).
-
AC_CANONICAL_HOST
AC_MSG_CHECKING([for a supported CPU])
-AC_SUBST(VG_ARCH_MAX)
+# ARCH_MAX reflects the most that this CPU can do: for example if it
+# is a 64-bit capable PowerPC, then it must be set to ppc64 and not ppc32.
+# Ditto for amd64. It is used for more configuration below, but is not used
+# outside this file.
case "${host_cpu}" in
i?86)
AC_MSG_RESULT([ok (${host_cpu})])
- VG_ARCH_MAX="x86"
+ ARCH_MAX="x86"
;;
x86_64)
AC_MSG_RESULT([ok (${host_cpu})])
- VG_ARCH_MAX="amd64"
+ ARCH_MAX="amd64"
;;
powerpc64)
-# This value can only happen on Linux, not on AIX
+ # This value can only happen on Linux, not on AIX
AC_MSG_RESULT([ok (${host_cpu})])
- VG_ARCH_MAX="ppc64"
+ ARCH_MAX="ppc64"
;;
powerpc)
-# Complexity. 'powerpc' on AIX implies a 64-bit capable CPU.
-# Whereas in Linux that means only a 32-bit capable CPU.
+ # Complexity. 'powerpc' on AIX implies a 64-bit capable CPU.
+ # Whereas in Linux that means only a 32-bit capable CPU.
AC_MSG_RESULT([ok (${host_cpu})])
case "${host_os}" in
aix5.*)
- VG_ARCH_MAX="ppc64"
+ ARCH_MAX="ppc64"
;;
*)
- VG_ARCH_MAX="ppc32"
+ ARCH_MAX="ppc32"
;;
esac
;;
@@ -180,10 +182,15 @@
;;
esac
+#----------------------------------------------------------------------------
+
# Sometimes it's convenient to subvert the bi-arch build system and
# just have a single build even though the underlying platform is
# capable of both. Hence handle --enable-only64bit and
# --enable-only32bit. Complain if both are issued :-)
+# [Actually, if either of these options are used, I think both get built,
+# but only one gets installed. So if you use an in-place build, both can be
+# used. --njn]
# Check if a 64-bit only build has been requested
AC_CACHE_CHECK([for a 64-bit only build], vg_cv_only64bit,
@@ -205,19 +212,17 @@
[Nonsensical: both --enable-only64bit and --enable-only32bit.])
fi
+#----------------------------------------------------------------------------
-# This variable will collect the individual suppression files
-# depending on the results of autoconf
-DEFAULT_SUPP=""
-AC_SUBST(DEFAULT_SUPP)
-
+# VGCONF_OS is the primary build OS. It is passed in to compilation of many
+# C files via -VGO_$(VGCONF_OS) and -VGP_$(VGCONF_ARCH_PRI)_$(VGCONF_OS).
AC_MSG_CHECKING([for a supported OS])
-AC_SUBST(VG_OS)
+AC_SUBST(VGCONF_OS)
case "${host_os}" in
*linux*)
AC_MSG_RESULT([ok (${host_os})])
- VG_OS="linux"
+ VGCONF_OS="linux"
# Ok, this is linux. Check the kernel version
AC_MSG_CHECKING([for the kernel version])
@@ -245,20 +250,20 @@
aix5.1.*)
AC_MSG_RESULT([ok (${host_os})])
- VG_OS="aix5"
+ VGCONF_OS="aix5"
;;
aix5.2.*)
AC_MSG_RESULT([ok (${host_os})])
- VG_OS="aix5"
+ VGCONF_OS="aix5"
;;
aix5.3.*)
AC_MSG_RESULT([ok (${host_os})])
- VG_OS="aix5"
+ VGCONF_OS="aix5"
;;
*freebsd*)
AC_MSG_RESULT([ok (${host_os})])
- VG_OS="freebsd"
+ VGCONF_OS="freebsd"
;;
*)
@@ -267,11 +272,13 @@
;;
esac
+#----------------------------------------------------------------------------
+
# If we are building on a 64 bit platform test to see if the system
# supports building 32 bit programs and disable 32 bit support if it
# does not support building 32 bit programs
-case "$VG_ARCH_MAX-$VG_OS" in
+case "$ARCH_MAX-$VGCONF_OS" in
amd64-linux|ppc64-linux)
AC_MSG_CHECKING([for 32 bit build support])
safe_CFLAGS=$CFLAGS
@@ -293,72 +300,86 @@
[--enable-only32bit was specified but system does not support 32 bit builds])
fi
-# Establish VG_PLATFORM_PRI. This is the primary build target. The
-# entire system, including regression and performance tests, will be
-# built for this target.
+#----------------------------------------------------------------------------
+
+# VGCONF_ARCH_PRI is the arch for the primary build target. By default it's
+# the same as ARCH_MAX. But if, say, we do a build on an amd64 machine, but
+# --enable-only32bit has been requested, then ARCH_MAX (see above) will be
+# "amd64" since that reflects the most that this cpu can do, but
+# VGCONF_ARCH_PRI will be downgraded to "x86", since that reflects the arch
+# corresponding to the primary build (VGCONF_PLATFORM_PRI_CAPS). It is
+# passed in to compilation of many C files via -VGA_$(VGCONF_ARCH_PRI) and
+# -VGP_$(VGCONF_ARCH_PRI)_$(VGCONF_OS).
+AC_SUBST(VGCONF_ARCH_PRI)
+
+# VGCONF_PLATFORM_PRI_CAPS is the primary build target. The entire system,
+# including regression and performance tests, will be built for this target.
+# The "_CAPS" indicates that the name is in capital letters, because it's
+# used to create various Makefile variables, which are all in caps by
+# convention. This is in contrast to VGCONF_ARCH_PRI and VGCONF_OS which
+# are not in caps.
+AC_SUBST(VGCONF_PLATFORM_PRI_CAPS)
+
+# VGCONF_PLATFORM_SEC_CAPS is the secondary build target, if there is one.
+# Valgrind and tools will also be built for this target, but not the
+# regression or performance tests.
#
-# Also establish VG_PLATFORM_SEC, the secondary build target, if
-# possible. The system will also be built for this target, but not
-# the regression or performance tests.
-#
-# Also establish VG_ARCH_PRI, which is the arch for the primary
-# build target. The various makefiles building regression tests
-# sometimes need to see this.
+# By default, the primary arch is the same as the "max" arch, as commented
+# above (at the definition of ARCH_MAX). We may choose to downgrade it in
+# the big case statement just below here, in the case where we're building
+# on a 64 bit machine but have been requested only to do a 32 bit build.
+AC_SUBST(VGCONF_PLATFORM_SEC_CAPS)
+
AC_MSG_CHECKING([for a supported CPU/OS combination])
-AC_SUBST(VG_PLATFORM_PRI)
-AC_SUBST(VG_PLATFORM_SEC)
-AC_SUBST(VG_ARCH_PRI)
-
-# By default, the primary arch is the same as the "max" arch, as
-# commented above (at the definition of VG_ARCH_MAX). We may choose
-# to downgrade it in the big case statement just below here, in the
-# case where we're building on a 64 bit machine but have been
-# requested only to do a 32 bit build.
-VG_ARCH_PRI=$VG_ARCH_MAX
-
-case "$VG_ARCH_MAX-$VG_OS" in
+case "$ARCH_MAX-$VGCONF_OS" in
x86-linux)
- VG_PLATFORM_PRI="X86_LINUX"
- VG_PLATFORM_SEC=""
+ VGCONF_ARCH_PRI="x86"
+ VGCONF_PLATFORM_PRI_CAPS="X86_LINUX"
+ VGCONF_PLATFORM_SEC_CAPS=""
valt_load_address_normal="0x38000000"
valt_load_address_inner="0x28000000"
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
amd64-linux)
if test x$vg_cv_only64bit = xyes; then
- VG_PLATFORM_PRI="AMD64_LINUX"
- VG_PLATFORM_SEC=""
+ VGCONF_ARCH_PRI="amd64"
+ VGCONF_PLATFORM_PRI_CAPS="AMD64_LINUX"
+ VGCONF_PLATFORM_SEC_CAPS=""
elif test x$vg_cv_only32bit = xyes; then
- VG_PLATFORM_PRI="X86_LINUX"
- VG_PLATFORM_SEC=""
- VG_ARCH_PRI="x86"
+ VGCONF_ARCH_PRI="x86"
+ VGCONF_PLATFORM_PRI_CAPS="X86_LINUX"
+ VGCONF_PLATFORM_SEC_CAPS=""
else
- VG_PLATFORM_PRI="AMD64_LINUX"
- VG_PLATFORM_SEC="X86_LINUX"
+ VGCONF_ARCH_PRI="amd64"
+ VGCONF_PLATFORM_PRI_CAPS="AMD64_LINUX"
+ VGCONF_PLATFORM_SEC_CAPS="X86_LINUX"
fi
valt_load_address_normal="0x38000000"
valt_load_address_inner="0x28000000"
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
ppc32-linux)
- VG_PLATFORM_PRI="PPC32_LINUX"
- VG_PLATFORM_SEC=""
+ VGCONF_ARCH_PRI="ppc32"
+ VGCONF_PLATFORM_PRI_CAPS="PPC32_LINUX"
+ VGCONF_PLATFORM_SEC_CAPS=""
valt_load_address_normal="0x38000000"
valt_load_address_inner="0x28000000"
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
ppc64-aix5)
if test x$vg_cv_only64bit = xyes; then
- VG_PLATFORM_PRI="PPC64_AIX5"
- VG_PLATFORM_SEC=""
+ VGCONF_ARCH_PRI="ppc64"
+ VGCONF_PLATFORM_PRI_CAPS="PPC64_AIX5"
+ VGCONF_PLATFORM_SEC_CAPS=""
elif test x$vg_cv_only32bit = xyes; then
- VG_PLATFORM_PRI="PPC32_AIX5"
- VG_PLATFORM_SEC=""
- VG_ARCH_PRI="ppc32"
+ VGCONF_ARCH_PRI="ppc32"
+ VGCONF_PLATFORM_PRI_CAPS="PPC32_AIX5"
+ VGCONF_PLATFORM_SEC_CAPS=""
else
- VG_PLATFORM_PRI="PPC64_AIX5"
- VG_PLATFORM_SEC="PPC32_AIX5"
+ VGCONF_ARCH_PRI="ppc64"
+ VGCONF_PLATFORM_PRI_CAPS="PPC64_AIX5"
+ VGCONF_PLATFORM_SEC_CAPS="PPC32_AIX5"
fi
valt_load_address_normal="0x38000000"
valt_load_address_inner="0x28000000"
@@ -366,83 +387,91 @@
;;
ppc64-linux)
if test x$vg_cv_only64bit = xyes; then
- VG_PLATFORM_PRI="PPC64_LINUX"
- VG_PLATFORM_SEC=""
+ VGCONF_ARCH_PRI="ppc64"
+ VGCONF_PLATFORM_PRI_CAPS="PPC64_LINUX"
+ VGCONF_PLATFORM_SEC_CAPS=""
elif test x$vg_cv_only32bit = xyes; then
- VG_PLATFORM_PRI="PPC32_LINUX"
- VG_PLATFORM_SEC=""
- VG_ARCH_PRI="ppc32"
+ VGCONF_ARCH_PRI="ppc32"
+ VGCONF_PLATFORM_PRI_CAPS="PPC32_LINUX"
+ VGCONF_PLATFORM_SEC_CAPS=""
+ VGCONF_ARCH_PRI="ppc32"
else
- VG_PLATFORM_PRI="PPC64_LINUX"
- VG_PLATFORM_SEC="PPC32_LINUX"
+ VGCONF_ARCH_PRI="ppc64"
+ VGCONF_PLATFORM_PRI_CAPS="PPC64_LINUX"
+ VGCONF_PLATFORM_SEC_CAPS="PPC32_LINUX"
fi
valt_load_address_normal="0x38000000"
valt_load_address_inner="0x28000000"
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
*)
- VG_PLATFORM_PRI="unknown"
- VG_PLATFORM_SEC="unknown"
+ VGCONF_ARCH_PRI="unknown"
+ VGCONF_PLATFORM_PRI_CAPS="UNKNOWN"
+ VGCONF_PLATFORM_SEC_CAPS="UNKNOWN"
AC_MSG_RESULT([no (${host_cpu}-${host_os})])
AC_MSG_ERROR([Valgrind is platform specific. Sorry. Please consider doing a port.])
;;
esac
-# Set up VGA_<arch>. Either one or two of these become defined.
-#
-AM_CONDITIONAL(VGA_X86,
- test x$VG_PLATFORM_PRI = xX86_LINUX \
- -o x$VG_PLATFORM_SEC = xX86_LINUX )
-AM_CONDITIONAL(VGA_AMD64,
- test x$VG_PLATFORM_PRI = xAMD64_LINUX )
-AM_CONDITIONAL(VGA_PPC32,
- test x$VG_PLATFORM_PRI = xPPC32_LINUX \
- -o x$VG_PLATFORM_SEC = xPPC32_LINUX \
- -o x$VG_PLATFORM_PRI = xPPC32_AIX5 \
- -o x$VG_PLATFORM_SEC = xPPC32_AIX5 )
-AM_CONDITIONAL(VGA_PPC64,
- test x$VG_PLATFORM_PRI = xPPC64_LINUX \
- -o x$VG_PLATFORM_PRI = xPPC64_AIX5 )
+#----------------------------------------------------------------------------
-# Set up VGP_<platform>. Either one or two of these become defined.
-#
-AM_CONDITIONAL(VGP_X86_LINUX,
- test x$VG_PLATFORM_PRI = xX86_LINUX \
- -o x$VG_PLATFORM_SEC = xX86_LINUX)
-AM_CONDITIONAL(VGP_AMD64_LINUX,
- test x$VG_PLATFORM_PRI = xAMD64_LINUX)
-AM_CONDITIONAL(VGP_PPC32_LINUX,
- test x$VG_PLATFORM_PRI = xPPC32_LINUX \
- -o x$VG_PLATFORM_SEC = xPPC32_LINUX)
-AM_CONDITIONAL(VGP_PPC64_LINUX,
- test x$VG_PLATFORM_PRI = xPPC64_LINUX)
-AM_CONDITIONAL(VGP_PPC32_AIX5,
- test x$VG_PLATFORM_PRI = xPPC32_AIX5 \
- -o x$VG_PLATFORM_SEC = xPPC32_AIX5)
-AM_CONDITIONAL(VGP_PPC64_AIX5,
- test x$VG_PLATFORM_PRI = xPPC64_AIX5)
+# Set up VGCONF_ARCHS_INCLUDE_<arch>. Either one or two of these become
+# defined.
+AM_CONDITIONAL(VGCONF_ARCHS_INCLUDE_X86,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xX86_LINUX \
+ -o x$VGCONF_PLATFORM_SEC_CAPS = xX86_LINUX )
+AM_CONDITIONAL(VGCONF_ARCHS_INCLUDE_AMD64,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_LINUX )
+AM_CONDITIONAL(VGCONF_ARCHS_INCLUDE_PPC32,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_LINUX \
+ -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_LINUX \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 \
+ -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_AIX5 )
+AM_CONDITIONAL(VGCONF_ARCHS_INCLUDE_PPC64,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5 )
-# Similarly, set up VGO_<os>. Exactly one of these becomes defined.
+# Set up VGCONF_PLATFORMS_INCLUDE_<platform>. Either one or two of these
+# become defined.
+AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_X86_LINUX,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xX86_LINUX \
+ -o x$VGCONF_PLATFORM_SEC_CAPS = xX86_LINUX)
+AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_LINUX)
+AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_LINUX \
+ -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_LINUX)
+AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX)
+AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 \
+ -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_AIX5)
+AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5)
+
+# Similarly, set up VGCONF_OF_IS_<os>. Exactly one of these becomes defined.
# Relies on the assumption that the primary and secondary targets are
# for the same OS, so therefore only necessary to test the primary.
-#
-AM_CONDITIONAL(VGO_LINUX,
- test x$VG_PLATFORM_PRI = xX86_LINUX \
- -o x$VG_PLATFORM_PRI = xAMD64_LINUX \
- -o x$VG_PLATFORM_PRI = xPPC32_LINUX \
- -o x$VG_PLATFORM_PRI = xPPC64_LINUX)
-AM_CONDITIONAL(VGO_AIX5,
- test x$VG_PLATFORM_PRI = xPPC32_AIX5 \
- -o x$VG_PLATFORM_PRI = xPPC64_AIX5)
+AM_CONDITIONAL(VGCONF_OS_IS_LINUX,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xX86_LINUX \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_LINUX \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_LINUX \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX)
+AM_CONDITIONAL(VGCONF_OS_IS_AIX5,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5)
-# Sometimes, in the Makefile.am-s, it's useful to know
-# whether or not there is a secondary target.
-#
-AM_CONDITIONAL(VGP_HAVE_SECONDARY,
- test x$VG_PLATFORM_SEC != x)
+# Sometimes, in the Makefile.am files, it's useful to know whether or not
+# there is a secondary target.
+AM_CONDITIONAL(VGCONF_HAVE_PLATFORM_SEC_CAPS,
+ test x$VGCONF_PLATFORM_SEC_CAPS != x)
+#----------------------------------------------------------------------------
+# Inner Valgrind?
+#----------------------------------------------------------------------------
+
# Check if this should be built as an inner Valgrind, to be run within
# another Valgrind. Choose the load address accordingly.
AC_SUBST(VALT_LOAD_ADDRESS)
@@ -459,8 +488,13 @@
fi
+#----------------------------------------------------------------------------
+# Libc and suppressions
+#----------------------------------------------------------------------------
+# This variable will collect the suppression files to be used.
+DEFAULT_SUPP=""
+AC_SUBST(DEFAULT_SUPP)
-
GLIBC_VERSION=""
AC_EGREP_CPP([GLIBC_22], [
@@ -640,6 +674,10 @@
DEFAULT_SUPP="exp-ptrcheck.supp ${DEFAULT_SUPP}"
+#----------------------------------------------------------------------------
+# Checking for various library functions and other definitions
+#----------------------------------------------------------------------------
+
# Check for CLOCK_MONOTONIC
AC_MSG_CHECKING([for CLOCK_MONOTONIC])
@@ -852,6 +890,10 @@
])
+#----------------------------------------------------------------------------
+# Checking for supported compiler flags.
+#----------------------------------------------------------------------------
+
# does this compiler support -m32 ?
AC_MSG_CHECKING([if gcc accepts -m32])
@@ -1281,7 +1323,10 @@
fi
+#----------------------------------------------------------------------------
# Checks for C header files.
+#----------------------------------------------------------------------------
+
AC_HEADER_STDC
AC_CHECK_HEADERS([ \
asm/unistd.h \
@@ -1299,14 +1344,18 @@
sys/types.h \
])
+#----------------------------------------------------------------------------
# Checks for typedefs, structures, and compiler characteristics.
+#----------------------------------------------------------------------------
AC_TYPE_UID_T
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
+#----------------------------------------------------------------------------
# Checks for library functions.
+#----------------------------------------------------------------------------
AC_FUNC_MEMCMP
AC_FUNC_MMAP
AC_TYPE_SIGNAL
@@ -1354,6 +1403,10 @@
AM_CONDITIONAL([HAVE_PTHREAD_SPINLOCK],
[test x$ac_cv_func_pthread_spin_lock = xyes])
+
+#----------------------------------------------------------------------------
+# MPI checks
+#----------------------------------------------------------------------------
# Do we have a useable MPI setup on the primary and/or secondary targets?
# On Linux, by default, assumes mpicc and -m32/-m64
# On AIX, by default, assumes mpxlc and -q32/-q64
@@ -1361,29 +1414,29 @@
# understands -m32/-m64/-q32/-q64 regardless of what is specified using
# --with-mpicc=.
MPI_CC="mpicc"
-if test x$VG_PLATFORM_PRI = xPPC32_AIX5 \
- -o x$VG_PLATFORM_PRI = xPPC64_AIX5 ; then
+if test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5 ; then
MPI_CC="mpxlc"
fi
mflag_primary=
-if test x$VG_PLATFORM_PRI = xX86_LINUX \
- -o x$VG_PLATFORM_PRI = xPPC32_LINUX ; then
+if test x$VGCONF_PLATFORM_PRI_CAPS = xX86_LINUX \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_LINUX ; then
mflag_primary=$FLAG_M32
-elif test x$VG_PLATFORM_PRI = xAMD64_LINUX \
- -o x$VG_PLATFORM_PRI = xPPC64_LINUX ; then
+elif test x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_LINUX \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX ; then
mflag_primary=$FLAG_M64
-elif test x$VG_PLATFORM_PRI = xPPC32_AIX5 ; then
+elif test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 ; then
mflag_primary=-q32
-elif test x$VG_PLATFORM_PRI = xPPC64_AIX5 ; then
+elif test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5 ; then
mflag_primary=-q64
fi
mflag_secondary=
-if test x$VG_PLATFORM_SEC = xX86_LINUX \
- -o x$VG_PLATFORM_SEC = xPPC32_LINUX ; then
+if test x$VGCONF_PLATFORM_SEC_CAPS = xX86_LINUX \
+ -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_LINUX ; then
mflag_secondary=$FLAG_M32
-elif test x$VG_PLATFORM_SEC = xPPC32_AIX5 ; then
+elif test x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_AIX5 ; then
mflag_secondary=-q32
fi
@@ -1427,7 +1480,7 @@
AC_MSG_CHECKING([secondary target for usable MPI2-compliant C compiler and mpi.h])
saved_CC=$CC
saved_CFLAGS=$CFLAGS
-if test x$VG_PLATFORM_SEC = x ; then
+if test x$VGCONF_PLATFORM_SEC_CAPS = x ; then
CC="$MPI_CC this will surely fail"
else
CC=$MPI_CC
@@ -1452,6 +1505,9 @@
AM_CONDITIONAL(BUILD_MPIWRAP_SEC, test x$ac_have_mpi2_sec = xyes)
+#----------------------------------------------------------------------------
+# Other library checks
+#----------------------------------------------------------------------------
# There now follow some tests for QtCore, Boost, and OpenMP. These
# tests are present because Drd has some regression tests that use
# these packages. All regression test programs all compiled only
@@ -1614,7 +1670,9 @@
AM_CONDITIONAL([HAVE_OPENMP], [test x$ac_have_openmp = xyes])
-# -------------------- ok. We're done. --------------------
+#----------------------------------------------------------------------------
+# Ok. We're done checking.
+#----------------------------------------------------------------------------
AC_OUTPUT(
Makefile
@@ -1683,11 +1741,11 @@
cat<<EOF
- configure.in: VG_ARCH_MAX = ${VG_ARCH_MAX}
- configure.in: VG_ARCH_PRI = ${VG_ARCH_PRI}
+ configure.in: ARCH_MAX = ${ARCH_MAX}
+ configure.in: VGCONF_ARCH_PRI = ${VGCONF_ARCH_PRI}
- Primary build target: ${VG_PLATFORM_PRI}
- Secondary build target: ${VG_PLATFORM_SEC}
+ Primary build target: ${VGCONF_PLATFORM_PRI_CAPS}
+ Secondary build target: ${VGCONF_PLATFORM_SEC_CAPS}
Default supp files: ${DEFAULT_SUPP}
EOF
Modified: trunk/coregrind/Makefile.am
===================================================================
--- trunk/coregrind/Makefile.am 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/coregrind/Makefile.am 2009-01-22 21:56:32 UTC (rev 9031)
@@ -19,22 +19,22 @@
default.supp: $(SUPP_FILES)
noinst_LIBRARIES =
-if VGP_X86_LINUX
+if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
noinst_LIBRARIES += libcoregrind_x86_linux.a libreplacemalloc_toolpreload_x86_linux.a
endif
-if VGP_AMD64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
noinst_LIBRARIES += libcoregrind_amd64_linux.a libreplacemalloc_toolpreload_amd64_linux.a
endif
-if VGP_PPC32_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
noinst_LIBRARIES += libcoregrind_ppc32_linux.a libreplacemalloc_toolpreload_ppc32_linux.a
endif
-if VGP_PPC64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
noinst_LIBRARIES += libcoregrind_ppc64_linux.a libreplacemalloc_toolpreload_ppc64_linux.a
endif
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
noinst_LIBRARIES += libcoregrind_ppc32_aix5.a libreplacemalloc_toolpreload_ppc32_aix5.a
endif
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
noinst_LIBRARIES += libcoregrind_ppc64_aix5.a libreplacemalloc_toolpreload_ppc64_aix5.a
endif
@@ -44,7 +44,7 @@
bin_PROGRAMS = \
valgrind no_op_client_for_valgrind
-if VGO_AIX5
+if VGCONF_OS_IS_AIX5
valgrind_SOURCES = \
launcher-aix5.c \
m_debuglog.c \
@@ -70,22 +70,22 @@
noinst_PROGRAMS =
-if VGP_X86_LINUX
+if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
noinst_PROGRAMS += vgpreload_core-x86-linux.so
endif
-if VGP_AMD64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
noinst_PROGRAMS += vgpreload_core-amd64-linux.so
endif
-if VGP_PPC32_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
noinst_PROGRAMS += vgpreload_core-ppc32-linux.so
endif
-if VGP_PPC64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
noinst_PROGRAMS += vgpreload_core-ppc64-linux.so
endif
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
noinst_PROGRAMS += vgpreload_core-ppc32-aix5.so
endif
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
noinst_PROGRAMS += vgpreload_core-ppc64-aix5.so
endif
Modified: trunk/docs/internals/multiple-architectures.txt
===================================================================
--- trunk/docs/internals/multiple-architectures.txt 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/docs/internals/multiple-architectures.txt 2009-01-22 21:56:32 UTC (rev 9031)
@@ -41,21 +41,25 @@
The configure script inspects the CPU. It then sets
- VG_PLATFORM_PRI to be the primary target
- VG_PLATFORM_SEC to be the secondary target, if any
+ VGCONF_PLATFORM_PRI_CAPS to be the primary target
+ VGCONF_PLATFORM_SEC_CAPS to be the secondary target, if any
It also sets one (single-arch build) or two (dual-arch build) of
the following:
- VG_X86_LINUX
- VG_AMD64_LINUX
- VG_PPC32_LINUX
- VG_PPC64_LINUX
+ VGCONF_PLATFORMS_INCLUDE_X86_LINUX
+ VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
+ VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
+ VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
+ ...
-On an amd64 system both VG_X86_LINUX and VG_AMD64_LINUX will be true
-so that two versions of all the tools will be built. Similarly on a
-ppc64 system both VG_PPC32_LINUX and VG_PPC64_LINUX will be defined.
-For the amd64 example, the coregrind libraries will be named:
+On an amd64 system both VGCONF_PLATFORMS_INCLUDE_X86_LINUX and
+VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX will be true so that two versions of
+all the tools will be built. Similarly on a ppc64 system both
+VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX and
+VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX will be defined (unless
+--enable-only32bit or --enable-only64bit is used). For the amd64 example,
+ the coregrind libraries will be named:
libcoregrind_x86_linux.a
libcoregrind_amd64_linux.a
@@ -117,13 +121,8 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In places where compilation should happen twice (on a dual-arch
system), the decision about which directories and flags to use is
-guarded by the symbols:
+guarded by the VGCONF_PLATFORMS_INCLUDE_* symbols.
- VG_X86_LINUX
- VG_AMD64_LINUX
- VG_PPC32_LINUX
- VG_PPC64_LINUX
-
But there are also places where building must only happen once,
for the primary architecture. These places are (at least):
Modified: trunk/docs/internals/porting-HOWTO.txt
===================================================================
--- trunk/docs/internals/porting-HOWTO.txt 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/docs/internals/porting-HOWTO.txt 2009-01-22 21:56:32 UTC (rev 9031)
@@ -85,7 +85,6 @@
- Create necessary subdirs (copy linux/ and x86-linux/ subdirs).
- Update configure.in (use linux and x86-linux as a guide).
- Don't forget to update VG_OS_ALL, VG_PLATFORM_ALL.
- Implement all the necessary OS-specific and platform-specific types,
functions, and macros... use the following as templates:
Modified: trunk/drd/Makefile.am
===================================================================
--- trunk/drd/Makefile.am 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/drd/Makefile.am 2009-01-22 21:56:32 UTC (rev 9031)
@@ -1,22 +1,22 @@
include $(top_srcdir)/Makefile.tool.am
noinst_PROGRAMS =
-if VGP_X86_LINUX
+if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
noinst_PROGRAMS += drd-x86-linux vgpreload_drd-x86-linux.so
endif
-if VGP_AMD64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
noinst_PROGRAMS += drd-amd64-linux vgpreload_drd-amd64-linux.so
endif
-if VGP_PPC32_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
noinst_PROGRAMS += drd-ppc32-linux vgpreload_drd-ppc32-linux.so
endif
-if VGP_PPC64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
noinst_PROGRAMS += drd-ppc64-linux vgpreload_drd-ppc64-linux.so
endif
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
noinst_PROGRAMS += drd-ppc32-aix5 vgpreload_drd-ppc32-aix5.so
endif
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
noinst_PROGRAMS += drd-ppc64-aix5 vgpreload_drd-ppc64-aix5.so
endif
Modified: trunk/drd/tests/Makefile.am
===================================================================
--- trunk/drd/tests/Makefile.am 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/drd/tests/Makefile.am 2009-01-22 21:56:32 UTC (rev 9031)
@@ -198,8 +198,8 @@
trylock.vgtest
AM_CFLAGS = $(WERROR) -Wall @FLAG_W_EXTRA@ -Wno-inline -Wno-unused-parameter\
- -g $(AM_FLAG_M3264_PRI) -DVGA_$(VG_ARCH_PRI)=1 -DVGO_$(VG_OS)=1 \
- -DVGP_$(VG_ARCH_PRI)_$(VG_OS)=1
+ -g $(AM_FLAG_M3264_PRI) -DVGA_$(VGCONF_ARCH_PRI)=1 \
+ -DVGO_$(VGCONF_OS)=1 -DVGP_$(VGCONF_ARCH_PRI)_$(VGCONF_OS)=1
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \
-I$(top_builddir)/include -I$(top_srcdir)/VEX/pub
AM_CXXFLAGS = $(AM_CFLAGS)
Modified: trunk/exp-omega/Makefile.am
===================================================================
--- trunk/exp-omega/Makefile.am 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/exp-omega/Makefile.am 2009-01-22 21:56:32 UTC (rev 9031)
@@ -12,22 +12,22 @@
##zz
##zz # include memcheck/ for mac_shared.h
##zz noinst_PROGRAMS =
-##zz if VGP_X86_LINUX
+##zz if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
##zz noinst_PROGRAMS += exp-omega-x86-linux vgpreload_exp-omega-x86-linux.so
##zz endif
-##zz if VGP_AMD64_LINUX
+##zz if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
##zz noinst_PROGRAMS += exp-omega-amd64-linux vgpreload_exp-omega-amd64-linux.so
##zz endif
-##zz if VGP_PPC32_LINUX
+##zz if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
##zz noinst_PROGRAMS += exp-omega-ppc32-linux vgpreload_exp-omega-ppc32-linux.so
##zz endif
-##zz if VGP_PPC64_LINUX
+##zz if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
##zz noinst_PROGRAMS += exp-omega-ppc64-linux vgpreload_exp-omega-ppc64-linux.so
##zz endif
-##zz if VGP_PPC32_AIX5
+##zz if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
##zz noinst_PROGRAMS += exp-omega-ppc32-aix5 vgpreload_exp-omega-ppc32-aix5.so
##zz endif
-##zz if VGP_PPC64_AIX5
+##zz if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
##zz noinst_PROGRAMS += exp-omega-ppc64-aix5 vgpreload_exp-omega-ppc64-aix5.so
##zz endif
##zz
Modified: trunk/exp-ptrcheck/Makefile.am
===================================================================
--- trunk/exp-ptrcheck/Makefile.am 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/exp-ptrcheck/Makefile.am 2009-01-22 21:56:32 UTC (rev 9031)
@@ -1,22 +1,22 @@
include $(top_srcdir)/Makefile.tool.am
noinst_PROGRAMS =
-if VGP_X86_LINUX
+if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
noinst_PROGRAMS += exp-ptrcheck-x86-linux vgpreload_exp-ptrcheck-x86-linux.so
endif
-if VGP_AMD64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
noinst_PROGRAMS += exp-ptrcheck-amd64-linux vgpreload_exp-ptrcheck-amd64-linux.so
endif
-if VGP_PPC32_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
noinst_PROGRAMS += exp-ptrcheck-ppc32-linux vgpreload_exp-ptrcheck-ppc32-linux.so
endif
-if VGP_PPC64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
noinst_PROGRAMS += exp-ptrcheck-ppc64-linux vgpreload_exp-ptrcheck-ppc64-linux.so
endif
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
noinst_PROGRAMS += exp-ptrcheck-ppc32-aix5 vgpreload_exp-ptrcheck-ppc32-aix5.so
endif
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
noinst_PROGRAMS += exp-ptrcheck-ppc64-aix5 vgpreload_exp-ptrcheck-ppc64-aix5.so
endif
Modified: trunk/exp-ptrcheck/tests/Makefile.am
===================================================================
--- trunk/exp-ptrcheck/tests/Makefile.am 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/exp-ptrcheck/tests/Makefile.am 2009-01-22 21:56:32 UTC (rev 9031)
@@ -3,7 +3,7 @@
include $(top_srcdir)/Makefile.flags.am
#SUBDIRS = .
-#if VGA_X86
+#if VGCONF_ARCHS_INCLUDE_X86
#SUBDIRS += x86
#DIST_SUBDIRS = x86 .
@@ -128,11 +128,11 @@
# Build shared object for preen_invars
preen_invars_SOURCES = preen_invars.c
preen_invars_DEPENDENCIES = preen_invars_so.so
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
preen_invars_LDADD = -ldl
preen_invars_LDFLAGS = $(AM_FLAG_M3264_PRI)
else
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
preen_invars_LDADD = -ldl
preen_invars_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
else
@@ -146,10 +146,10 @@
preen_invars_so_so_LDADD =
preen_invars_so_so_DEPENDENCIES =
preen_invars_so_so_CFLAGS = -fpic $(AM_FLAG_M3264_PRI) -g
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
preen_invars_so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared
else
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
preen_invars_so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
-Wl,-G -Wl,-bnogc
else
Modified: trunk/helgrind/Makefile.am
===================================================================
--- trunk/helgrind/Makefile.am 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/helgrind/Makefile.am 2009-01-22 21:56:32 UTC (rev 9031)
@@ -1,22 +1,22 @@
include $(top_srcdir)/Makefile.tool.am
noinst_PROGRAMS =
-if VGP_X86_LINUX
+if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
noinst_PROGRAMS += helgrind-x86-linux vgpreload_helgrind-x86-linux.so
endif
-if VGP_AMD64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
noinst_PROGRAMS += helgrind-amd64-linux vgpreload_helgrind-amd64-linux.so
endif
-if VGP_PPC32_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
noinst_PROGRAMS += helgrind-ppc32-linux vgpreload_helgrind-ppc32-linux.so
endif
-if VGP_PPC64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
noinst_PROGRAMS += helgrind-ppc64-linux vgpreload_helgrind-ppc64-linux.so
endif
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
noinst_PROGRAMS += helgrind-ppc32-aix5 vgpreload_helgrind-ppc32-aix5.so
endif
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
noinst_PROGRAMS += helgrind-ppc64-aix5 vgpreload_helgrind-ppc64-aix5.so
endif
Modified: trunk/lackey/Makefile.am
===================================================================
--- trunk/lackey/Makefile.am 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/lackey/Makefile.am 2009-01-22 21:56:32 UTC (rev 9031)
@@ -1,22 +1,22 @@
include $(top_srcdir)/Makefile.tool.am
noinst_PROGRAMS =
-if VGP_X86_LINUX
+if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
noinst_PROGRAMS += lackey-x86-linux
endif
-if VGP_AMD64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
noinst_PROGRAMS += lackey-amd64-linux
endif
-if VGP_PPC32_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
noinst_PROGRAMS += lackey-ppc32-linux
endif
-if VGP_PPC64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
noinst_PROGRAMS += lackey-ppc64-linux
endif
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
noinst_PROGRAMS += lackey-ppc32-aix5
endif
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
noinst_PROGRAMS += lackey-ppc64-aix5
endif
Modified: trunk/massif/Makefile.am
===================================================================
--- trunk/massif/Makefile.am 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/massif/Makefile.am 2009-01-22 21:56:32 UTC (rev 9031)
@@ -5,22 +5,22 @@
bin_SCRIPTS = ms_print
noinst_PROGRAMS =
-if VGP_X86_LINUX
+if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
noinst_PROGRAMS += massif-x86-linux vgpreload_massif-x86-linux.so
endif
-if VGP_AMD64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
noinst_PROGRAMS += massif-amd64-linux vgpreload_massif-amd64-linux.so
endif
-if VGP_PPC32_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
noinst_PROGRAMS += massif-ppc32-linux vgpreload_massif-ppc32-linux.so
endif
-if VGP_PPC64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
noinst_PROGRAMS += massif-ppc64-linux vgpreload_massif-ppc64-linux.so
endif
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
noinst_PROGRAMS += massif-ppc32-aix5 vgpreload_massif-ppc32-aix5.so
endif
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
noinst_PROGRAMS += massif-ppc64-aix5 vgpreload_massif-ppc64-aix5.so
endif
Modified: trunk/memcheck/Makefile.am
===================================================================
--- trunk/memcheck/Makefile.am 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/memcheck/Makefile.am 2009-01-22 21:56:32 UTC (rev 9031)
@@ -1,22 +1,22 @@
include $(top_srcdir)/Makefile.tool.am
noinst_PROGRAMS =
-if VGP_X86_LINUX
+if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
noinst_PROGRAMS += memcheck-x86-linux vgpreload_memcheck-x86-linux.so
endif
-if VGP_AMD64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
noinst_PROGRAMS += memcheck-amd64-linux vgpreload_memcheck-amd64-linux.so
endif
-if VGP_PPC32_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
noinst_PROGRAMS += memcheck-ppc32-linux vgpreload_memcheck-ppc32-linux.so
endif
-if VGP_PPC64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
noinst_PROGRAMS += memcheck-ppc64-linux vgpreload_memcheck-ppc64-linux.so
endif
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
noinst_PROGRAMS += memcheck-ppc32-aix5 vgpreload_memcheck-ppc32-aix5.so
endif
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
noinst_PROGRAMS += memcheck-ppc64-aix5 vgpreload_memcheck-ppc64-aix5.so
endif
Modified: trunk/memcheck/tests/Makefile.am
===================================================================
--- trunk/memcheck/tests/Makefile.am 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/memcheck/tests/Makefile.am 2009-01-22 21:56:32 UTC (rev 9031)
@@ -5,20 +5,20 @@
SUBDIRS = .
# Arch-specific tests.
-if VGA_X86
+if VGCONF_ARCHS_INCLUDE_X86
SUBDIRS += x86
endif
-if VGA_AMD64
+if VGCONF_ARCHS_INCLUDE_AMD64
SUBDIRS += amd64
endif
# OS-specific tests
-if VGO_LINUX
+if VGCONF_OS_IS_LINUX
SUBDIRS += linux
endif
# Platform-specific tests
-if VGP_X86_LINUX
+if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
SUBDIRS += x86-linux
endif
@@ -237,8 +237,9 @@
# Extra stuff for C tests
memcmptest_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -fno-builtin-memcmp
oset_test_CFLAGS = $(AM_FLAG_M3264_PRI) \
- -DVGA_$(VG_ARCH_PRI)=1 -DVGO_$(VG_OS)=1 \
- -DVGP_$(VG_ARCH_PRI)_$(VG_OS)=1
+ -DVGA_$(VGCONF_ARCH_PRI)=1 \
+ -DVGO_$(VGCONF_OS)=1 \
+ -DVGP_$(VGCONF_ARCH_PRI)_$(VGCONF_OS)=1
vcpu_bz2_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O2 -g
vcpu_fbench_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O2 -g
vcpu_fnfns_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O2 -g
@@ -274,8 +275,8 @@
long_namespace_xml_SOURCES = long_namespace_xml.cpp
deep_templates_CXXFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O -gstabs
-if VGP_PPC32_AIX5
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
else
# persuade the AIX linker not to junk apparently unused
# function descriptors. Unfortunately -Wl,-G -Wl,-bnogc
@@ -294,11 +295,11 @@
# Build shared object for wrap7
wrap7_SOURCES = wrap7.c
wrap7_DEPENDENCIES = wrap7so.so
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
wrap7_LDADD = `pwd`/wrap7so.so
wrap7_LDFLAGS = $(AM_FLAG_M3264_PRI)
else
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
wrap7_LDADD = `pwd`/wrap7so.so
wrap7_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
else
@@ -312,10 +313,10 @@
wrap7so_so_LDADD =
wrap7so_so_DEPENDENCIES =
wrap7so_so_CFLAGS = -fpic $(AM_FLAG_M3264_PRI)
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
wrap7so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared
else
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
wrap7so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
-Wl,-G -Wl,-bnogc
else
@@ -327,11 +328,11 @@
# Build shared object for varinfo5
varinfo5_SOURCES = varinfo5.c
varinfo5_DEPENDENCIES = varinfo5so.so
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
varinfo5_LDADD = `pwd`/varinfo5so.so
varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI)
else
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
varinfo5_LDADD = `pwd`/varinfo5so.so
varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
else
@@ -345,10 +346,10 @@
varinfo5so_so_LDADD =
varinfo5so_so_DEPENDENCIES =
varinfo5so_so_CFLAGS = -fpic $(AM_FLAG_M3264_PRI) -g -O
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared
else
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
-Wl,-G -Wl,-bnogc
else
Modified: trunk/none/Makefile.am
===================================================================
--- trunk/none/Makefile.am 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/none/Makefile.am 2009-01-22 21:56:32 UTC (rev 9031)
@@ -1,22 +1,22 @@
include $(top_srcdir)/Makefile.tool.am
noinst_PROGRAMS =
-if VGP_X86_LINUX
+if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
noinst_PROGRAMS += none-x86-linux
endif
-if VGP_AMD64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
noinst_PROGRAMS += none-amd64-linux
endif
-if VGP_PPC32_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
noinst_PROGRAMS += none-ppc32-linux
endif
-if VGP_PPC64_LINUX
+if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
noinst_PROGRAMS += none-ppc64-linux
endif
-if VGP_PPC32_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
noinst_PROGRAMS += none-ppc32-aix5
endif
-if VGP_PPC64_AIX5
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
noinst_PROGRAMS += none-ppc64-aix5
endif
Modified: trunk/none/tests/Makefile.am
===================================================================
--- trunk/none/tests/Makefile.am 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/none/tests/Makefile.am 2009-01-22 21:56:32 UTC (rev 9031)
@@ -3,16 +3,16 @@
include $(top_srcdir)/Makefile.flags.am
SUBDIRS = .
-if VGA_X86
+if VGCONF_ARCHS_INCLUDE_X86
SUBDIRS += x86
endif
-if VGA_AMD64
+if VGCONF_ARCHS_INCLUDE_AMD64
SUBDIRS += amd64
endif
-if VGA_PPC32
+if VGCONF_ARCHS_INCLUDE_PPC32
SUBDIRS += ppc32
endif
-if VGA_PPC64
+if VGCONF_ARCHS_INCLUDE_PPC64
SUBDIRS += ppc64
endif
@@ -180,7 +180,7 @@
pth_once_LDADD = -lpthread
pth_rwlock_LDADD = -lpthread
pth_stackalign_LDADD = -lpthread
-if VGO_AIX5
+if VGCONF_OS_IS_AIX5
res_search_LDADD = -lpthread
else
res_search_LDADD = -lresolv -lpthread
@@ -192,7 +192,7 @@
threadederrno_LDADD = -lpthread
tls_SOURCES = tls.c tls2.c
tls_DEPENDENCIES = tls.so
-if VGO_AIX5
+if VGCONF_OS_IS_AIX5
tls_LDFLAGS =
else
tls_LDFLAGS = -Wl,-rpath,$(top_builddir)/none/tests
@@ -200,7 +200,7 @@
tls_LDADD = tls.so -lpthread
tls_so_SOURCES = tls_so.c
tls_so_DEPENDENCIES = tls2.so
-if VGO_AIX5
+if VGCONF_OS_IS_AIX5
tls_so_LDFLAGS = -shared -fPIC
tls_so_LDADD = `pwd`/tls2.so
else
Modified: trunk/none/tests/x86/Makefile.am
===================================================================
--- trunk/none/tests/x86/Makefile.am 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/none/tests/x86/Makefile.am 2009-01-22 21:56:32 UTC (rev 9031)
@@ -100,7 +100,6 @@
insn_sse2_LDADD = -lm
insn_sse3_SOURCES = insn_sse3.def
insn_sse3_LDADD = -lm
-yield_CFLAGS = $(AM_CFLAGS) -D__$(VG_ARCH_PRI)__
yield_LDADD = -lpthread
.def.c: $(srcdir)/gen_insn_test.pl
Modified: trunk/none/tests/x86/yield.c
===================================================================
--- trunk/none/tests/x86/yield.c 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/none/tests/x86/yield.c 2009-01-22 21:56:32 UTC (rev 9031)
@@ -42,11 +42,9 @@
while(alive) {
rep_nop++;
-#ifdef __x86__
// This gives a hint to a P4, telling it to pause
// (ie. we're in a spin-wait loop)
asm volatile ("rep; nop" : : : "memory");
-#endif
}
return 0;
@@ -54,9 +52,6 @@
int main()
{
-#if defined(__powerpc__)
- printf("PASS\n");
-#else
pthread_t a, b;
pthread_create(&a, NULL, spinner, NULL);
@@ -87,7 +82,6 @@
else
printf("FAIL spin=%d rep_nop=%d rep_nop:spin ratio: %g\n",
spin, rep_nop, (float)rep_nop / spin);
-#endif
return 0;
}
Modified: trunk/tests/Makefile.am
===================================================================
--- trunk/tests/Makefile.am 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/tests/Makefile.am 2009-01-22 21:56:32 UTC (rev 9031)
@@ -23,9 +23,7 @@
AM_CXXFLAGS = $(AM_CFLAGS)
# generic C ones
-cputest_SOURCES = cputest.c
-cputest_CFLAGS = $(AM_CFLAGS) -D__$(VG_ARCH_MAX)__
-cputest_DEPENDENCIES =
-cputest_LDADD =
-toobig_allocs_SOURCES = toobig-allocs.c
-true_SOURCES = true.c
+cputest_CFLAGS = $(AM_CFLAGS) \
+ -DVGA_$(VGCONF_ARCH_PRI)=1 \
+ -DVGO_$(VGCONF_OS)=1 \
+ -DVGP_$(VGCONF_ARCH_PRI)_$(VGCONF_OS)=1
Modified: trunk/tests/cputest.c
===================================================================
--- trunk/tests/cputest.c 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/tests/cputest.c 2009-01-22 21:56:32 UTC (rev 9031)
@@ -3,12 +3,18 @@
#include <string.h>
#include <assert.h>
+// This file determines which architectures that this Valgrind installation
+// supports, which depends on the machine's architecture. It also depends
+// on the configuration options; for example, if Valgrind is installed on
+// an AMD64 machine but has been configured with --enable-only32bit then
+// this program will not match "amd64".
+//
// We return:
// - 0 if the machine matches the asked-for cpu
// - 1 if it didn't match, but did match the name of another arch
// - 2 otherwise
-// When updating this file for a new architecture, add the name to
+// Nb: When updating this file for a new architecture, add the name to
// 'all_archs' as well as adding go().
#define False 0
@@ -23,16 +29,22 @@
NULL
};
-#if !defined(_AIX) && defined(__powerpc__) && !defined(__powerpc64__)
+//-----------------------------------------------------------------------------
+// ppc32-linux
+//---------------------------------------------------------------------------
+#if defined(VGP_ppc32_linux)
static Bool go(char* cpu)
{
if ( strcmp( cpu, "ppc32" ) == 0 )
return True;
return False;
}
-#endif // __powerpc__ (32)
+#endif // VGP_ppc32_linux
-#if !defined(_AIX) && defined(__powerpc__) && defined(__powerpc64__)
+//---------------------------------------------------------------------------
+// ppc64-linux
+//---------------------------------------------------------------------------
+#if defined(VGP_ppc64_linux)
static Bool go(char* cpu)
{
if ( strcmp( cpu, "ppc64" ) == 0 )
@@ -41,9 +53,12 @@
return True;
return False;
}
-#endif // __powerpc__ (64)
+#endif // VGP_ppc64_linux
-#if defined(_AIX)
+//---------------------------------------------------------------------------
+// ppc{32,64}-aix
+//---------------------------------------------------------------------------
+#if defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5)
static Bool go(char* cpu)
{
if (sizeof(void*) == 8) {
@@ -58,9 +73,12 @@
}
return False;
}
-#endif // _AIX
+#endif // VGP_ppc32_aix5 || VGP_ppc64_aix5
-#if !defined(_AIX) && (defined(__i386__) || defined(__x86_64__))
+//---------------------------------------------------------------------------
+// {x86,amd64}-linux (part 1 of 2)
+//---------------------------------------------------------------------------
+#if defined(VGP_x86_linux) || defined(VGP_amd64_linux)
static void cpuid ( unsigned int n,
unsigned int* a, unsigned int* b,
unsigned int* c, unsigned int* d )
@@ -71,7 +89,12 @@
: "0" (n) /* input */
);
}
+#endif // VGP_x86_linux || VGP_amd64_linux
+//---------------------------------------------------------------------------
+// {x86,amd64}-{linux} (part 2 of 2)
+//---------------------------------------------------------------------------
+#if defined(VGP_x86_linux) || defined(VGP_amd64_linux)
static Bool go(char* cpu)
{
unsigned int level = 0, cmask = 0, dmask = 0, a, b, c, d;
@@ -102,7 +125,7 @@
} else if ( strcmp( cpu, "x86-ssse3" ) == 0 ) {
level = 1;
cmask = 1 << 9;
-#if defined(__x86_64__)
+#if defined(VGA_amd64)
} else if ( strcmp( cpu, "amd64" ) == 0 ) {
return True;
} else if ( strcmp( cpu, "amd64-sse3" ) == 0 ) {
@@ -129,9 +152,12 @@
}
return False;
}
-#endif // !_AIX && (__i386__ || __x86_64__)
+#endif // VGP_x86_linux || VGP_amd64_linux
+//---------------------------------------------------------------------------
+// main
+//---------------------------------------------------------------------------
int main(int argc, char **argv)
{
int i;
Modified: trunk/valgrind.pc.in
===================================================================
--- trunk/valgrind.pc.in 2009-01-22 21:37:24 UTC (rev 9030)
+++ trunk/valgrind.pc.in 2009-01-22 21:56:32 UTC (rev 9031)
@@ -2,15 +2,15 @@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@/valgrind
-arch=@VG_ARCH_PRI@
-os=@VG_OS@
-platform=@VG_PLATFORM_PRI@
+arch=@VGCONF_ARCH_PRI@
+os=@VGCONF_OS@
+platform=@VGCONF_ARCH_PRI@-@VGCONF_OS@
valt_load_address=@VALT_LOAD_ADDRESS@
Name: Valgrind
Description: A dynamic binary instrumentation framework
Version: @VERSION@
Requires:
-Libs: -L${libdir}/valgrind/@VG_PLATFORM_PRI@ -lcoregrind -lvex -lgcc
+Libs: -L${libdir}/valgrind/@VGCONF_ARCH_PRI@-@VGCONF_OS@ -lcoregrind -lvex -lgcc
Cflags: -I${inc...
[truncated message content] |
|
From: <sv...@va...> - 2009-01-22 22:32:44
|
Author: njn
Date: 2009-01-22 21:37:24 +0000 (Thu, 22 Jan 2009)
New Revision: 9030
Log:
Merge r9017:9029 (mostly improvements to DWARF reading and suppressions)
from the trunk.
Modified:
branches/DARWIN/coregrind/m_debuginfo/d3basics.c
branches/DARWIN/coregrind/m_debuginfo/debuginfo.c
branches/DARWIN/coregrind/m_debuginfo/priv_d3basics.h
branches/DARWIN/coregrind/m_debuginfo/priv_storage.h
branches/DARWIN/coregrind/m_debuginfo/readdwarf.c
branches/DARWIN/coregrind/m_debuginfo/readdwarf3.c
branches/DARWIN/coregrind/m_debuginfo/readelf.c
branches/DARWIN/coregrind/m_debuginfo/storage.c
branches/DARWIN/coregrind/m_debuginfo/tytypes.c
branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c
branches/DARWIN/coregrind/m_syswrap/syswrap-linux.c
branches/DARWIN/exp-ptrcheck.supp
branches/DARWIN/glibc-2.34567-NPTL-helgrind.supp
branches/DARWIN/helgrind/libhb_core.c
branches/DARWIN/memcheck/tests/linux/Makefile.am
Modified: branches/DARWIN/coregrind/m_debuginfo/d3basics.c
===================================================================
--- branches/DARWIN/coregrind/m_debuginfo/d3basics.c 2009-01-22 21:18:15 UTC (rev 9029)
+++ branches/DARWIN/coregrind/m_debuginfo/d3basics.c 2009-01-22 21:37:24 UTC (rev 9030)
@@ -35,6 +35,7 @@
*/
#include "pub_core_basics.h"
+#include "pub_core_debuginfo.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcprint.h"
#include "pub_core_options.h"
@@ -45,6 +46,7 @@
#include "priv_misc.h"
#include "priv_d3basics.h" /* self */
+#include "priv_storage.h"
HChar* ML_(pp_DW_children) ( DW_children hashch )
{
@@ -372,7 +374,6 @@
return (Long)val;
}
-
/* FIXME: duplicates logic in readdwarf.c: copy_convert_CfiExpr_tree
and {FP,SP}_REG decls */
static Bool get_Dwarf_Reg( /*OUT*/Addr* a, Word regno, RegSummary* regs )
@@ -402,12 +403,52 @@
return False;
}
+/* Convert a stated address to an actual address */
+static Bool bias_address( Addr* a, const DebugInfo* di )
+{
+ if (di->text_present
+ && di->text_size > 0
+ && *a >= di->text_svma && *a < di->text_svma + di->text_size) {
+ *a += di->text_bias;
+ }
+ else if (di->data_present
+ && di->data_size > 0
+ && *a >= di->data_svma && *a < di->data_svma + di->data_size) {
+ *a += di->data_bias;
+ }
+ else if (di->sdata_present
+ && di->sdata_size > 0
+ && *a >= di->sdata_svma && *a < di->sdata_svma + di->sdata_size) {
+ *a += di->sdata_bias;
+ }
+ else if (di->rodata_present
+ && di->rodata_size > 0
+ && *a >= di->rodata_svma && *a < di->rodata_svma + di->rodata_size) {
+ *a += di->rodata_bias;
+ }
+ else if (di->bss_present
+ && di->bss_size > 0
+ && *a >= di->bss_svma && *a < di->bss_svma + di->bss_size) {
+ *a += di->bss_bias;
+ }
+ else if (di->sbss_present
+ && di->sbss_size > 0
+ && *a >= di->sbss_svma && *a < di->sbss_svma + di->sbss_size) {
+ *a += di->sbss_bias;
+ }
+ else {
+ return False;
+ }
+ return True;
+}
+
+
/* Evaluate a standard DWARF3 expression. See detailed description in
priv_d3basics.h. */
GXResult ML_(evaluate_Dwarf3_Expr) ( UChar* expr, UWord exprszB,
GExpr* fbGX, RegSummary* regs,
- Addr data_bias,
+ const DebugInfo* di,
Bool push_initial_zero )
{
# define N_EXPR_STACK 20
@@ -510,14 +551,21 @@
horrible prelinking-induced complications as described
in "Comment_Regarding_DWARF3_Text_Biasing" in
readdwarf3.c? Currently I don't know. */
- PUSH( *(Addr*)expr + data_bias );
- expr += sizeof(Addr);
+ a1 = *(Addr*)expr;
+ if (bias_address(&a1, di)) {
+ PUSH( a1 );
+ expr += sizeof(Addr);
+ }
+ else {
+ FAIL("evaluate_Dwarf3_Expr: DW_OP_addr with address "
+ "in unknown section");
+ }
break;
case DW_OP_fbreg:
if (!fbGX)
FAIL("evaluate_Dwarf3_Expr: DW_OP_fbreg with "
"no expr for fbreg present");
- fbval = ML_(evaluate_GX)(fbGX, NULL, regs, data_bias);
+ fbval = ML_(evaluate_GX)(fbGX, NULL, regs, di);
/* Convert fbval into something we can use. If we got a
Value, no problem. However, as per D3 spec sec 3.3.5
(Low Level Information) sec 2, we could also get a
@@ -623,7 +671,7 @@
/* Evaluate a so-called Guarded (DWARF3) expression. See detailed
description in priv_d3basics.h. */
GXResult ML_(evaluate_GX)( GExpr* gx, GExpr* fbGX,
- RegSummary* regs, Addr data_bias )
+ RegSummary* regs, const DebugInfo* di )
{
GXResult res;
Addr aMin, aMax;
@@ -657,7 +705,7 @@
/* Assert this is the first guard. */
vg_assert(nGuards == 1);
res = ML_(evaluate_Dwarf3_Expr)(
- p, (UWord)nbytes, fbGX, regs, data_bias,
+ p, (UWord)nbytes, fbGX, regs, di,
False/*push_initial_zero*/ );
/* Now check there are no more guards. */
p += (UWord)nbytes;
@@ -667,7 +715,7 @@
if (aMin <= regs->ip && regs->ip <= aMax) {
/* found a matching range. Evaluate the expression. */
return ML_(evaluate_Dwarf3_Expr)(
- p, (UWord)nbytes, fbGX, regs, data_bias,
+ p, (UWord)nbytes, fbGX, regs, di,
False/*push_initial_zero*/ );
}
}
@@ -691,7 +739,7 @@
* there's more than one subexpression, all of which successfully
evaluate to a constant, but they don't all produce the same constant.
*/
-GXResult ML_(evaluate_trivial_GX)( GExpr* gx, Addr data_bias )
+GXResult ML_(evaluate_trivial_GX)( GExpr* gx, const DebugInfo* di )
{
GXResult res;
Addr aMin, aMax;
@@ -732,8 +780,14 @@
/* Peer at this particular subexpression, to see if it's
obviously a constant. */
if (nbytes == 1 + sizeof(Addr) && *p == DW_OP_addr) {
- thisResult.b = True;
- thisResult.ul = (ULong)(*(Addr*)(p+1)) + (ULong)data_bias;
+ Addr a = *(Addr*)(p+1);
+ if (bias_address(&a, di)) {
+ thisResult.b = True;
+ thisResult.ul = (ULong)a;
+ }
+ else if (!badness) {
+ badness = "trivial GExpr denotes constant address in unknown section";
+ }
}
else if (nbytes == 2 + sizeof(Addr)
&& *p == DW_OP_addr
Modified: branches/DARWIN/coregrind/m_debuginfo/debuginfo.c
===================================================================
--- branches/DARWIN/coregrind/m_debuginfo/debuginfo.c 2009-01-22 21:18:15 UTC (rev 9029)
+++ branches/DARWIN/coregrind/m_debuginfo/debuginfo.c 2009-01-22 21:37:24 UTC (rev 9030)
@@ -1054,7 +1054,17 @@
(di->bss_present
&& di->bss_size > 0
&& di->bss_avma <= ptr
- && ptr < di->bss_avma + di->bss_size);
+ && ptr < di->bss_avma + di->bss_size)
+ ||
+ (di->sbss_present
+ && di->sbss_size > 0
+ && di->sbss_avma <= ptr
+ && ptr < di->sbss_avma + di->sbss_size)
+ ||
+ (di->rodata_present
+ && di->rodata_size > 0
+ && di->rodata_avma <= ptr
+ && ptr < di->rodata_avma + di->rodata_size);
}
if (!inRange) continue;
@@ -1082,6 +1092,7 @@
DebugInfo* di;
for (di = debugInfo_list; di != NULL; di = di->next) {
if (di->text_present
+ && di->text_size > 0
&& di->text_avma <= ptr
&& ptr < di->text_avma + di->text_size) {
lno = ML_(search_one_loctab) ( di, ptr );
@@ -1268,6 +1279,7 @@
expect this to produce a result. */
for (di = debugInfo_list; di != NULL; di = di->next) {
if (di->text_present
+ && di->text_size > 0
&& di->text_avma <= a
&& a < di->text_avma + di->text_size) {
VG_(strncpy_safely)(buf, di->filename, nbuf);
@@ -1306,6 +1318,7 @@
DebugInfo* di;
for (di = debugInfo_list; di != NULL; di = di->next) {
if (di->text_present
+ && di->text_size > 0
&& di->text_avma <= a
&& a < di->text_avma + di->text_size) {
return di;
@@ -1946,7 +1959,7 @@
DiVariable* var,
RegSummary* regs,
Addr data_addr,
- Addr data_bias )
+ const DebugInfo* di )
{
MaybeULong mul;
SizeT var_szB;
@@ -1983,7 +1996,7 @@
return False;
}
- res = ML_(evaluate_GX)( var->gexpr, var->fbGX, regs, data_bias );
+ res = ML_(evaluate_GX)( var->gexpr, var->fbGX, regs, di );
if (show) {
VG_(printf)("VVVV: -> ");
@@ -2261,7 +2274,7 @@
var->name,arange->aMin,arange->aMax,ip);
if (data_address_is_in_var( &offset, di->admin_tyents,
var, ®s,
- data_addr, di->data_bias )) {
+ data_addr, di )) {
PtrdiffT residual_offset = 0;
XArray* described = ML_(describe_type)( &residual_offset,
di->admin_tyents,
@@ -2360,7 +2373,7 @@
fail. */
if (data_address_is_in_var( &offset, di->admin_tyents, var,
NULL/* RegSummary* */,
- data_addr, di->data_bias )) {
+ data_addr, di )) {
PtrdiffT residual_offset = 0;
XArray* described = ML_(describe_type)( &residual_offset,
di->admin_tyents,
@@ -2485,7 +2498,7 @@
static
void analyse_deps ( /*MOD*/XArray* /* of FrameBlock */ blocks,
XArray* /* TyEnt */ tyents,
- Addr ip, Addr data_bias, DiVariable* var,
+ Addr ip, const DebugInfo* di, DiVariable* var,
Bool arrays_only )
{
GXResult res_sp_6k, res_sp_7k, res_fp_6k, res_fp_7k;
@@ -2530,22 +2543,22 @@
regs.fp = 0;
regs.ip = ip;
regs.sp = 6 * 1024;
- res_sp_6k = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, data_bias );
+ res_sp_6k = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, di );
regs.fp = 0;
regs.ip = ip;
regs.sp = 7 * 1024;
- res_sp_7k = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, data_bias );
+ res_sp_7k = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, di );
regs.fp = 6 * 1024;
regs.ip = ip;
regs.sp = 0;
- res_fp_6k = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, data_bias );
+ res_fp_6k = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, di );
regs.fp = 7 * 1024;
regs.ip = ip;
regs.sp = 0;
- res_fp_7k = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, data_bias );
+ res_fp_7k = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, di );
vg_assert(res_sp_6k.kind == res_sp_7k.kind);
vg_assert(res_sp_6k.kind == res_fp_6k.kind);
@@ -2567,7 +2580,7 @@
if (sp_delta == 1024 && fp_delta == 0) {
regs.sp = regs.fp = 0;
regs.ip = ip;
- res = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, data_bias );
+ res = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, di );
tl_assert(res.kind == GXR_Value);
if (debug)
VG_(printf)(" %5ld .. %5ld (sp) %s\n",
@@ -2586,7 +2599,7 @@
if (sp_delta == 0 && fp_delta == 1024) {
regs.sp = regs.fp = 0;
regs.ip = ip;
- res = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, data_bias );
+ res = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, di );
tl_assert(res.kind == GXR_Value);
if (debug)
VG_(printf)(" %5ld .. %5ld (FP) %s\n",
@@ -2716,7 +2729,7 @@
VG_(printf)("QQQQ: var:name=%s %#lx-%#lx %#lx\n",
var->name,arange->aMin,arange->aMax,ip);
analyse_deps( res, di->admin_tyents, ip,
- di->data_bias, var, arrays_only );
+ di, var, arrays_only );
}
}
@@ -2799,7 +2812,7 @@
it. */
if (0) { VG_(printf)("EVAL: "); ML_(pp_GX)(var->gexpr);
VG_(printf)("\n"); }
- res = ML_(evaluate_trivial_GX)( var->gexpr, di->data_bias );
+ res = ML_(evaluate_trivial_GX)( var->gexpr, di );
/* Not a constant address => not interesting */
if (res.kind != GXR_Value) {
@@ -2957,6 +2970,7 @@
case Vg_SectGOT: return "GOT";
case Vg_SectPLT: return "PLT";
case Vg_SectOPD: return "OPD";
+ case Vg_SectGOTPLT: return "GOTPLT";
default: vg_assert(0);
}
}
@@ -3007,6 +3021,12 @@
res = Vg_SectBSS;
break;
}
+ if (di->sbss_present
+ && di->sbss_size > 0
+ && a >= di->sbss_avma && a < di->sbss_avma + di->sbss_size) {
+ res = Vg_SectBSS;
+ break;
+ }
if (di->plt_present
&& di->plt_size > 0
&& a >= di->plt_avma && a < di->plt_avma + di->plt_size) {
Modified: branches/DARWIN/coregrind/m_debuginfo/priv_d3basics.h
===================================================================
--- branches/DARWIN/coregrind/m_debuginfo/priv_d3basics.h 2009-01-22 21:18:15 UTC (rev 9029)
+++ branches/DARWIN/coregrind/m_debuginfo/priv_d3basics.h 2009-01-22 21:37:24 UTC (rev 9030)
@@ -621,7 +621,7 @@
NULL but the frame base is still needed, then evaluation of gx as a
whole will fail. */
GXResult ML_(evaluate_GX)( GExpr* gx, GExpr* fbGX,
- RegSummary* regs, Addr data_bias );
+ RegSummary* regs, const DebugInfo* di );
/* This is a subsidiary of ML_(evaluate_GX), which just evaluates a
single standard DWARF3 expression. Conventions w.r.t regs and fbGX
@@ -632,7 +632,7 @@
recursive. */
GXResult ML_(evaluate_Dwarf3_Expr) ( UChar* expr, UWord exprszB,
GExpr* fbGX, RegSummary* regs,
- Addr data_bias,
+ const DebugInfo* di,
Bool push_initial_zero );
/* Evaluate a very simple Guarded (DWARF3) expression. The expression
@@ -642,7 +642,7 @@
location is denoted, a frame base expression is required, or the
expression is not manifestly a constant. The range of addresses
covered by the guard is also ignored. */
-GXResult ML_(evaluate_trivial_GX)( GExpr* gx, Addr data_bias );
+GXResult ML_(evaluate_trivial_GX)( GExpr* gx, const DebugInfo* di );
#endif /* ndef __PRIV_D3BASICS_H */
Modified: branches/DARWIN/coregrind/m_debuginfo/priv_storage.h
===================================================================
--- branches/DARWIN/coregrind/m_debuginfo/priv_storage.h 2009-01-22 21:18:15 UTC (rev 9029)
+++ branches/DARWIN/coregrind/m_debuginfo/priv_storage.h 2009-01-22 21:37:24 UTC (rev 9030)
@@ -366,12 +366,24 @@
Addr sdata_avma;
SizeT sdata_size;
PtrdiffT sdata_bias;
+ /* .rodata */
+ Bool rodata_present;
+ Addr rodata_svma;
+ Addr rodata_avma;
+ SizeT rodata_size;
+ PtrdiffT rodata_bias;
/* .bss */
Bool bss_present;
Addr bss_svma;
Addr bss_avma;
SizeT bss_size;
PtrdiffT bss_bias;
+ /* .sbss */
+ Bool sbss_present;
+ Addr sbss_svma;
+ Addr sbss_avma;
+ SizeT sbss_size;
+ PtrdiffT sbss_bias;
/* .plt */
Bool plt_present;
Addr plt_avma;
Modified: branches/DARWIN/coregrind/m_debuginfo/readdwarf.c
===================================================================
--- branches/DARWIN/coregrind/m_debuginfo/readdwarf.c 2009-01-22 21:18:15 UTC (rev 9029)
+++ branches/DARWIN/coregrind/m_debuginfo/readdwarf.c 2009-01-22 21:37:24 UTC (rev 9030)
@@ -34,6 +34,7 @@
*/
#include "pub_core_basics.h"
+#include "pub_core_debuginfo.h"
#include "pub_core_libcbase.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcprint.h"
Modified: branches/DARWIN/coregrind/m_debuginfo/readdwarf3.c
===================================================================
--- branches/DARWIN/coregrind/m_debuginfo/readdwarf3.c 2009-01-22 21:18:15 UTC (rev 9029)
+++ branches/DARWIN/coregrind/m_debuginfo/readdwarf3.c 2009-01-22 21:37:24 UTC (rev 9030)
@@ -133,6 +133,7 @@
groupies always show up at the top of performance profiles. */
#include "pub_core_basics.h"
+#include "pub_core_debuginfo.h"
#include "pub_core_libcbase.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcprint.h"
Modified: branches/DARWIN/coregrind/m_debuginfo/readelf.c
===================================================================
--- branches/DARWIN/coregrind/m_debuginfo/readelf.c 2009-01-22 21:18:15 UTC (rev 9029)
+++ branches/DARWIN/coregrind/m_debuginfo/readelf.c 2009-01-22 21:37:24 UTC (rev 9030)
@@ -36,6 +36,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
+#include "pub_core_debuginfo.h"
#include "pub_core_libcbase.h"
#include "pub_core_libcprint.h"
#include "pub_core_libcassert.h"
@@ -219,7 +220,7 @@
)
{
Bool plausible, is_in_opd;
- Bool in_text, in_data, in_sdata, in_bss;
+ Bool in_text, in_data, in_sdata, in_rodata, in_bss, in_sbss;
/* Set defaults */
*sym_name_out = sym_name;
@@ -276,12 +277,26 @@
*is_text_out = False;
*sym_avma_out += di->sdata_bias;
} else
+ if (di->rodata_present
+ && di->rodata_size > 0
+ && sym_svma >= di->rodata_svma
+ && sym_svma < di->rodata_svma + di->rodata_size) {
+ *is_text_out = False;
+ *sym_avma_out += di->rodata_bias;
+ } else
if (di->bss_present
&& di->bss_size > 0
&& sym_svma >= di->bss_svma
&& sym_svma < di->bss_svma + di->bss_size) {
*is_text_out = False;
*sym_avma_out += di->bss_bias;
+ } else
+ if (di->sbss_present
+ && di->sbss_size > 0
+ && sym_svma >= di->sbss_svma
+ && sym_svma < di->sbss_svma + di->sbss_size) {
+ *is_text_out = False;
+ *sym_avma_out += di->sbss_bias;
} else {
/* Assume it's in .text. Is this a good idea? */
*is_text_out = True;
@@ -450,13 +465,25 @@
&& !(*sym_avma_out + *sym_size_out <= di->sdata_avma
|| *sym_avma_out >= di->sdata_avma + di->sdata_size);
+ in_rodata
+ = di->rodata_present
+ && di->rodata_size > 0
+ && !(*sym_avma_out + *sym_size_out <= di->rodata_avma
+ || *sym_avma_out >= di->rodata_avma + di->rodata_size);
+
in_bss
= di->bss_present
&& di->bss_size > 0
&& !(*sym_avma_out + *sym_size_out <= di->bss_avma
|| *sym_avma_out >= di->bss_avma + di->bss_size);
+ in_sbss
+ = di->sbss_present
+ && di->sbss_size > 0
+ && !(*sym_avma_out + *sym_size_out <= di->sbss_avma
+ || *sym_avma_out >= di->sbss_avma + di->sbss_size);
+
if (*is_text_out) {
/* This used to reject any symbol falling outside the text
segment ("if (!in_text) ..."). Now it is relaxed slightly,
@@ -479,9 +506,9 @@
return False;
}
} else {
- if (!(in_data || in_sdata || in_bss)) {
+ if (!(in_data || in_sdata || in_rodata || in_bss || in_sbss)) {
TRACE_SYMTAB(
- "ignore -- %#lx .. %#lx outside .data / .sdata / .bss svma ranges\n",
+ "ignore -- %#lx .. %#lx outside .data / .sdata / .rodata / .bss / .sbss svma ranges\n",
*sym_avma_out, *sym_avma_out + *sym_size_out);
return False;
}
@@ -955,16 +982,7 @@
return (void*)( ((UChar*)base) + idx * scale );
}
-static Addr round_Addr_upwards ( Addr a, UInt align )
-{
- if (align > 0) {
- vg_assert(-1 != VG_(log2)(align));
- a = VG_ROUNDUP(a, align);
- }
- return a;
-}
-
/* Find the file offset corresponding to SVMA by using the program
headers. This is taken from binutils-2.17/binutils/readelf.c
offset_from_vma(). */
@@ -1027,15 +1045,13 @@
UWord shdr_ent_szB = 0;
UChar* shdr_strtab_img = NULL;
- /* To do with figuring out where .sbss is relative to .bss. A
- kludge at the best of times. */
- SizeT sbss_size;
- Addr sbss_svma;
- UInt bss_align;
- UInt sbss_align;
- UInt data_align;
- SizeT bss_totsize;
- Addr gen_bss_lowest_svma;
+ /* SVMAs covered by rx and rw segments and corresponding bias. */
+ Addr rx_svma_base = 0;
+ Addr rx_svma_limit = 0;
+ PtrdiffT rx_bias = 0;
+ Addr rw_svma_base = 0;
+ Addr rw_svma_limit = 0;
+ PtrdiffT rw_bias = 0;
vg_assert(di);
vg_assert(di->have_rx_map == True);
@@ -1203,6 +1219,22 @@
goto out;
}
prev_svma = phdr->p_vaddr;
+ if (rx_svma_limit == 0
+ && phdr->p_offset >= di->rx_map_foff
+ && phdr->p_offset < di->rx_map_foff + di->rx_map_size
+ && phdr->p_offset + phdr->p_filesz <= di->rx_map_foff + di->rx_map_size) {
+ rx_svma_base = phdr->p_vaddr;
+ rx_svma_limit = phdr->p_vaddr + phdr->p_memsz;
+ rx_bias = di->rx_map_avma - di->rx_map_foff + phdr->p_offset - phdr->p_vaddr;
+ }
+ else if (rw_svma_limit == 0
+ && phdr->p_offset >= di->rw_map_foff
+ && phdr->p_offset < di->rw_map_foff + di->rw_map_size
+ && phdr->p_offset + phdr->p_filesz <= di->rw_map_foff + di->rw_map_size) {
+ rw_svma_base = phdr->p_vaddr;
+ rw_svma_limit = phdr->p_vaddr + phdr->p_memsz;
+ rw_bias = di->rw_map_avma - di->rw_map_foff + phdr->p_offset - phdr->p_vaddr;
+ }
}
/* Try to get the soname. If there isn't one, use "NONE".
@@ -1254,15 +1286,9 @@
di->soname = "NONE";
}
- /*SizeT*/ sbss_size = 0;
- /*Addr */ sbss_svma = 0;
- /*UInt */ bss_align = 0;
- /*UInt */ sbss_align = 0;
+ vg_assert(rx_svma_limit != 0);
+ vg_assert(rw_svma_limit != 0);
- /* UInt */ data_align = 0;
- /* SizeT */ bss_totsize = 0;
- /* Addr */ gen_bss_lowest_svma = ~((Addr)0);
-
/* Now read the section table. */
TRACE_SYMTAB("\n");
TRACE_SYMTAB("------ Examining the section headers "
@@ -1270,9 +1296,13 @@
TRACE_SYMTAB("rx: at %#lx are mapped foffsets %ld .. %ld\n",
di->rx_map_avma,
di->rx_map_foff, di->rx_map_foff + di->rx_map_size - 1 );
+ TRACE_SYMTAB("rx: contains svmas %#lx .. %#lx with bias %#lx\n",
+ rx_svma_base, rx_svma_limit - 1, rx_bias );
TRACE_SYMTAB("rw: at %#lx are mapped foffsets %ld .. %ld\n",
di->rw_map_avma,
di->rw_map_foff, di->rw_map_foff + di->rw_map_size - 1 );
+ TRACE_SYMTAB("rw: contains svmas %#lx .. %#lx with bias %#lx\n",
+ rw_svma_base, rw_svma_limit - 1, rw_bias );
for (i = 0; i < shdr_nent; i++) {
ElfXX_Shdr* shdr = INDEX_BIS( shdr_img, i, shdr_ent_szB );
@@ -1282,10 +1312,8 @@
UWord size = shdr->sh_size;
UInt alyn = shdr->sh_addralign;
Bool bits = !(shdr->sh_type == SHT_NOBITS);
- Bool inrx = foff >= di->rx_map_foff
- && foff < di->rx_map_foff + di->rx_map_size;
- Bool inrw = foff >= di->rw_map_foff
- && foff < di->rw_map_foff + di->rw_map_size;
+ Bool inrx = svma >= rx_svma_base && svma < rx_svma_limit;
+ Bool inrw = svma >= rw_svma_base && svma < rw_svma_limit;
TRACE_SYMTAB(" [sec %2ld] %s %s al%2u foff %6ld .. %6ld "
" svma %p name \"%s\"\n",
@@ -1313,17 +1341,17 @@
goto out; \
} while (0)
- /* Find avma-s for: .text .data .sdata .bss .plt .got .opd
+ /* Find avma-s for: .text .data .sdata .rodata .bss .sbss .plt .got .opd
and .eh_frame */
- /* Accept .text where mapped as rx (code) */
+ /* Accept .text where mapped as rx (code), even if zero-sized */
if (0 == VG_(strcmp)(name, ".text")) {
- if (inrx && size > 0 && !di->text_present) {
+ if (inrx && size >= 0 && !di->text_present) {
di->text_present = True;
di->text_svma = svma;
- di->text_avma = di->rx_map_avma + foff - di->rx_map_foff;
+ di->text_avma = svma + rx_bias;
di->text_size = size;
- di->text_bias = di->text_avma - svma;
+ di->text_bias = rx_bias;
TRACE_SYMTAB("acquiring .text svma = %#lx .. %#lx\n",
di->text_svma,
di->text_svma + di->text_size - 1);
@@ -1339,13 +1367,11 @@
/* Accept .data where mapped as rw (data), even if zero-sized */
if (0 == VG_(strcmp)(name, ".data")) {
if (inrw && size >= 0 && !di->data_present) {
- if (alyn > data_align)
- data_align = alyn;
di->data_present = True;
di->data_svma = svma;
- di->data_avma = di->rw_map_avma + foff - di->rw_map_foff;
+ di->data_avma = svma + rw_bias;
di->data_size = size;
- di->data_bias = di->data_avma - svma;
+ di->data_bias = rw_bias;
TRACE_SYMTAB("acquiring .data svma = %#lx .. %#lx\n",
di->data_svma,
di->data_svma + di->data_size - 1);
@@ -1361,13 +1387,11 @@
/* Accept .sdata where mapped as rw (data) */
if (0 == VG_(strcmp)(name, ".sdata")) {
if (inrw && size > 0 && !di->sdata_present) {
- if (alyn > data_align)
- data_align = alyn;
di->sdata_present = True;
di->sdata_svma = svma;
- di->sdata_avma = di->rw_map_avma + foff - di->rw_map_foff;
+ di->sdata_avma = svma + rw_bias;
di->sdata_size = size;
- di->sdata_bias = di->sdata_avma - svma;
+ di->sdata_bias = rw_bias;
TRACE_SYMTAB("acquiring .sdata svma = %#lx .. %#lx\n",
di->sdata_svma,
di->sdata_svma + di->sdata_size - 1);
@@ -1380,20 +1404,34 @@
}
}
+ /* Accept .rodata where mapped as rx (data), even if zero-sized */
+ if (0 == VG_(strcmp)(name, ".rodata")) {
+ if (inrx && size >= 0 && !di->rodata_present) {
+ di->rodata_present = True;
+ di->rodata_svma = svma;
+ di->rodata_avma = svma + rx_bias;
+ di->rodata_size = size;
+ di->rodata_bias = rx_bias;
+ TRACE_SYMTAB("acquiring .rodata svma = %#lx .. %#lx\n",
+ di->rodata_svma,
+ di->rodata_svma + di->rodata_size - 1);
+ TRACE_SYMTAB("acquiring .rodata avma = %#lx .. %#lx\n",
+ di->rodata_avma,
+ di->rodata_avma + di->rodata_size - 1);
+ TRACE_SYMTAB("acquiring .rodata bias = %#lx\n", di->rodata_bias);
+ } else {
+ BAD(".rodata");
+ }
+ }
+
/* Accept .bss where mapped as rw (data), even if zero-sized */
if (0 == VG_(strcmp)(name, ".bss")) {
if (inrw && size >= 0 && !di->bss_present) {
- bss_totsize += round_Addr_upwards(size, alyn);
- if (svma < gen_bss_lowest_svma)
- gen_bss_lowest_svma = svma;
- TRACE_SYMTAB("increasing total bss-like size to %ld\n",
- bss_totsize);
di->bss_present = True;
di->bss_svma = svma;
- di->bss_avma = di->rw_map_avma + foff - di->rw_map_foff;
+ di->bss_avma = svma + rw_bias;
di->bss_size = size;
- di->bss_bias = di->bss_avma - svma;
- bss_align = alyn;
+ di->bss_bias = rw_bias;
TRACE_SYMTAB("acquiring .bss svma = %#lx .. %#lx\n",
di->bss_svma,
di->bss_svma + di->bss_size - 1);
@@ -1413,7 +1451,6 @@
di->bss_avma = 0;
di->bss_size = 0;
di->bss_bias = 0;
- bss_align = 0;
if (!VG_(clo_xml)) {
VG_(message)(Vg_UserMsg, "Warning: the following file's .bss is "
"mapped r-x only - ignoring .bss syms");
@@ -1423,14 +1460,13 @@
}
} else
- if ((!inrw) && (!inrx) && size > 0 && !di->bss_present) {
+ if ((!inrw) && (!inrx) && size >= 0 && !di->bss_present) {
/* File contains a .bss, but it didn't get mapped. Ignore. */
di->bss_present = False;
di->bss_svma = 0;
di->bss_avma = 0;
di->bss_size = 0;
di->bss_bias = 0;
- bss_align = 0;
} else {
BAD(".bss");
}
@@ -1438,38 +1474,29 @@
/* Accept .sbss where mapped as rw (data) */
if (0 == VG_(strcmp)(name, ".sbss")) {
- if (inrw && size > 0 && sbss_size == 0) {
- bss_totsize += round_Addr_upwards(size, alyn);
- if (svma < gen_bss_lowest_svma)
- gen_bss_lowest_svma = svma;
- TRACE_SYMTAB("increasing total bss-like size to %ld\n",
- bss_totsize);
- sbss_size = size;
- sbss_svma = svma;
- sbss_align = alyn;
+ if (inrw && size > 0 && !di->sbss_present) {
+ di->sbss_present = True;
+ di->sbss_svma = svma;
+ di->sbss_avma = svma + rw_bias;
+ di->sbss_size = size;
+ di->sbss_bias = rw_bias;
+ TRACE_SYMTAB("acquiring .sbss svma = %#lx .. %#lx\n",
+ di->sbss_svma,
+ di->sbss_svma + di->sbss_size - 1);
+ TRACE_SYMTAB("acquiring .sbss avma = %#lx .. %#lx\n",
+ di->sbss_avma,
+ di->sbss_avma + di->sbss_size - 1);
+ TRACE_SYMTAB("acquiring .sbss bias = %#lx\n", di->sbss_bias);
} else {
BAD(".sbss");
}
}
- /* Accept .dynbss where mapped as rw (data) */
- if (0 == VG_(strcmp)(name, ".dynbss")) {
- if (inrw && size > 0 /* && sbss_size == 0*/) {
- bss_totsize += round_Addr_upwards(size, alyn);
- if (svma < gen_bss_lowest_svma)
- gen_bss_lowest_svma = svma;
- TRACE_SYMTAB("increasing total bss-like size to %ld\n",
- bss_totsize);
- } else {
- BAD(".dynbss");
- }
- }
-
/* Accept .got where mapped as rw (data) */
if (0 == VG_(strcmp)(name, ".got")) {
if (inrw && size > 0 && !di->got_present) {
di->got_present = True;
- di->got_avma = di->rw_map_avma + foff - di->rw_map_foff;
+ di->got_avma = svma + rw_bias;
di->got_size = size;
TRACE_SYMTAB("acquiring .got avma = %#lx\n", di->got_avma);
} else {
@@ -1481,7 +1508,7 @@
if (0 == VG_(strcmp)(name, ".got.plt")) {
if (inrw && size > 0 && !di->gotplt_present) {
di->gotplt_present = True;
- di->gotplt_avma = di->rw_map_avma + foff - di->rw_map_foff;
+ di->gotplt_avma = svma + rw_bias;
di->gotplt_size = size;
TRACE_SYMTAB("acquiring .got.plt avma = %#lx\n", di->gotplt_avma);
} else if (size != 0) {
@@ -1495,7 +1522,7 @@
if (0 == VG_(strcmp)(name, ".plt")) {
if (inrx && size > 0 && !di->plt_present) {
di->plt_present = True;
- di->plt_avma = di->rx_map_avma + foff - di->rx_map_foff;
+ di->plt_avma = svma + rx_bias;
di->plt_size = size;
TRACE_SYMTAB("acquiring .plt avma = %#lx\n", di->plt_avma);
} else {
@@ -1507,7 +1534,7 @@
if (0 == VG_(strcmp)(name, ".plt")) {
if (inrw && size > 0 && !di->plt_present) {
di->plt_present = True;
- di->plt_avma = di->rw_map_avma + foff - di->rw_map_foff;
+ di->plt_avma = svma + rw_bias;
di->plt_size = size;
TRACE_SYMTAB("acquiring .plt avma = %#lx\n", di->plt_avma);
} else {
@@ -1519,7 +1546,7 @@
if (0 == VG_(strcmp)(name, ".plt")) {
if (inrw && size > 0 && !di->plt_present) {
di->plt_present = True;
- di->plt_avma = di->rw_map_avma + foff - di->rw_map_foff;
+ di->plt_avma = svma + rw_bias;
di->plt_size = size;
TRACE_SYMTAB("acquiring .plt avma = %#lx\n", di->plt_avma);
} else
@@ -1542,7 +1569,7 @@
if (0 == VG_(strcmp)(name, ".opd")) {
if (inrw && size > 0 && !di->opd_present) {
di->opd_present = True;
- di->opd_avma = di->rw_map_avma + foff - di->rw_map_foff;
+ di->opd_avma = svma + rw_bias;
di->opd_size = size;
TRACE_SYMTAB("acquiring .opd avma = %#lx\n", di->opd_avma);
} else {
@@ -1556,13 +1583,13 @@
if (0 == VG_(strcmp)(name, ".eh_frame")) {
if (inrx && size > 0 && !di->ehframe_present) {
di->ehframe_present = True;
- di->ehframe_avma = di->rx_map_avma + foff - di->rx_map_foff;
+ di->ehframe_avma = svma + rx_bias;
di->ehframe_size = size;
TRACE_SYMTAB("acquiring .eh_frame avma = %#lx\n", di->ehframe_avma);
} else
if (inrw && size > 0 && !di->ehframe_present) {
di->ehframe_present = True;
- di->ehframe_avma = di->rw_map_avma + foff - di->rw_map_foff;
+ di->ehframe_avma = svma + rw_bias;
di->ehframe_size = size;
TRACE_SYMTAB("acquiring .eh_frame avma = %#lx\n", di->ehframe_avma);
} else {
@@ -1574,24 +1601,6 @@
}
- /* Kludge: ignore all previous computations for .bss avma range,
- and simply assume that .bss immediately follows .data/.sdata.*/
- if (1) {
- SizeT data_al = round_Addr_upwards(di->data_avma, data_align)
- - di->data_avma;
- TRACE_SYMTAB("data_al = %ld\n", data_al);
- bss_totsize += data_al;
- di->bss_svma = gen_bss_lowest_svma;
- di->bss_size = bss_totsize;
- di->bss_avma = di->data_avma + (di->bss_svma - di->data_svma);
- di->bss_bias = di->data_bias;
- TRACE_SYMTAB("kludged .bss svma = %#lx .. %#lx\n",
- di->bss_svma, di->bss_svma + di->bss_size - 1);
- TRACE_SYMTAB("kludged .bss avma = %#lx .. %#lx\n",
- di->bss_avma, di->bss_avma + di->bss_size - 1);
- TRACE_SYMTAB("kludged .bss bias = %#lx\n", di->bss_bias);
- }
-
if (0) VG_(printf)("YYYY text_: avma %#lx size %ld bias %#lx\n",
di->text_avma, di->text_size, di->text_bias);
Modified: branches/DARWIN/coregrind/m_debuginfo/storage.c
===================================================================
--- branches/DARWIN/coregrind/m_debuginfo/storage.c 2009-01-22 21:18:15 UTC (rev 9029)
+++ branches/DARWIN/coregrind/m_debuginfo/storage.c 2009-01-22 21:37:24 UTC (rev 9030)
@@ -39,6 +39,7 @@
#include "pub_core_basics.h"
#include "pub_core_options.h" /* VG_(clo_verbosity) */
+#include "pub_core_debuginfo.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcbase.h"
#include "pub_core_libcprint.h"
Modified: branches/DARWIN/coregrind/m_debuginfo/tytypes.c
===================================================================
--- branches/DARWIN/coregrind/m_debuginfo/tytypes.c 2009-01-22 21:18:15 UTC (rev 9029)
+++ branches/DARWIN/coregrind/m_debuginfo/tytypes.c 2009-01-22 21:37:24 UTC (rev 9030)
@@ -34,6 +34,7 @@
*/
#include "pub_core_basics.h"
+#include "pub_core_debuginfo.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcbase.h"
#include "pub_core_libcprint.h"
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c 2009-01-22 21:18:15 UTC (rev 9029)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c 2009-01-22 21:37:24 UTC (rev 9030)
@@ -2126,13 +2126,7 @@
// Combine two 32-bit values into a 64-bit value
// Always use with low-numbered arg first (e.g. LOHI64(ARG1,ARG2) )
// GrP fixme correct for ppc-linux?
-# if defined(VGA_ppc32)
-# define LOHI64(hi,lo) ( (lo) | ((ULong)(hi) << 32) )
-# elif defined(VGA_x86)
-#define LOHI64(lo,hi) ( (lo) | ((ULong)(hi) << 32) )
-# else
-# error unknown architecture
-# endif
+#define LOHI64(lo,hi) ( ((ULong)(lo)) | (((ULong)(hi)) << 32) )
#endif
//zz //PRE(sys_exit_group, Special)
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-linux.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-linux.c 2009-01-22 21:18:15 UTC (rev 9029)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-linux.c 2009-01-22 21:37:24 UTC (rev 9030)
@@ -373,7 +373,7 @@
#define POST(name) DEFN_POST_TEMPLATE(linux, name)
// Combine two 32-bit values into a 64-bit value
-#define LOHI64(lo,hi) ( (lo) | ((ULong)(hi) << 32) )
+#define LOHI64(lo,hi) ( ((ULong)(lo)) | (((ULong)(hi)) << 32) )
/* ---------------------------------------------------------------------
*mount wrappers
Modified: branches/DARWIN/exp-ptrcheck.supp
===================================================================
--- branches/DARWIN/exp-ptrcheck.supp 2009-01-22 21:18:15 UTC (rev 9029)
+++ branches/DARWIN/exp-ptrcheck.supp 2009-01-22 21:37:24 UTC (rev 9030)
@@ -25,8 +25,6 @@
exp-ptrcheck:SorG
obj:/*lib*/ld-2.*so*
obj:/*lib*/ld-2.*so*
- obj:/*lib*/ld-2.*so*
- obj:/*lib*/ld-2.*so*
}
# I'm pretty sure this is a false positive caused by the sg_ stuff
Modified: branches/DARWIN/glibc-2.34567-NPTL-helgrind.supp
===================================================================
--- branches/DARWIN/glibc-2.34567-NPTL-helgrind.supp 2009-01-22 21:18:15 UTC (rev 9029)
+++ branches/DARWIN/glibc-2.34567-NPTL-helgrind.supp 2009-01-22 21:37:24 UTC (rev 9030)
@@ -1,4 +1,7 @@
+# FIXME 22 Jan 09: helgrind-glibc2X-005 overlaps with a lot of
+# other stuff. They should be removed.
+
##----------------------------------------------------------------------##
# Suppressions for the Helgrind tool when using
# a glibc-2.{3,4,5,6,7,8,9} system
@@ -41,7 +44,6 @@
helgrind-glibc2X-005
Helgrind:Race
obj:/lib*/libpthread-2.*so*
- obj:/lib*/libpthread-2.*so*
}
# helgrind-glibc2X-006 was merged into helgrind-glibc2X-005
Modified: branches/DARWIN/helgrind/libhb_core.c
===================================================================
--- branches/DARWIN/helgrind/libhb_core.c 2009-01-22 21:18:15 UTC (rev 9029)
+++ branches/DARWIN/helgrind/libhb_core.c 2009-01-22 21:37:24 UTC (rev 9030)
@@ -2307,7 +2307,7 @@
tl_assert(nTab > 0);
VG_(message)(Vg_DebugMsg,
"libhb: VTS GC: #%u old size %lu live %lu (%2llu%%)",
- ctr++, nTab, nLive, (100ULL * nLive) / nTab);
+ ctr++, nTab, nLive, (100ULL * (ULong)nLive) / (ULong)nTab);
}
}
Modified: branches/DARWIN/memcheck/tests/linux/Makefile.am
===================================================================
--- branches/DARWIN/memcheck/tests/linux/Makefile.am 2009-01-22 21:18:15 UTC (rev 9029)
+++ branches/DARWIN/memcheck/tests/linux/Makefile.am 2009-01-22 21:37:24 UTC (rev 9030)
@@ -11,10 +11,9 @@
timerfd-syscall
AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS = $(WERROR) @FLAG_M32@ -Winline -Wall -Wshadow -g \
+AM_CFLAGS = $(WERROR) $(AM_FLAG_M3264_PRI) -Winline -Wall -Wshadow -g \
$(FLAG_MMMX) $(FLAG_MSSE)
AM_CXXFLAGS = $(AM_CFLAGS)
-AM_CCASFLAGS = @FLAG_M32@
timerfd_syscall_LDADD = -lrt
|
|
From: <sv...@va...> - 2009-01-22 22:22:45
|
Author: njn Date: 2009-01-22 22:14:54 +0000 (Thu, 22 Jan 2009) New Revision: 9032 Log: Make it compile on Darwin again. Modified: branches/DARWIN/coregrind/m_debuginfo/readmacho.c Modified: branches/DARWIN/coregrind/m_debuginfo/readmacho.c =================================================================== --- branches/DARWIN/coregrind/m_debuginfo/readmacho.c 2009-01-22 21:56:32 UTC (rev 9031) +++ branches/DARWIN/coregrind/m_debuginfo/readmacho.c 2009-01-22 22:14:54 UTC (rev 9032) @@ -44,6 +44,8 @@ #include "pub_core_tooliface.h" /* VG_(needs) */ #include "pub_core_xarray.h" #include "pub_core_clientstate.h" +#include "pub_core_debuginfo.h" + #include "priv_d3basics.h" #include "priv_misc.h" #include "priv_tytypes.h" |
|
From: <sv...@va...> - 2009-01-22 21:18:19
|
Author: sewardj
Date: 2009-01-22 21:18:15 +0000 (Thu, 22 Jan 2009)
New Revision: 9029
Log:
Minor tidyings:
search_all_symtabs: look for data symbols also in .sbss and .rodata
sections.
VG_(seginfo_sect_kind): identify addresses in .sbss sections.
VG_(pp_SectKind): handle missing case Vg_SectGOTPLT
search_all_loctabs, VG_(get_objname), VG_(find_seginfo): augment tests
"di->text_present" with "&& di->text_size > 0" (probably not
necessary, but is clearer, and more consistent in that most places
that look at DebugInfo.text_{size,avma} first perform both of those
tests).
Modified:
trunk/coregrind/m_debuginfo/debuginfo.c
Modified: trunk/coregrind/m_debuginfo/debuginfo.c
===================================================================
--- trunk/coregrind/m_debuginfo/debuginfo.c 2009-01-22 20:46:51 UTC (rev 9028)
+++ trunk/coregrind/m_debuginfo/debuginfo.c 2009-01-22 21:18:15 UTC (rev 9029)
@@ -1036,7 +1036,17 @@
(di->bss_present
&& di->bss_size > 0
&& di->bss_avma <= ptr
- && ptr < di->bss_avma + di->bss_size);
+ && ptr < di->bss_avma + di->bss_size)
+ ||
+ (di->sbss_present
+ && di->sbss_size > 0
+ && di->sbss_avma <= ptr
+ && ptr < di->sbss_avma + di->sbss_size)
+ ||
+ (di->rodata_present
+ && di->rodata_size > 0
+ && di->rodata_avma <= ptr
+ && ptr < di->rodata_avma + di->rodata_size);
}
if (!inRange) continue;
@@ -1064,6 +1074,7 @@
DebugInfo* di;
for (di = debugInfo_list; di != NULL; di = di->next) {
if (di->text_present
+ && di->text_size > 0
&& di->text_avma <= ptr
&& ptr < di->text_avma + di->text_size) {
lno = ML_(search_one_loctab) ( di, ptr );
@@ -1250,6 +1261,7 @@
expect this to produce a result. */
for (di = debugInfo_list; di != NULL; di = di->next) {
if (di->text_present
+ && di->text_size > 0
&& di->text_avma <= a
&& a < di->text_avma + di->text_size) {
VG_(strncpy_safely)(buf, di->filename, nbuf);
@@ -1288,6 +1300,7 @@
DebugInfo* di;
for (di = debugInfo_list; di != NULL; di = di->next) {
if (di->text_present
+ && di->text_size > 0
&& di->text_avma <= a
&& a < di->text_avma + di->text_size) {
return di;
@@ -2939,6 +2952,7 @@
case Vg_SectGOT: return "GOT";
case Vg_SectPLT: return "PLT";
case Vg_SectOPD: return "OPD";
+ case Vg_SectGOTPLT: return "GOTPLT";
default: vg_assert(0);
}
}
@@ -2989,6 +3003,12 @@
res = Vg_SectBSS;
break;
}
+ if (di->sbss_present
+ && di->sbss_size > 0
+ && a >= di->sbss_avma && a < di->sbss_avma + di->sbss_size) {
+ res = Vg_SectBSS;
+ break;
+ }
if (di->plt_present
&& di->plt_size > 0
&& a >= di->plt_avma && a < di->plt_avma + di->plt_size) {
|
|
From: <sv...@va...> - 2009-01-22 20:47:01
|
Author: sewardj
Date: 2009-01-22 20:46:51 +0000 (Thu, 22 Jan 2009)
New Revision: 9028
Log:
Suppress any error at all that occurs in libpthread, without any
regard for any calling frames. Needed to hide the fact that we can't
see stdio locking stuff and hence end up reporting a lot of errors in
multithreaded stdio working.
MERGE TO 3_4_BRANCH.
Modified:
trunk/glibc-2.34567-NPTL-helgrind.supp
Modified: trunk/glibc-2.34567-NPTL-helgrind.supp
===================================================================
--- trunk/glibc-2.34567-NPTL-helgrind.supp 2009-01-22 20:42:03 UTC (rev 9027)
+++ trunk/glibc-2.34567-NPTL-helgrind.supp 2009-01-22 20:46:51 UTC (rev 9028)
@@ -1,4 +1,7 @@
+# FIXME 22 Jan 09: helgrind-glibc2X-005 overlaps with a lot of
+# other stuff. They should be removed.
+
##----------------------------------------------------------------------##
# Suppressions for the Helgrind tool when using
# a glibc-2.{3,4,5,6,7,8,9} system
@@ -41,7 +44,6 @@
helgrind-glibc2X-005
Helgrind:Race
obj:/lib*/libpthread-2.*so*
- obj:/lib*/libpthread-2.*so*
}
# helgrind-glibc2X-006 was merged into helgrind-glibc2X-005
|
|
From: <sv...@va...> - 2009-01-22 20:42:14
|
Author: sewardj
Date: 2009-01-22 20:42:03 +0000 (Thu, 22 Jan 2009)
New Revision: 9027
Log:
More aggressive suppression of error reports from ld.so.
MERGE TO 3_4_BRANCH.
Modified:
trunk/exp-ptrcheck.supp
Modified: trunk/exp-ptrcheck.supp
===================================================================
--- trunk/exp-ptrcheck.supp 2009-01-22 16:53:25 UTC (rev 9026)
+++ trunk/exp-ptrcheck.supp 2009-01-22 20:42:03 UTC (rev 9027)
@@ -25,8 +25,6 @@
exp-ptrcheck:SorG
obj:/*lib*/ld-2.*so*
obj:/*lib*/ld-2.*so*
- obj:/*lib*/ld-2.*so*
- obj:/*lib*/ld-2.*so*
}
# I'm pretty sure this is a false positive caused by the sg_ stuff
|
|
From: <sv...@va...> - 2009-01-22 20:40:33
|
Author: sewardj
Date: 2009-01-22 20:40:22 +0000 (Thu, 22 Jan 2009)
New Revision: 1881
Log:
Handle both %gs and %fs prefixes on amd64 a bit more "properly".
Modified:
trunk/priv/guest-amd64/toIR.c
Modified: trunk/priv/guest-amd64/toIR.c
===================================================================
--- trunk/priv/guest-amd64/toIR.c 2009-01-03 17:35:15 UTC (rev 1880)
+++ trunk/priv/guest-amd64/toIR.c 2009-01-22 20:40:22 UTC (rev 1881)
@@ -8813,9 +8813,15 @@
if (n > 1)
goto decode_failure; /* multiple seg overrides == illegal */
- if (pfx & PFX_GS)
- goto decode_failure; /* legal, but unsupported right now */
+ /* We have a %fs prefix. Reject it if there's no evidence in 'vbi'
+ that we should accept it. */
+ if ((pfx & PFX_FS) && !vbi->guest_amd64_assume_fs_is_zero)
+ goto decode_failure;
+ /* Ditto for %gs prefixes. */
+ if ((pfx & PFX_GS) && !vbi->guest_amd64_assume_gs_is_0x60)
+ goto decode_failure;
+
/* Set up sz. */
sz = 4;
if (pfx & PFX_66) sz = 2;
|
|
From: Nicholas N. <n.n...@gm...> - 2009-01-22 20:35:57
|
On Fri, Jan 23, 2009 at 2:03 AM, Julian Seward <js...@ac...> wrote: > > A recent commit enabled these messages in mc's leak checker at > -v and above. But it causes dozens of lines of output for -v > runs of non-trivial apps, like Qt designer. Would it be OK to > restrict it to -v -v and above? Sure. N |
|
From: <sv...@va...> - 2009-01-22 16:53:32
|
Author: tom
Date: 2009-01-22 16:53:25 +0000 (Thu, 22 Jan 2009)
New Revision: 9026
Log:
Don't worry about an unmapped, zero sized, bss segment. Bug #181594.
Modified:
trunk/coregrind/m_debuginfo/readelf.c
Modified: trunk/coregrind/m_debuginfo/readelf.c
===================================================================
--- trunk/coregrind/m_debuginfo/readelf.c 2009-01-22 15:08:53 UTC (rev 9025)
+++ trunk/coregrind/m_debuginfo/readelf.c 2009-01-22 16:53:25 UTC (rev 9026)
@@ -1460,7 +1460,7 @@
}
} else
- if ((!inrw) && (!inrx) && size > 0 && !di->bss_present) {
+ if ((!inrw) && (!inrx) && size >= 0 && !di->bss_present) {
/* File contains a .bss, but it didn't get mapped. Ignore. */
di->bss_present = False;
di->bss_svma = 0;
|
|
From: <sv...@va...> - 2009-01-22 15:08:58
|
Author: tom
Date: 2009-01-22 15:08:53 +0000 (Thu, 22 Jan 2009)
New Revision: 9025
Log:
Accept zero size text segments. Bug #181594.
Modified:
trunk/coregrind/m_debuginfo/readelf.c
Modified: trunk/coregrind/m_debuginfo/readelf.c
===================================================================
--- trunk/coregrind/m_debuginfo/readelf.c 2009-01-22 14:14:13 UTC (rev 9024)
+++ trunk/coregrind/m_debuginfo/readelf.c 2009-01-22 15:08:53 UTC (rev 9025)
@@ -1344,9 +1344,9 @@
/* Find avma-s for: .text .data .sdata .rodata .bss .sbss .plt .got .opd
and .eh_frame */
- /* Accept .text where mapped as rx (code) */
+ /* Accept .text where mapped as rx (code), even if zero-sized */
if (0 == VG_(strcmp)(name, ".text")) {
- if (inrx && size > 0 && !di->text_present) {
+ if (inrx && size >= 0 && !di->text_present) {
di->text_present = True;
di->text_svma = svma;
di->text_avma = svma + rx_bias;
|
|
From: Julian S. <js...@ac...> - 2009-01-22 15:06:30
|
> > So .. do you have final version of these that you can commit on the > > trunk? I'm now inclined to push them to the stable branch if they > > continue to look good. I had not realised the breakage in 3.4 was so > > serious. > > They should all be committed now. Great; thanks for the fixes. At least on ppc32-linux it also looks ok, at least according to some early testing. J |
|
From: Julian S. <js...@ac...> - 2009-01-22 15:03:24
|
Hi, A recent commit enabled these messages in mc's leak checker at -v and above. But it causes dozens of lines of output for -v runs of non-trivial apps, like Qt designer. Would it be OK to restrict it to -v -v and above? J |
|
From: Tom H. <to...@co...> - 2009-01-22 14:29:43
|
Julian Seward wrote: > Applying both your patches (valgrind-elf-sections.patch and > valgrind-globals.patch) seems to fix it. I suspect only the first is > necessary for the unwind stuff, but the second is important for > ptrcheck. > > So .. do you have final version of these that you can commit on the > trunk? I'm now inclined to push them to the stable branch if they > continue to look good. I had not realised the breakage in 3.4 was so > serious. They should all be committed now. > You mentioned you had a third patch almost done, for recognition of rodata > sections. Can you maybe send that too? I've committed this as well - I extended it to do sbss as well as that also might contains variables. Tom -- Tom Hughes (to...@co...) http://www.compton.nu/ |
|
From: <sv...@va...> - 2009-01-22 14:14:16
|
Author: tom
Date: 2009-01-22 14:14:13 +0000 (Thu, 22 Jan 2009)
New Revision: 9024
Log:
Handle the rodata and sbss sections and cope with variables that
are in those sections.
Modified:
trunk/coregrind/m_debuginfo/d3basics.c
trunk/coregrind/m_debuginfo/priv_storage.h
trunk/coregrind/m_debuginfo/readelf.c
Modified: trunk/coregrind/m_debuginfo/d3basics.c
===================================================================
--- trunk/coregrind/m_debuginfo/d3basics.c 2009-01-22 14:02:26 UTC (rev 9023)
+++ trunk/coregrind/m_debuginfo/d3basics.c 2009-01-22 14:14:13 UTC (rev 9024)
@@ -419,11 +419,21 @@
&& *a >= di->sdata_svma && *a < di->sdata_svma + di->sdata_size) {
*a += di->sdata_bias;
}
+ else if (di->rodata_present
+ && di->rodata_size > 0
+ && *a >= di->rodata_svma && *a < di->rodata_svma + di->rodata_size) {
+ *a += di->rodata_bias;
+ }
else if (di->bss_present
&& di->bss_size > 0
&& *a >= di->bss_svma && *a < di->bss_svma + di->bss_size) {
*a += di->bss_bias;
}
+ else if (di->sbss_present
+ && di->sbss_size > 0
+ && *a >= di->sbss_svma && *a < di->sbss_svma + di->sbss_size) {
+ *a += di->sbss_bias;
+ }
else {
return False;
}
Modified: trunk/coregrind/m_debuginfo/priv_storage.h
===================================================================
--- trunk/coregrind/m_debuginfo/priv_storage.h 2009-01-22 14:02:26 UTC (rev 9023)
+++ trunk/coregrind/m_debuginfo/priv_storage.h 2009-01-22 14:14:13 UTC (rev 9024)
@@ -366,12 +366,24 @@
Addr sdata_avma;
SizeT sdata_size;
PtrdiffT sdata_bias;
+ /* .rodata */
+ Bool rodata_present;
+ Addr rodata_svma;
+ Addr rodata_avma;
+ SizeT rodata_size;
+ PtrdiffT rodata_bias;
/* .bss */
Bool bss_present;
Addr bss_svma;
Addr bss_avma;
SizeT bss_size;
PtrdiffT bss_bias;
+ /* .sbss */
+ Bool sbss_present;
+ Addr sbss_svma;
+ Addr sbss_avma;
+ SizeT sbss_size;
+ PtrdiffT sbss_bias;
/* .plt */
Bool plt_present;
Addr plt_avma;
Modified: trunk/coregrind/m_debuginfo/readelf.c
===================================================================
--- trunk/coregrind/m_debuginfo/readelf.c 2009-01-22 14:02:26 UTC (rev 9023)
+++ trunk/coregrind/m_debuginfo/readelf.c 2009-01-22 14:14:13 UTC (rev 9024)
@@ -220,7 +220,7 @@
)
{
Bool plausible, is_in_opd;
- Bool in_text, in_data, in_sdata, in_bss;
+ Bool in_text, in_data, in_sdata, in_rodata, in_bss, in_sbss;
/* Set defaults */
*sym_name_out = sym_name;
@@ -277,12 +277,26 @@
*is_text_out = False;
*sym_avma_out += di->sdata_bias;
} else
+ if (di->rodata_present
+ && di->rodata_size > 0
+ && sym_svma >= di->rodata_svma
+ && sym_svma < di->rodata_svma + di->rodata_size) {
+ *is_text_out = False;
+ *sym_avma_out += di->rodata_bias;
+ } else
if (di->bss_present
&& di->bss_size > 0
&& sym_svma >= di->bss_svma
&& sym_svma < di->bss_svma + di->bss_size) {
*is_text_out = False;
*sym_avma_out += di->bss_bias;
+ } else
+ if (di->sbss_present
+ && di->sbss_size > 0
+ && sym_svma >= di->sbss_svma
+ && sym_svma < di->sbss_svma + di->sbss_size) {
+ *is_text_out = False;
+ *sym_avma_out += di->sbss_bias;
} else {
/* Assume it's in .text. Is this a good idea? */
*is_text_out = True;
@@ -451,13 +465,25 @@
&& !(*sym_avma_out + *sym_size_out <= di->sdata_avma
|| *sym_avma_out >= di->sdata_avma + di->sdata_size);
+ in_rodata
+ = di->rodata_present
+ && di->rodata_size > 0
+ && !(*sym_avma_out + *sym_size_out <= di->rodata_avma
+ || *sym_avma_out >= di->rodata_avma + di->rodata_size);
+
in_bss
= di->bss_present
&& di->bss_size > 0
&& !(*sym_avma_out + *sym_size_out <= di->bss_avma
|| *sym_avma_out >= di->bss_avma + di->bss_size);
+ in_sbss
+ = di->sbss_present
+ && di->sbss_size > 0
+ && !(*sym_avma_out + *sym_size_out <= di->sbss_avma
+ || *sym_avma_out >= di->sbss_avma + di->sbss_size);
+
if (*is_text_out) {
/* This used to reject any symbol falling outside the text
segment ("if (!in_text) ..."). Now it is relaxed slightly,
@@ -480,9 +506,9 @@
return False;
}
} else {
- if (!(in_data || in_sdata || in_bss)) {
+ if (!(in_data || in_sdata || in_rodata || in_bss || in_sbss)) {
TRACE_SYMTAB(
- "ignore -- %#lx .. %#lx outside .data / .sdata / .bss svma ranges\n",
+ "ignore -- %#lx .. %#lx outside .data / .sdata / .rodata / .bss / .sbss svma ranges\n",
*sym_avma_out, *sym_avma_out + *sym_size_out);
return False;
}
@@ -1315,7 +1341,7 @@
goto out; \
} while (0)
- /* Find avma-s for: .text .data .sdata .bss .plt .got .opd
+ /* Find avma-s for: .text .data .sdata .rodata .bss .sbss .plt .got .opd
and .eh_frame */
/* Accept .text where mapped as rx (code) */
@@ -1378,6 +1404,26 @@
}
}
+ /* Accept .rodata where mapped as rx (data), even if zero-sized */
+ if (0 == VG_(strcmp)(name, ".rodata")) {
+ if (inrx && size >= 0 && !di->rodata_present) {
+ di->rodata_present = True;
+ di->rodata_svma = svma;
+ di->rodata_avma = svma + rx_bias;
+ di->rodata_size = size;
+ di->rodata_bias = rx_bias;
+ TRACE_SYMTAB("acquiring .rodata svma = %#lx .. %#lx\n",
+ di->rodata_svma,
+ di->rodata_svma + di->rodata_size - 1);
+ TRACE_SYMTAB("acquiring .rodata avma = %#lx .. %#lx\n",
+ di->rodata_avma,
+ di->rodata_avma + di->rodata_size - 1);
+ TRACE_SYMTAB("acquiring .rodata bias = %#lx\n", di->rodata_bias);
+ } else {
+ BAD(".rodata");
+ }
+ }
+
/* Accept .bss where mapped as rw (data), even if zero-sized */
if (0 == VG_(strcmp)(name, ".bss")) {
if (inrw && size >= 0 && !di->bss_present) {
@@ -1426,6 +1472,26 @@
}
}
+ /* Accept .sbss where mapped as rw (data) */
+ if (0 == VG_(strcmp)(name, ".sbss")) {
+ if (inrw && size > 0 && !di->sbss_present) {
+ di->sbss_present = True;
+ di->sbss_svma = svma;
+ di->sbss_avma = svma + rw_bias;
+ di->sbss_size = size;
+ di->sbss_bias = rw_bias;
+ TRACE_SYMTAB("acquiring .sbss svma = %#lx .. %#lx\n",
+ di->sbss_svma,
+ di->sbss_svma + di->sbss_size - 1);
+ TRACE_SYMTAB("acquiring .sbss avma = %#lx .. %#lx\n",
+ di->sbss_avma,
+ di->sbss_avma + di->sbss_size - 1);
+ TRACE_SYMTAB("acquiring .sbss bias = %#lx\n", di->sbss_bias);
+ } else {
+ BAD(".sbss");
+ }
+ }
+
/* Accept .got where mapped as rw (data) */
if (0 == VG_(strcmp)(name, ".got")) {
if (inrw && size > 0 && !di->got_present) {
|
|
From: <sv...@va...> - 2009-01-22 14:02:33
|
Author: tom
Date: 2009-01-22 14:02:26 +0000 (Thu, 22 Jan 2009)
New Revision: 9023
Log:
Bias values should be PtrdiffT now.
Modified:
trunk/coregrind/m_debuginfo/readelf.c
Modified: trunk/coregrind/m_debuginfo/readelf.c
===================================================================
--- trunk/coregrind/m_debuginfo/readelf.c 2009-01-22 13:44:03 UTC (rev 9022)
+++ trunk/coregrind/m_debuginfo/readelf.c 2009-01-22 14:02:26 UTC (rev 9023)
@@ -1020,12 +1020,12 @@
UChar* shdr_strtab_img = NULL;
/* SVMAs covered by rx and rw segments and corresponding bias. */
- Addr rx_svma_base = 0;
- Addr rx_svma_limit = 0;
- OffT rx_bias = 0;
- Addr rw_svma_base = 0;
- Addr rw_svma_limit = 0;
- OffT rw_bias = 0;
+ Addr rx_svma_base = 0;
+ Addr rx_svma_limit = 0;
+ PtrdiffT rx_bias = 0;
+ Addr rw_svma_base = 0;
+ Addr rw_svma_limit = 0;
+ PtrdiffT rw_bias = 0;
vg_assert(di);
vg_assert(di->have_rx_map == True);
|
|
From: <sv...@va...> - 2009-01-22 13:44:07
|
Author: tom
Date: 2009-01-22 13:44:03 +0000 (Thu, 22 Jan 2009)
New Revision: 9022
Log:
Removed unused round_Addr_upwards function.
Modified:
trunk/coregrind/m_debuginfo/readelf.c
Modified: trunk/coregrind/m_debuginfo/readelf.c
===================================================================
--- trunk/coregrind/m_debuginfo/readelf.c 2009-01-22 13:40:12 UTC (rev 9021)
+++ trunk/coregrind/m_debuginfo/readelf.c 2009-01-22 13:44:03 UTC (rev 9022)
@@ -956,16 +956,7 @@
return (void*)( ((UChar*)base) + idx * scale );
}
-static Addr round_Addr_upwards ( Addr a, UInt align )
-{
- if (align > 0) {
- vg_assert(-1 != VG_(log2)(align));
- a = VG_ROUNDUP(a, align);
- }
- return a;
-}
-
/* Find the file offset corresponding to SVMA by using the program
headers. This is taken from binutils-2.17/binutils/readelf.c
offset_from_vma(). */
|
|
From: <sv...@va...> - 2009-01-22 13:40:17
|
Author: tom
Date: 2009-01-22 13:40:12 +0000 (Thu, 22 Jan 2009)
New Revision: 9021
Log:
Don't assume that all global variables are in the data section - we
now cope with variables in the text, data, sdata and bss sections.
Modified:
trunk/coregrind/m_debuginfo/d3basics.c
trunk/coregrind/m_debuginfo/debuginfo.c
trunk/coregrind/m_debuginfo/priv_d3basics.h
trunk/coregrind/m_debuginfo/readdwarf.c
trunk/coregrind/m_debuginfo/readdwarf3.c
trunk/coregrind/m_debuginfo/storage.c
trunk/coregrind/m_debuginfo/tytypes.c
Modified: trunk/coregrind/m_debuginfo/d3basics.c
===================================================================
--- trunk/coregrind/m_debuginfo/d3basics.c 2009-01-22 13:24:06 UTC (rev 9020)
+++ trunk/coregrind/m_debuginfo/d3basics.c 2009-01-22 13:40:12 UTC (rev 9021)
@@ -35,6 +35,7 @@
*/
#include "pub_core_basics.h"
+#include "pub_core_debuginfo.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcprint.h"
#include "pub_core_options.h"
@@ -45,6 +46,7 @@
#include "priv_misc.h"
#include "priv_d3basics.h" /* self */
+#include "priv_storage.h"
HChar* ML_(pp_DW_children) ( DW_children hashch )
{
@@ -372,7 +374,6 @@
return (Long)val;
}
-
/* FIXME: duplicates logic in readdwarf.c: copy_convert_CfiExpr_tree
and {FP,SP}_REG decls */
static Bool get_Dwarf_Reg( /*OUT*/Addr* a, Word regno, RegSummary* regs )
@@ -400,12 +401,42 @@
return False;
}
+/* Convert a stated address to an actual address */
+static Bool bias_address( Addr* a, const DebugInfo* di )
+{
+ if (di->text_present
+ && di->text_size > 0
+ && *a >= di->text_svma && *a < di->text_svma + di->text_size) {
+ *a += di->text_bias;
+ }
+ else if (di->data_present
+ && di->data_size > 0
+ && *a >= di->data_svma && *a < di->data_svma + di->data_size) {
+ *a += di->data_bias;
+ }
+ else if (di->sdata_present
+ && di->sdata_size > 0
+ && *a >= di->sdata_svma && *a < di->sdata_svma + di->sdata_size) {
+ *a += di->sdata_bias;
+ }
+ else if (di->bss_present
+ && di->bss_size > 0
+ && *a >= di->bss_svma && *a < di->bss_svma + di->bss_size) {
+ *a += di->bss_bias;
+ }
+ else {
+ return False;
+ }
+ return True;
+}
+
+
/* Evaluate a standard DWARF3 expression. See detailed description in
priv_d3basics.h. */
GXResult ML_(evaluate_Dwarf3_Expr) ( UChar* expr, UWord exprszB,
GExpr* fbGX, RegSummary* regs,
- Addr data_bias,
+ const DebugInfo* di,
Bool push_initial_zero )
{
# define N_EXPR_STACK 20
@@ -508,14 +539,21 @@
horrible prelinking-induced complications as described
in "Comment_Regarding_DWARF3_Text_Biasing" in
readdwarf3.c? Currently I don't know. */
- PUSH( *(Addr*)expr + data_bias );
- expr += sizeof(Addr);
+ a1 = *(Addr*)expr;
+ if (bias_address(&a1, di)) {
+ PUSH( a1 );
+ expr += sizeof(Addr);
+ }
+ else {
+ FAIL("evaluate_Dwarf3_Expr: DW_OP_addr with address "
+ "in unknown section");
+ }
break;
case DW_OP_fbreg:
if (!fbGX)
FAIL("evaluate_Dwarf3_Expr: DW_OP_fbreg with "
"no expr for fbreg present");
- fbval = ML_(evaluate_GX)(fbGX, NULL, regs, data_bias);
+ fbval = ML_(evaluate_GX)(fbGX, NULL, regs, di);
/* Convert fbval into something we can use. If we got a
Value, no problem. However, as per D3 spec sec 3.3.5
(Low Level Information) sec 2, we could also get a
@@ -621,7 +659,7 @@
/* Evaluate a so-called Guarded (DWARF3) expression. See detailed
description in priv_d3basics.h. */
GXResult ML_(evaluate_GX)( GExpr* gx, GExpr* fbGX,
- RegSummary* regs, Addr data_bias )
+ RegSummary* regs, const DebugInfo* di )
{
GXResult res;
Addr aMin, aMax;
@@ -655,7 +693,7 @@
/* Assert this is the first guard. */
vg_assert(nGuards == 1);
res = ML_(evaluate_Dwarf3_Expr)(
- p, (UWord)nbytes, fbGX, regs, data_bias,
+ p, (UWord)nbytes, fbGX, regs, di,
False/*push_initial_zero*/ );
/* Now check there are no more guards. */
p += (UWord)nbytes;
@@ -665,7 +703,7 @@
if (aMin <= regs->ip && regs->ip <= aMax) {
/* found a matching range. Evaluate the expression. */
return ML_(evaluate_Dwarf3_Expr)(
- p, (UWord)nbytes, fbGX, regs, data_bias,
+ p, (UWord)nbytes, fbGX, regs, di,
False/*push_initial_zero*/ );
}
}
@@ -689,7 +727,7 @@
* there's more than one subexpression, all of which successfully
evaluate to a constant, but they don't all produce the same constant.
*/
-GXResult ML_(evaluate_trivial_GX)( GExpr* gx, Addr data_bias )
+GXResult ML_(evaluate_trivial_GX)( GExpr* gx, const DebugInfo* di )
{
GXResult res;
Addr aMin, aMax;
@@ -730,8 +768,14 @@
/* Peer at this particular subexpression, to see if it's
obviously a constant. */
if (nbytes == 1 + sizeof(Addr) && *p == DW_OP_addr) {
- thisResult.b = True;
- thisResult.ul = (ULong)(*(Addr*)(p+1)) + (ULong)data_bias;
+ Addr a = *(Addr*)(p+1);
+ if (bias_address(&a, di)) {
+ thisResult.b = True;
+ thisResult.ul = (ULong)a;
+ }
+ else if (!badness) {
+ badness = "trivial GExpr denotes constant address in unknown section";
+ }
}
else if (nbytes == 2 + sizeof(Addr)
&& *p == DW_OP_addr
Modified: trunk/coregrind/m_debuginfo/debuginfo.c
===================================================================
--- trunk/coregrind/m_debuginfo/debuginfo.c 2009-01-22 13:24:06 UTC (rev 9020)
+++ trunk/coregrind/m_debuginfo/debuginfo.c 2009-01-22 13:40:12 UTC (rev 9021)
@@ -1928,7 +1928,7 @@
DiVariable* var,
RegSummary* regs,
Addr data_addr,
- Addr data_bias )
+ const DebugInfo* di )
{
MaybeULong mul;
SizeT var_szB;
@@ -1965,7 +1965,7 @@
return False;
}
- res = ML_(evaluate_GX)( var->gexpr, var->fbGX, regs, data_bias );
+ res = ML_(evaluate_GX)( var->gexpr, var->fbGX, regs, di );
if (show) {
VG_(printf)("VVVV: -> ");
@@ -2243,7 +2243,7 @@
var->name,arange->aMin,arange->aMax,ip);
if (data_address_is_in_var( &offset, di->admin_tyents,
var, ®s,
- data_addr, di->data_bias )) {
+ data_addr, di )) {
PtrdiffT residual_offset = 0;
XArray* described = ML_(describe_type)( &residual_offset,
di->admin_tyents,
@@ -2342,7 +2342,7 @@
fail. */
if (data_address_is_in_var( &offset, di->admin_tyents, var,
NULL/* RegSummary* */,
- data_addr, di->data_bias )) {
+ data_addr, di )) {
PtrdiffT residual_offset = 0;
XArray* described = ML_(describe_type)( &residual_offset,
di->admin_tyents,
@@ -2467,7 +2467,7 @@
static
void analyse_deps ( /*MOD*/XArray* /* of FrameBlock */ blocks,
XArray* /* TyEnt */ tyents,
- Addr ip, Addr data_bias, DiVariable* var,
+ Addr ip, const DebugInfo* di, DiVariable* var,
Bool arrays_only )
{
GXResult res_sp_6k, res_sp_7k, res_fp_6k, res_fp_7k;
@@ -2512,22 +2512,22 @@
regs.fp = 0;
regs.ip = ip;
regs.sp = 6 * 1024;
- res_sp_6k = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, data_bias );
+ res_sp_6k = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, di );
regs.fp = 0;
regs.ip = ip;
regs.sp = 7 * 1024;
- res_sp_7k = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, data_bias );
+ res_sp_7k = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, di );
regs.fp = 6 * 1024;
regs.ip = ip;
regs.sp = 0;
- res_fp_6k = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, data_bias );
+ res_fp_6k = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, di );
regs.fp = 7 * 1024;
regs.ip = ip;
regs.sp = 0;
- res_fp_7k = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, data_bias );
+ res_fp_7k = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, di );
vg_assert(res_sp_6k.kind == res_sp_7k.kind);
vg_assert(res_sp_6k.kind == res_fp_6k.kind);
@@ -2549,7 +2549,7 @@
if (sp_delta == 1024 && fp_delta == 0) {
regs.sp = regs.fp = 0;
regs.ip = ip;
- res = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, data_bias );
+ res = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, di );
tl_assert(res.kind == GXR_Value);
if (debug)
VG_(printf)(" %5ld .. %5ld (sp) %s\n",
@@ -2568,7 +2568,7 @@
if (sp_delta == 0 && fp_delta == 1024) {
regs.sp = regs.fp = 0;
regs.ip = ip;
- res = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, data_bias );
+ res = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, di );
tl_assert(res.kind == GXR_Value);
if (debug)
VG_(printf)(" %5ld .. %5ld (FP) %s\n",
@@ -2698,7 +2698,7 @@
VG_(printf)("QQQQ: var:name=%s %#lx-%#lx %#lx\n",
var->name,arange->aMin,arange->aMax,ip);
analyse_deps( res, di->admin_tyents, ip,
- di->data_bias, var, arrays_only );
+ di, var, arrays_only );
}
}
@@ -2781,7 +2781,7 @@
it. */
if (0) { VG_(printf)("EVAL: "); ML_(pp_GX)(var->gexpr);
VG_(printf)("\n"); }
- res = ML_(evaluate_trivial_GX)( var->gexpr, di->data_bias );
+ res = ML_(evaluate_trivial_GX)( var->gexpr, di );
/* Not a constant address => not interesting */
if (res.kind != GXR_Value) {
Modified: trunk/coregrind/m_debuginfo/priv_d3basics.h
===================================================================
--- trunk/coregrind/m_debuginfo/priv_d3basics.h 2009-01-22 13:24:06 UTC (rev 9020)
+++ trunk/coregrind/m_debuginfo/priv_d3basics.h 2009-01-22 13:40:12 UTC (rev 9021)
@@ -621,7 +621,7 @@
NULL but the frame base is still needed, then evaluation of gx as a
whole will fail. */
GXResult ML_(evaluate_GX)( GExpr* gx, GExpr* fbGX,
- RegSummary* regs, Addr data_bias );
+ RegSummary* regs, const DebugInfo* di );
/* This is a subsidiary of ML_(evaluate_GX), which just evaluates a
single standard DWARF3 expression. Conventions w.r.t regs and fbGX
@@ -632,7 +632,7 @@
recursive. */
GXResult ML_(evaluate_Dwarf3_Expr) ( UChar* expr, UWord exprszB,
GExpr* fbGX, RegSummary* regs,
- Addr data_bias,
+ const DebugInfo* di,
Bool push_initial_zero );
/* Evaluate a very simple Guarded (DWARF3) expression. The expression
@@ -642,7 +642,7 @@
location is denoted, a frame base expression is required, or the
expression is not manifestly a constant. The range of addresses
covered by the guard is also ignored. */
-GXResult ML_(evaluate_trivial_GX)( GExpr* gx, Addr data_bias );
+GXResult ML_(evaluate_trivial_GX)( GExpr* gx, const DebugInfo* di );
#endif /* ndef __PRIV_D3BASICS_H */
Modified: trunk/coregrind/m_debuginfo/readdwarf.c
===================================================================
--- trunk/coregrind/m_debuginfo/readdwarf.c 2009-01-22 13:24:06 UTC (rev 9020)
+++ trunk/coregrind/m_debuginfo/readdwarf.c 2009-01-22 13:40:12 UTC (rev 9021)
@@ -34,6 +34,7 @@
*/
#include "pub_core_basics.h"
+#include "pub_core_debuginfo.h"
#include "pub_core_libcbase.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcprint.h"
Modified: trunk/coregrind/m_debuginfo/readdwarf3.c
===================================================================
--- trunk/coregrind/m_debuginfo/readdwarf3.c 2009-01-22 13:24:06 UTC (rev 9020)
+++ trunk/coregrind/m_debuginfo/readdwarf3.c 2009-01-22 13:40:12 UTC (rev 9021)
@@ -133,6 +133,7 @@
groupies always show up at the top of performance profiles. */
#include "pub_core_basics.h"
+#include "pub_core_debuginfo.h"
#include "pub_core_libcbase.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcprint.h"
Modified: trunk/coregrind/m_debuginfo/storage.c
===================================================================
--- trunk/coregrind/m_debuginfo/storage.c 2009-01-22 13:24:06 UTC (rev 9020)
+++ trunk/coregrind/m_debuginfo/storage.c 2009-01-22 13:40:12 UTC (rev 9021)
@@ -39,6 +39,7 @@
#include "pub_core_basics.h"
#include "pub_core_options.h" /* VG_(clo_verbosity) */
+#include "pub_core_debuginfo.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcbase.h"
#include "pub_core_libcprint.h"
Modified: trunk/coregrind/m_debuginfo/tytypes.c
===================================================================
--- trunk/coregrind/m_debuginfo/tytypes.c 2009-01-22 13:24:06 UTC (rev 9020)
+++ trunk/coregrind/m_debuginfo/tytypes.c 2009-01-22 13:40:12 UTC (rev 9021)
@@ -34,6 +34,7 @@
*/
#include "pub_core_basics.h"
+#include "pub_core_debuginfo.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcbase.h"
#include "pub_core_libcprint.h"
|
|
From: <sv...@va...> - 2009-01-22 13:24:14
|
Author: tom
Date: 2009-01-22 13:24:06 +0000 (Thu, 22 Jan 2009)
New Revision: 9020
Log:
Improve detection of where ELF sections have been mapped by taking
the ELF segment table into account when deciding on the mapping
between SVMA and AVMA for a section.
This also allows the BSS kludge to be dropped, as the BSS address is
now correctly determined.
Modified:
trunk/coregrind/m_debuginfo/readelf.c
Modified: trunk/coregrind/m_debuginfo/readelf.c
===================================================================
--- trunk/coregrind/m_debuginfo/readelf.c 2009-01-22 12:24:26 UTC (rev 9019)
+++ trunk/coregrind/m_debuginfo/readelf.c 2009-01-22 13:24:06 UTC (rev 9020)
@@ -36,6 +36,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
+#include "pub_core_debuginfo.h"
#include "pub_core_libcbase.h"
#include "pub_core_libcprint.h"
#include "pub_core_libcassert.h"
@@ -1027,15 +1028,13 @@
UWord shdr_ent_szB = 0;
UChar* shdr_strtab_img = NULL;
- /* To do with figuring out where .sbss is relative to .bss. A
- kludge at the best of times. */
- SizeT sbss_size;
- Addr sbss_svma;
- UInt bss_align;
- UInt sbss_align;
- UInt data_align;
- SizeT bss_totsize;
- Addr gen_bss_lowest_svma;
+ /* SVMAs covered by rx and rw segments and corresponding bias. */
+ Addr rx_svma_base = 0;
+ Addr rx_svma_limit = 0;
+ OffT rx_bias = 0;
+ Addr rw_svma_base = 0;
+ Addr rw_svma_limit = 0;
+ OffT rw_bias = 0;
vg_assert(di);
vg_assert(di->have_rx_map == True);
@@ -1203,6 +1202,22 @@
goto out;
}
prev_svma = phdr->p_vaddr;
+ if (rx_svma_limit == 0
+ && phdr->p_offset >= di->rx_map_foff
+ && phdr->p_offset < di->rx_map_foff + di->rx_map_size
+ && phdr->p_offset + phdr->p_filesz <= di->rx_map_foff + di->rx_map_size) {
+ rx_svma_base = phdr->p_vaddr;
+ rx_svma_limit = phdr->p_vaddr + phdr->p_memsz;
+ rx_bias = di->rx_map_avma - di->rx_map_foff + phdr->p_offset - phdr->p_vaddr;
+ }
+ else if (rw_svma_limit == 0
+ && phdr->p_offset >= di->rw_map_foff
+ && phdr->p_offset < di->rw_map_foff + di->rw_map_size
+ && phdr->p_offset + phdr->p_filesz <= di->rw_map_foff + di->rw_map_size) {
+ rw_svma_base = phdr->p_vaddr;
+ rw_svma_limit = phdr->p_vaddr + phdr->p_memsz;
+ rw_bias = di->rw_map_avma - di->rw_map_foff + phdr->p_offset - phdr->p_vaddr;
+ }
}
/* Try to get the soname. If there isn't one, use "NONE".
@@ -1254,15 +1269,9 @@
di->soname = "NONE";
}
- /*SizeT*/ sbss_size = 0;
- /*Addr */ sbss_svma = 0;
- /*UInt */ bss_align = 0;
- /*UInt */ sbss_align = 0;
+ vg_assert(rx_svma_limit != 0);
+ vg_assert(rw_svma_limit != 0);
- /* UInt */ data_align = 0;
- /* SizeT */ bss_totsize = 0;
- /* Addr */ gen_bss_lowest_svma = ~((Addr)0);
-
/* Now read the section table. */
TRACE_SYMTAB("\n");
TRACE_SYMTAB("------ Examining the section headers "
@@ -1270,9 +1279,13 @@
TRACE_SYMTAB("rx: at %#lx are mapped foffsets %ld .. %ld\n",
di->rx_map_avma,
di->rx_map_foff, di->rx_map_foff + di->rx_map_size - 1 );
+ TRACE_SYMTAB("rx: contains svmas %#lx .. %#lx with bias %#lx\n",
+ rx_svma_base, rx_svma_limit - 1, rx_bias );
TRACE_SYMTAB("rw: at %#lx are mapped foffsets %ld .. %ld\n",
di->rw_map_avma,
di->rw_map_foff, di->rw_map_foff + di->rw_map_size - 1 );
+ TRACE_SYMTAB("rw: contains svmas %#lx .. %#lx with bias %#lx\n",
+ rw_svma_base, rw_svma_limit - 1, rw_bias );
for (i = 0; i < shdr_nent; i++) {
ElfXX_Shdr* shdr = INDEX_BIS( shdr_img, i, shdr_ent_szB );
@@ -1282,10 +1295,8 @@
UWord size = shdr->sh_size;
UInt alyn = shdr->sh_addralign;
Bool bits = !(shdr->sh_type == SHT_NOBITS);
- Bool inrx = foff >= di->rx_map_foff
- && foff < di->rx_map_foff + di->rx_map_size;
- Bool inrw = foff >= di->rw_map_foff
- && foff < di->rw_map_foff + di->rw_map_size;
+ Bool inrx = svma >= rx_svma_base && svma < rx_svma_limit;
+ Bool inrw = svma >= rw_svma_base && svma < rw_svma_limit;
TRACE_SYMTAB(" [sec %2ld] %s %s al%2u foff %6ld .. %6ld "
" svma %p name \"%s\"\n",
@@ -1321,9 +1332,9 @@
if (inrx && size > 0 && !di->text_present) {
di->text_present = True;
di->text_svma = svma;
- di->text_avma = di->rx_map_avma + foff - di->rx_map_foff;
+ di->text_avma = svma + rx_bias;
di->text_size = size;
- di->text_bias = di->text_avma - svma;
+ di->text_bias = rx_bias;
TRACE_SYMTAB("acquiring .text svma = %#lx .. %#lx\n",
di->text_svma,
di->text_svma + di->text_size - 1);
@@ -1339,13 +1350,11 @@
/* Accept .data where mapped as rw (data), even if zero-sized */
if (0 == VG_(strcmp)(name, ".data")) {
if (inrw && size >= 0 && !di->data_present) {
- if (alyn > data_align)
- data_align = alyn;
di->data_present = True;
di->data_svma = svma;
- di->data_avma = di->rw_map_avma + foff - di->rw_map_foff;
+ di->data_avma = svma + rw_bias;
di->data_size = size;
- di->data_bias = di->data_avma - svma;
+ di->data_bias = rw_bias;
TRACE_SYMTAB("acquiring .data svma = %#lx .. %#lx\n",
di->data_svma,
di->data_svma + di->data_size - 1);
@@ -1361,13 +1370,11 @@
/* Accept .sdata where mapped as rw (data) */
if (0 == VG_(strcmp)(name, ".sdata")) {
if (inrw && size > 0 && !di->sdata_present) {
- if (alyn > data_align)
- data_align = alyn;
di->sdata_present = True;
di->sdata_svma = svma;
- di->sdata_avma = di->rw_map_avma + foff - di->rw_map_foff;
+ di->sdata_avma = svma + rw_bias;
di->sdata_size = size;
- di->sdata_bias = di->sdata_avma - svma;
+ di->sdata_bias = rw_bias;
TRACE_SYMTAB("acquiring .sdata svma = %#lx .. %#lx\n",
di->sdata_svma,
di->sdata_svma + di->sdata_size - 1);
@@ -1383,17 +1390,11 @@
/* Accept .bss where mapped as rw (data), even if zero-sized */
if (0 == VG_(strcmp)(name, ".bss")) {
if (inrw && size >= 0 && !di->bss_present) {
- bss_totsize += round_Addr_upwards(size, alyn);
- if (svma < gen_bss_lowest_svma)
- gen_bss_lowest_svma = svma;
- TRACE_SYMTAB("increasing total bss-like size to %ld\n",
- bss_totsize);
di->bss_present = True;
di->bss_svma = svma;
- di->bss_avma = di->rw_map_avma + foff - di->rw_map_foff;
+ di->bss_avma = svma + rw_bias;
di->bss_size = size;
- di->bss_bias = di->bss_avma - svma;
- bss_align = alyn;
+ di->bss_bias = rw_bias;
TRACE_SYMTAB("acquiring .bss svma = %#lx .. %#lx\n",
di->bss_svma,
di->bss_svma + di->bss_size - 1);
@@ -1413,7 +1414,6 @@
di->bss_avma = 0;
di->bss_size = 0;
di->bss_bias = 0;
- bss_align = 0;
if (!VG_(clo_xml)) {
VG_(message)(Vg_UserMsg, "Warning: the following file's .bss is "
"mapped r-x only - ignoring .bss syms");
@@ -1430,46 +1430,16 @@
di->bss_avma = 0;
di->bss_size = 0;
di->bss_bias = 0;
- bss_align = 0;
} else {
BAD(".bss");
}
}
- /* Accept .sbss where mapped as rw (data) */
- if (0 == VG_(strcmp)(name, ".sbss")) {
- if (inrw && size > 0 && sbss_size == 0) {
- bss_totsize += round_Addr_upwards(size, alyn);
- if (svma < gen_bss_lowest_svma)
- gen_bss_lowest_svma = svma;
- TRACE_SYMTAB("increasing total bss-like size to %ld\n",
- bss_totsize);
- sbss_size = size;
- sbss_svma = svma;
- sbss_align = alyn;
- } else {
- BAD(".sbss");
- }
- }
-
- /* Accept .dynbss where mapped as rw (data) */
- if (0 == VG_(strcmp)(name, ".dynbss")) {
- if (inrw && size > 0 /* && sbss_size == 0*/) {
- bss_totsize += round_Addr_upwards(size, alyn);
- if (svma < gen_bss_lowest_svma)
- gen_bss_lowest_svma = svma;
- TRACE_SYMTAB("increasing total bss-like size to %ld\n",
- bss_totsize);
- } else {
- BAD(".dynbss");
- }
- }
-
/* Accept .got where mapped as rw (data) */
if (0 == VG_(strcmp)(name, ".got")) {
if (inrw && size > 0 && !di->got_present) {
di->got_present = True;
- di->got_avma = di->rw_map_avma + foff - di->rw_map_foff;
+ di->got_avma = svma + rw_bias;
di->got_size = size;
TRACE_SYMTAB("acquiring .got avma = %#lx\n", di->got_avma);
} else {
@@ -1481,7 +1451,7 @@
if (0 == VG_(strcmp)(name, ".got.plt")) {
if (inrw && size > 0 && !di->gotplt_present) {
di->gotplt_present = True;
- di->gotplt_avma = di->rw_map_avma + foff - di->rw_map_foff;
+ di->gotplt_avma = svma + rw_bias;
di->gotplt_size = size;
TRACE_SYMTAB("acquiring .got.plt avma = %#lx\n", di->gotplt_avma);
} else if (size != 0) {
@@ -1495,7 +1465,7 @@
if (0 == VG_(strcmp)(name, ".plt")) {
if (inrx && size > 0 && !di->plt_present) {
di->plt_present = True;
- di->plt_avma = di->rx_map_avma + foff - di->rx_map_foff;
+ di->plt_avma = svma + rx_bias;
di->plt_size = size;
TRACE_SYMTAB("acquiring .plt avma = %#lx\n", di->plt_avma);
} else {
@@ -1507,7 +1477,7 @@
if (0 == VG_(strcmp)(name, ".plt")) {
if (inrw && size > 0 && !di->plt_present) {
di->plt_present = True;
- di->plt_avma = di->rw_map_avma + foff - di->rw_map_foff;
+ di->plt_avma = svma + rw_bias;
di->plt_size = size;
TRACE_SYMTAB("acquiring .plt avma = %#lx\n", di->plt_avma);
} else {
@@ -1519,7 +1489,7 @@
if (0 == VG_(strcmp)(name, ".plt")) {
if (inrw && size > 0 && !di->plt_present) {
di->plt_present = True;
- di->plt_avma = di->rw_map_avma + foff - di->rw_map_foff;
+ di->plt_avma = svma + rw_bias;
di->plt_size = size;
TRACE_SYMTAB("acquiring .plt avma = %#lx\n", di->plt_avma);
} else
@@ -1542,7 +1512,7 @@
if (0 == VG_(strcmp)(name, ".opd")) {
if (inrw && size > 0 && !di->opd_present) {
di->opd_present = True;
- di->opd_avma = di->rw_map_avma + foff - di->rw_map_foff;
+ di->opd_avma = svma + rw_bias;
di->opd_size = size;
TRACE_SYMTAB("acquiring .opd avma = %#lx\n", di->opd_avma);
} else {
@@ -1556,13 +1526,13 @@
if (0 == VG_(strcmp)(name, ".eh_frame")) {
if (inrx && size > 0 && !di->ehframe_present) {
di->ehframe_present = True;
- di->ehframe_avma = di->rx_map_avma + foff - di->rx_map_foff;
+ di->ehframe_avma = svma + rx_bias;
di->ehframe_size = size;
TRACE_SYMTAB("acquiring .eh_frame avma = %#lx\n", di->ehframe_avma);
} else
if (inrw && size > 0 && !di->ehframe_present) {
di->ehframe_present = True;
- di->ehframe_avma = di->rw_map_avma + foff - di->rw_map_foff;
+ di->ehframe_avma = svma + rw_bias;
di->ehframe_size = size;
TRACE_SYMTAB("acquiring .eh_frame avma = %#lx\n", di->ehframe_avma);
} else {
@@ -1574,24 +1544,6 @@
}
- /* Kludge: ignore all previous computations for .bss avma range,
- and simply assume that .bss immediately follows .data/.sdata.*/
- if (1) {
- SizeT data_al = round_Addr_upwards(di->data_avma, data_align)
- - di->data_avma;
- TRACE_SYMTAB("data_al = %ld\n", data_al);
- bss_totsize += data_al;
- di->bss_svma = gen_bss_lowest_svma;
- di->bss_size = bss_totsize;
- di->bss_avma = di->data_avma + (di->bss_svma - di->data_svma);
- di->bss_bias = di->data_bias;
- TRACE_SYMTAB("kludged .bss svma = %#lx .. %#lx\n",
- di->bss_svma, di->bss_svma + di->bss_size - 1);
- TRACE_SYMTAB("kludged .bss avma = %#lx .. %#lx\n",
- di->bss_avma, di->bss_avma + di->bss_size - 1);
- TRACE_SYMTAB("kludged .bss bias = %#lx\n", di->bss_bias);
- }
-
if (0) VG_(printf)("YYYY text_: avma %#lx size %ld bias %#lx\n",
di->text_avma, di->text_size, di->text_bias);
|
|
From: <sv...@va...> - 2009-01-22 12:25:04
|
Author: sewardj
Date: 2009-01-22 12:24:26 +0000 (Thu, 22 Jan 2009)
New Revision: 9019
Log:
Some minor format string fixes for gcc-3.3.3 (SuSE 9.1). Not sure why
later gccs don't complain about these.
Modified:
trunk/coregrind/m_syswrap/syswrap-generic.c
trunk/coregrind/m_syswrap/syswrap-linux.c
trunk/helgrind/libhb_core.c
Modified: trunk/coregrind/m_syswrap/syswrap-generic.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-generic.c 2009-01-22 01:36:51 UTC (rev 9018)
+++ trunk/coregrind/m_syswrap/syswrap-generic.c 2009-01-22 12:24:26 UTC (rev 9019)
@@ -2029,7 +2029,7 @@
#define POST(name) DEFN_POST_TEMPLATE(generic, name)
// Combine two 32-bit values into a 64-bit value
-#define LOHI64(lo,hi) ( (lo) | ((ULong)(hi) << 32) )
+#define LOHI64(lo,hi) ( ((ULong)(lo)) | (((ULong)(hi)) << 32) )
//zz //PRE(sys_exit_group, Special)
//zz //{
Modified: trunk/coregrind/m_syswrap/syswrap-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-linux.c 2009-01-22 01:36:51 UTC (rev 9018)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c 2009-01-22 12:24:26 UTC (rev 9019)
@@ -373,7 +373,7 @@
#define POST(name) DEFN_POST_TEMPLATE(linux, name)
// Combine two 32-bit values into a 64-bit value
-#define LOHI64(lo,hi) ( (lo) | ((ULong)(hi) << 32) )
+#define LOHI64(lo,hi) ( ((ULong)(lo)) | (((ULong)(hi)) << 32) )
/* ---------------------------------------------------------------------
*mount wrappers
Modified: trunk/helgrind/libhb_core.c
===================================================================
--- trunk/helgrind/libhb_core.c 2009-01-22 01:36:51 UTC (rev 9018)
+++ trunk/helgrind/libhb_core.c 2009-01-22 12:24:26 UTC (rev 9019)
@@ -2307,7 +2307,7 @@
tl_assert(nTab > 0);
VG_(message)(Vg_DebugMsg,
"libhb: VTS GC: #%u old size %lu live %lu (%2llu%%)",
- ctr++, nTab, nLive, (100ULL * nLive) / nTab);
+ ctr++, nTab, nLive, (100ULL * (ULong)nLive) / (ULong)nTab);
}
}
|
|
From: Tom H. <th...@cy...> - 2009-01-22 03:34:46
|
Nightly build on vauxhall ( x86_64, Fedora 10 ) started at 2009-01-22 03:20:05 GMT
Results differ from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 481 tests, 3 stderr failures, 0 stdout failures, 0 post failures ==
exp-ptrcheck/tests/base (stderr)
exp-ptrcheck/tests/preen_invars (stderr)
memcheck/tests/x86-linux/scalar (stderr)
=================================================
== Results from 24 hours ago ==
=================================================
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... failed
Last 20 lines of verbose log follow echo
make[4]: Entering directory `/tmp/vgtest/2009-01-22/valgrind/VEX'
rm -f auxprogs/genoffsets.s
gcc -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wmissing-declarations -g -O2 -fstrict-aliasing -O -S -o auxprogs/genoffsets.s \
auxprogs/genoffsets.c
grep xyzzy auxprogs/genoffsets.s | grep define \
| sed "s/xyzzy\\$//g" | sed "s/xyzzy//g" \
> pub/libvex_guest_offsets.h
rm -f auxprogs/genoffsets.s
make[4]: Leaving directory `/tmp/vgtest/2009-01-22/valgrind/VEX'
gcc -DHAVE_CONFIG_H -I. -I.. -I../coregrind -I.. -I../coregrind/x86 -I../coregrind/linux -I../coregrind/x86-linux -I../include -I../VEX/pub -DVG_PLATFORM="\"x86-linux\"" -DVGA_x86=1 -DVGO_linux=1 -DVGP_x86_linux=1 -DVG_LIBDIR="\"/tmp/vgtest/2009-01-22/Inst/lib/valgrind"\" -m32 -O2 -g -Wmissing-prototypes -Wall -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-statement -fno-stack-protector -MT libcoregrind_x86_linux_a-syswrap-main.o -MD -MP -MF .deps/libcoregrind_x86_linux_a-syswrap-main.Tpo -c -o libcoregrind_x86_linux_a-syswrap-main.o `test -f 'm_syswrap/syswrap-main.c' || echo './'`m_syswrap/syswrap-main.c
mv -f .deps/libcoregrind_x86_linux_a-syswrap-main.Tpo .deps/libcoregrind_x86_linux_a-syswrap-main.Po
gcc -DHAVE_CONFIG_H -I. -I.. -I../coregrind -I.. -I../coregrind/x86 -I../coregrind/linux -I../coregrind/x86-linux -I../include -I../VEX/pub -DVG_PLATFORM="\"x86-linux\"" -DVGA_x86=1 -DVGO_linux=1 -DVGP_x86_linux=1 -DVG_LIBDIR="\"/tmp/vgtest/2009-01-22/Inst/lib/valgrind"\" -m32 -O2 -g -Wmissing-prototypes -Wall -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-statement -fno-stack-protector -MT libcoregrind_x86_linux_a-elf.o -MD -MP -MF .deps/libcoregrind_x86_linux_a-elf.Tpo -c -o libcoregrind_x86_linux_a-elf.o `test -f 'm_ume/elf.c' || echo './'`m_ume/elf.c
m_ume/elf.c:45:22: error: priv_ume.h: No such file or directory
make[3]: *** [libcoregrind_x86_linux_a-elf.o] Error 1
make[3]: Leaving directory `/tmp/vgtest/2009-01-22/valgrind/coregrind'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/vgtest/2009-01-22/valgrind/coregrind'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/vgtest/2009-01-22/valgrind'
make: *** [all] Error 2
=================================================
== Difference between 24 hours ago and now ==
=================================================
*** old.short Thu Jan 22 03:20:59 2009
--- new.short Thu Jan 22 03:34:41 2009
***************
*** 3,26 ****
Configuring valgrind ... done
! Building valgrind ... failed
- Last 20 lines of verbose log follow echo
- make[4]: Entering directory `/tmp/vgtest/2009-01-22/valgrind/VEX'
- rm -f auxprogs/genoffsets.s
- gcc -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wmissing-declarations -g -O2 -fstrict-aliasing -O -S -o auxprogs/genoffsets.s \
- auxprogs/genoffsets.c
- grep xyzzy auxprogs/genoffsets.s | grep define \
- | sed "s/xyzzy\\$//g" | sed "s/xyzzy//g" \
- > pub/libvex_guest_offsets.h
- rm -f auxprogs/genoffsets.s
- make[4]: Leaving directory `/tmp/vgtest/2009-01-22/valgrind/VEX'
- gcc -DHAVE_CONFIG_H -I. -I.. -I../coregrind -I.. -I../coregrind/x86 -I../coregrind/linux -I../coregrind/x86-linux -I../include -I../VEX/pub -DVG_PLATFORM="\"x86-linux\"" -DVGA_x86=1 -DVGO_linux=1 -DVGP_x86_linux=1 -DVG_LIBDIR="\"/tmp/vgtest/2009-01-22/Inst/lib/valgrind"\" -m32 -O2 -g -Wmissing-prototypes -Wall -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-statement -fno-stack-protector -MT libcoregrind_x86_linux_a-syswrap-main.o -MD -MP -MF .deps/libcoregrind_x86_linux_a-syswrap-main.Tpo -c -o libcoregrind_x86_linux_a-syswrap-main.o `test -f 'm_syswrap/syswrap-main.c' || echo './'`m_syswrap/syswrap-main.c
- mv -f .deps/libcoregrind_x86_linux_a-syswrap-main.Tpo .deps/libcoregrind_x86_linux_a-syswrap-main.Po
- gcc -DHAVE_CONFIG_H -I. -I.. -I../coregrind -I.. -I../coregrind/x86 -I../coregrind/linux -I../coregrind/x86-linux -I../include -I../VEX/pub -DVG_PLATFORM="\"x86-linux\"" -DVGA_x86=1 -DVGO_linux=1 -DVGP_x86_linux=1 -DVG_LIBDIR="\"/tmp/vgtest/2009-01-22/Inst/lib/valgrind"\" -m32 -O2 -g -Wmissing-prototypes -Wall -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-statement -fno-stack-protector -MT libcoregrind_x86_linux_a-elf.o -MD -MP -MF .deps/libcoregrind_x86_linux_a-elf.Tpo -c -o libcoregrind_x86_linux_a-elf.o `test -f 'm_ume/elf.c' || echo './'`m_ume/elf.c
- m_ume/elf.c:45:22: error: priv_ume.h: No such file or directory
- make[3]: *** [libcoregrind_x86_linux_a-elf.o] Error 1
- make[3]: Leaving directory `/tmp/vgtest/2009-01-22/valgrind/coregrind'
- make[2]: *** [all] Error 2
- make[2]: Leaving directory `/tmp/vgtest/2009-01-22/valgrind/coregrind'
- make[1]: *** [all-recursive] Error 1
- make[1]: Leaving directory `/tmp/vgtest/2009-01-22/valgrind'
- make: *** [all] Error 2
--- 3,13 ----
Configuring valgrind ... done
! Building valgrind ... done
! Running regression tests ... failed
!
! Regression test results follow
!
! == 481 tests, 3 stderr failures, 0 stdout failures, 0 post failures ==
! exp-ptrcheck/tests/base (stderr)
! exp-ptrcheck/tests/preen_invars (stderr)
! memcheck/tests/x86-linux/scalar (stderr)
|
|
From: Tom H. <th...@cy...> - 2009-01-22 03:25:39
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2009-01-22 03:05:05 GMT
Results differ from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 472 tests, 7 stderr failures, 0 stdout failures, 0 post failures ==
exp-ptrcheck/tests/base (stderr)
exp-ptrcheck/tests/ccc (stderr)
exp-ptrcheck/tests/preen_invars (stderr)
exp-ptrcheck/tests/pth_create (stderr)
exp-ptrcheck/tests/pth_specific (stderr)
helgrind/tests/tc20_verifywrap (stderr)
memcheck/tests/x86-linux/scalar (stderr)
=================================================
== Results from 24 hours ago ==
=================================================
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... failed
Last 20 lines of verbose log follow echo
make[4]: Entering directory `/tmp/vgtest/2009-01-22/valgrind/VEX'
rm -f auxprogs/genoffsets.s
gcc -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wmissing-declarations -g -O2 -fstrict-aliasing -O -S -o auxprogs/genoffsets.s \
auxprogs/genoffsets.c
grep xyzzy auxprogs/genoffsets.s | grep define \
| sed "s/xyzzy\\$//g" | sed "s/xyzzy//g" \
> pub/libvex_guest_offsets.h
rm -f auxprogs/genoffsets.s
make[4]: Leaving directory `/tmp/vgtest/2009-01-22/valgrind/VEX'
gcc -DHAVE_CONFIG_H -I. -I.. -I../coregrind -I.. -I../coregrind/x86 -I../coregrind/linux -I../coregrind/x86-linux -I../include -I../VEX/pub -DVG_PLATFORM="\"x86-linux\"" -DVGA_x86=1 -DVGO_linux=1 -DVGP_x86_linux=1 -DVG_LIBDIR="\"/tmp/vgtest/2009-01-22/Inst/lib/valgrind"\" -m32 -O2 -g -Wmissing-prototypes -Wall -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-statement -fno-stack-protector -MT libcoregrind_x86_linux_a-syswrap-main.o -MD -MP -MF .deps/libcoregrind_x86_linux_a-syswrap-main.Tpo -c -o libcoregrind_x86_linux_a-syswrap-main.o `test -f 'm_syswrap/syswrap-main.c' || echo './'`m_syswrap/syswrap-main.c
mv -f .deps/libcoregrind_x86_linux_a-syswrap-main.Tpo .deps/libcoregrind_x86_linux_a-syswrap-main.Po
gcc -DHAVE_CONFIG_H -I. -I.. -I../coregrind -I.. -I../coregrind/x86 -I../coregrind/linux -I../coregrind/x86-linux -I../include -I../VEX/pub -DVG_PLATFORM="\"x86-linux\"" -DVGA_x86=1 -DVGO_linux=1 -DVGP_x86_linux=1 -DVG_LIBDIR="\"/tmp/vgtest/2009-01-22/Inst/lib/valgrind"\" -m32 -O2 -g -Wmissing-prototypes -Wall -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-statement -fno-stack-protector -MT libcoregrind_x86_linux_a-elf.o -MD -MP -MF .deps/libcoregrind_x86_linux_a-elf.Tpo -c -o libcoregrind_x86_linux_a-elf.o `test -f 'm_ume/elf.c' || echo './'`m_ume/elf.c
m_ume/elf.c:45:22: error: priv_ume.h: No such file or directory
make[3]: *** [libcoregrind_x86_linux_a-elf.o] Error 1
make[3]: Leaving directory `/tmp/vgtest/2009-01-22/valgrind/coregrind'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/vgtest/2009-01-22/valgrind/coregrind'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/vgtest/2009-01-22/valgrind'
make: *** [all] Error 2
=================================================
== Difference between 24 hours ago and now ==
=================================================
*** old.short Thu Jan 22 03:06:37 2009
--- new.short Thu Jan 22 03:25:29 2009
***************
*** 3,26 ****
Configuring valgrind ... done
! Building valgrind ... failed
- Last 20 lines of verbose log follow echo
- make[4]: Entering directory `/tmp/vgtest/2009-01-22/valgrind/VEX'
- rm -f auxprogs/genoffsets.s
- gcc -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wmissing-declarations -g -O2 -fstrict-aliasing -O -S -o auxprogs/genoffsets.s \
- auxprogs/genoffsets.c
- grep xyzzy auxprogs/genoffsets.s | grep define \
- | sed "s/xyzzy\\$//g" | sed "s/xyzzy//g" \
- > pub/libvex_guest_offsets.h
- rm -f auxprogs/genoffsets.s
- make[4]: Leaving directory `/tmp/vgtest/2009-01-22/valgrind/VEX'
- gcc -DHAVE_CONFIG_H -I. -I.. -I../coregrind -I.. -I../coregrind/x86 -I../coregrind/linux -I../coregrind/x86-linux -I../include -I../VEX/pub -DVG_PLATFORM="\"x86-linux\"" -DVGA_x86=1 -DVGO_linux=1 -DVGP_x86_linux=1 -DVG_LIBDIR="\"/tmp/vgtest/2009-01-22/Inst/lib/valgrind"\" -m32 -O2 -g -Wmissing-prototypes -Wall -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-statement -fno-stack-protector -MT libcoregrind_x86_linux_a-syswrap-main.o -MD -MP -MF .deps/libcoregrind_x86_linux_a-syswrap-main.Tpo -c -o libcoregrind_x86_linux_a-syswrap-main.o `test -f 'm_syswrap/syswrap-main.c' || echo './'`m_syswrap/syswrap-main.c
- mv -f .deps/libcoregrind_x86_linux_a-syswrap-main.Tpo .deps/libcoregrind_x86_linux_a-syswrap-main.Po
- gcc -DHAVE_CONFIG_H -I. -I.. -I../coregrind -I.. -I../coregrind/x86 -I../coregrind/linux -I../coregrind/x86-linux -I../include -I../VEX/pub -DVG_PLATFORM="\"x86-linux\"" -DVGA_x86=1 -DVGO_linux=1 -DVGP_x86_linux=1 -DVG_LIBDIR="\"/tmp/vgtest/2009-01-22/Inst/lib/valgrind"\" -m32 -O2 -g -Wmissing-prototypes -Wall -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-statement -fno-stack-protector -MT libcoregrind_x86_linux_a-elf.o -MD -MP -MF .deps/libcoregrind_x86_linux_a-elf.Tpo -c -o libcoregrind_x86_linux_a-elf.o `test -f 'm_ume/elf.c' || echo './'`m_ume/elf.c
- m_ume/elf.c:45:22: error: priv_ume.h: No such file or directory
- make[3]: *** [libcoregrind_x86_linux_a-elf.o] Error 1
- make[3]: Leaving directory `/tmp/vgtest/2009-01-22/valgrind/coregrind'
- make[2]: *** [all] Error 2
- make[2]: Leaving directory `/tmp/vgtest/2009-01-22/valgrind/coregrind'
- make[1]: *** [all-recursive] Error 1
- make[1]: Leaving directory `/tmp/vgtest/2009-01-22/valgrind'
- make: *** [all] Error 2
--- 3,17 ----
Configuring valgrind ... done
! Building valgrind ... done
! Running regression tests ... failed
!
! Regression test results follow
!
! == 472 tests, 7 stderr failures, 0 stdout failures, 0 post failures ==
! exp-ptrcheck/tests/base (stderr)
! exp-ptrcheck/tests/ccc (stderr)
! exp-ptrcheck/tests/preen_invars (stderr)
! exp-ptrcheck/tests/pth_create (stderr)
! exp-ptrcheck/tests/pth_specific (stderr)
! helgrind/tests/tc20_verifywrap (stderr)
! memcheck/tests/x86-linux/scalar (stderr)
|