Author: njn
Date: 2009-02-04 04:55:46 +0000 (Wed, 04 Feb 2009)
New Revision: 9104
Log:
Now using a 'check-local' hook to run (on Darwin only) 'dsymutil' on all
regtest files "make check". This hook is defined in Makefile.tool-tests.am,
which all test Makefile.am files must now include.
This means that debug info for regtest executables can be found on Darwin.
31 fewer test failures occur as a result.
Also made a minor fix to Darwin DWARF reading.
Added:
branches/DARWIN/Makefile.tool-tests.am
Modified:
branches/DARWIN/cachegrind/tests/Makefile.am
branches/DARWIN/cachegrind/tests/x86/Makefile.am
branches/DARWIN/callgrind/tests/Makefile.am
branches/DARWIN/coregrind/m_debuginfo/d3basics.c
branches/DARWIN/drd/tests/Makefile.am
branches/DARWIN/exp-ptrcheck/tests/Makefile.am
branches/DARWIN/exp-ptrcheck/tests/x86/Makefile.am
branches/DARWIN/helgrind/tests/Makefile.am
branches/DARWIN/massif/tests/Makefile.am
branches/DARWIN/memcheck/tests/Makefile.am
branches/DARWIN/memcheck/tests/amd64/Makefile.am
branches/DARWIN/memcheck/tests/linux/Makefile.am
branches/DARWIN/memcheck/tests/x86-linux/Makefile.am
branches/DARWIN/memcheck/tests/x86/Makefile.am
branches/DARWIN/none/tests/Makefile.am
branches/DARWIN/none/tests/amd64/Makefile.am
branches/DARWIN/none/tests/ppc32/Makefile.am
branches/DARWIN/none/tests/ppc64/Makefile.am
branches/DARWIN/none/tests/x86/Makefile.am
Added: branches/DARWIN/Makefile.tool-tests.am
===================================================================
--- branches/DARWIN/Makefile.tool-tests.am (rev 0)
+++ branches/DARWIN/Makefile.tool-tests.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -0,0 +1,21 @@
+# On Darwin, for a program 'p', the DWARF debug info is stored in the
+# directory 'p.dSYM'. This must be generated after the executable is
+# created, with 'dsymutil p'. We could redefine LINK with a script that
+# executes 'dsymutil' after linking, but that's a pain. Instead we use this
+# hook so that every time "make check" is run, we subsequently invoke
+# 'dsymutil' on all the executables that lack a .dSYM directory, or that are
+# newer than their corresponding .dSYM directory.
+if VGCONF_OS_IS_DARWIN
+check-local:
+ for i in $(check_PROGRAMS) ; do \
+ if [ ! -e $$i.dSYM -o $$i -nt $$i.dSYM ] ; then \
+ echo "dsymutil $$i"; \
+ dsymutil $$i; \
+ fi \
+ done
+
+clean-local:
+ for i in $(check_PROGRAMS) ; do \
+ rm -rf $$i.dSYM; \
+ done
+endif
Modified: branches/DARWIN/cachegrind/tests/Makefile.am
===================================================================
--- branches/DARWIN/cachegrind/tests/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/cachegrind/tests/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -2,6 +2,9 @@
# For AM_FLAG_M3264_PRI
include $(top_srcdir)/Makefile.flags.am
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
SUBDIRS = .
if VGCONF_ARCHS_INCLUDE_X86
SUBDIRS += x86
Modified: branches/DARWIN/cachegrind/tests/x86/Makefile.am
===================================================================
--- branches/DARWIN/cachegrind/tests/x86/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/cachegrind/tests/x86/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -1,3 +1,6 @@
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
noinst_SCRIPTS = filter_stderr
EXTRA_DIST = $(noinst_SCRIPTS) \
Modified: branches/DARWIN/callgrind/tests/Makefile.am
===================================================================
--- branches/DARWIN/callgrind/tests/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/callgrind/tests/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -1,6 +1,9 @@
# For AM_FLAG_M3264_PRI
include $(top_srcdir)/Makefile.flags.am
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
SUBDIRS = .
DIST_SUBDIRS = .
Modified: branches/DARWIN/coregrind/m_debuginfo/d3basics.c
===================================================================
--- branches/DARWIN/coregrind/m_debuginfo/d3basics.c 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/coregrind/m_debuginfo/d3basics.c 2009-02-04 04:55:46 UTC (rev 9104)
@@ -379,12 +379,12 @@
static Bool get_Dwarf_Reg( /*OUT*/Addr* a, Word regno, RegSummary* regs )
{
vg_assert(regs);
-# if defined(VGP_amd64_linux)
- if (regno == 6/*RBP*/) { *a = regs->fp; return True; }
- if (regno == 7/*RSP*/) { *a = regs->sp; return True; }
-# elif defined(VGP_x86_linux)
+# if defined(VGP_x86_linux) || defined(VGP_x86_darwin)
if (regno == 5/*EBP*/) { *a = regs->fp; return True; }
if (regno == 4/*ESP*/) { *a = regs->sp; return True; }
+# elif defined(VGP_amd64_linux) || defined(VGP_amd64_darwin)
+ if (regno == 6/*RBP*/) { *a = regs->fp; return True; }
+ if (regno == 7/*RSP*/) { *a = regs->sp; return True; }
# elif defined(VGP_ppc32_linux)
if (regno == 1/*SP*/) { *a = regs->sp; return True; }
if (regno == 31) return False;
@@ -395,8 +395,6 @@
vg_assert(0);
# elif defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5)
vg_assert(0); /* this function should never be called */
-# elif defined(VGP_x86_darwin) || defined(VGP_amd64_darwin)
- vg_assert(0); /* this function should never be called */
# else
# error "Unknown platform"
# endif
Modified: branches/DARWIN/drd/tests/Makefile.am
===================================================================
--- branches/DARWIN/drd/tests/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/drd/tests/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -1,6 +1,9 @@
# For AM_FLAG_M3264_PRI
include $(top_srcdir)/Makefile.flags.am
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
SUBDIRS = .
DIST_SUBDIRS = .
Modified: branches/DARWIN/exp-ptrcheck/tests/Makefile.am
===================================================================
--- branches/DARWIN/exp-ptrcheck/tests/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/exp-ptrcheck/tests/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -2,6 +2,9 @@
# For AM_FLAG_M3264_PRI
include $(top_srcdir)/Makefile.flags.am
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
#SUBDIRS = .
#if VGCONF_ARCHS_INCLUDE_X86
#SUBDIRS += x86
Modified: branches/DARWIN/exp-ptrcheck/tests/x86/Makefile.am
===================================================================
--- branches/DARWIN/exp-ptrcheck/tests/x86/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/exp-ptrcheck/tests/x86/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -1,3 +1,5 @@
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
noinst_SCRIPTS = filter_stderr
Modified: branches/DARWIN/helgrind/tests/Makefile.am
===================================================================
--- branches/DARWIN/helgrind/tests/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/helgrind/tests/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -2,6 +2,9 @@
# For AM_FLAG_M3264_PRI
include $(top_srcdir)/Makefile.flags.am
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
noinst_SCRIPTS = filter_stderr
EXTRA_DIST = $(noinst_SCRIPTS) \
Modified: branches/DARWIN/massif/tests/Makefile.am
===================================================================
--- branches/DARWIN/massif/tests/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/massif/tests/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -2,6 +2,9 @@
# For AM_FLAG_M3264_PRI
include $(top_srcdir)/Makefile.flags.am
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
noinst_SCRIPTS = filter_stderr filter_verbose
EXTRA_DIST = $(noinst_SCRIPTS) \
Modified: branches/DARWIN/memcheck/tests/Makefile.am
===================================================================
--- branches/DARWIN/memcheck/tests/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/memcheck/tests/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -2,6 +2,9 @@
# For AM_FLAG_M3264_PRI
include $(top_srcdir)/Makefile.flags.am
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
SUBDIRS = .
# Arch-specific tests.
Modified: branches/DARWIN/memcheck/tests/amd64/Makefile.am
===================================================================
--- branches/DARWIN/memcheck/tests/amd64/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/memcheck/tests/amd64/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -1,3 +1,6 @@
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
noinst_SCRIPTS = filter_stderr
noinst_HEADERS =
Modified: branches/DARWIN/memcheck/tests/linux/Makefile.am
===================================================================
--- branches/DARWIN/memcheck/tests/linux/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/memcheck/tests/linux/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -1,3 +1,6 @@
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
noinst_SCRIPTS = filter_stderr
EXTRA_DIST = $(noinst_SCRIPTS) \
Modified: branches/DARWIN/memcheck/tests/x86/Makefile.am
===================================================================
--- branches/DARWIN/memcheck/tests/x86/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/memcheck/tests/x86/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -1,3 +1,6 @@
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
noinst_SCRIPTS = filter_stderr filter_pushfpopf filter_tronical
INSN_TESTS = insn_basic insn_fpu insn_cmov insn_mmx insn_mmxext insn_sse insn_sse2
Modified: branches/DARWIN/memcheck/tests/x86-linux/Makefile.am
===================================================================
--- branches/DARWIN/memcheck/tests/x86-linux/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/memcheck/tests/x86-linux/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -1,3 +1,6 @@
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
noinst_SCRIPTS = filter_stderr
noinst_HEADERS = scalar.h
Modified: branches/DARWIN/none/tests/Makefile.am
===================================================================
--- branches/DARWIN/none/tests/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/none/tests/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -2,6 +2,9 @@
# For AM_FLAG_M3264_PRI
include $(top_srcdir)/Makefile.flags.am
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
SUBDIRS = .
if VGCONF_ARCHS_INCLUDE_X86
SUBDIRS += x86
Modified: branches/DARWIN/none/tests/amd64/Makefile.am
===================================================================
--- branches/DARWIN/none/tests/amd64/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/none/tests/amd64/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -1,3 +1,5 @@
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
noinst_SCRIPTS = filter_cpuid filter_stderr filter_int gen_insn_test.pl
Modified: branches/DARWIN/none/tests/ppc32/Makefile.am
===================================================================
--- branches/DARWIN/none/tests/ppc32/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/none/tests/ppc32/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -1,3 +1,5 @@
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
noinst_SCRIPTS = filter_stderr
Modified: branches/DARWIN/none/tests/ppc64/Makefile.am
===================================================================
--- branches/DARWIN/none/tests/ppc64/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/none/tests/ppc64/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -1,3 +1,5 @@
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
noinst_SCRIPTS = filter_stderr
Modified: branches/DARWIN/none/tests/x86/Makefile.am
===================================================================
--- branches/DARWIN/none/tests/x86/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/none/tests/x86/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -1,3 +1,6 @@
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
noinst_SCRIPTS = filter_cpuid filter_stderr gen_insn_test.pl
CLEANFILES = $(addsuffix .c,$(INSN_TESTS))
|