|
From: <sv...@va...> - 2009-02-11 23:21:14
|
Author: njn Date: 2009-02-11 23:21:06 +0000 (Wed, 11 Feb 2009) New Revision: 9140 Log: Now building and installing .dSYMs for tool vgpreload.so files. This means that vg_replace_malloc.c functions and line numbers get shown in error messages, which results in 23 fewer regtest failures. Modified: branches/DARWIN/Makefile.install.am branches/DARWIN/Makefile.tool-tests.am branches/DARWIN/Makefile.tool.am branches/DARWIN/coregrind/Makefile.am branches/DARWIN/drd/Makefile.am branches/DARWIN/exp-ptrcheck/Makefile.am branches/DARWIN/helgrind/Makefile.am branches/DARWIN/massif/Makefile.am branches/DARWIN/memcheck/Makefile.am branches/DARWIN/memcheck/tests/filter_xml branches/DARWIN/tests/filter_stderr_basic Modified: branches/DARWIN/Makefile.install.am =================================================================== --- branches/DARWIN/Makefile.install.am 2009-02-11 06:15:05 UTC (rev 9139) +++ branches/DARWIN/Makefile.install.am 2009-02-11 23:21:06 UTC (rev 9140) @@ -1,9 +1,10 @@ # This is used by coregrind/Makefile.am and Makefile.tool.am for doing # "in-place" installs. It copies $(noinst_PROGRAMS) into $inplacedir. -all-local: +# It needs to be depended on by an 'all-local' rule. +inplace-noinst_PROGRAMS: if [ -n "$(noinst_PROGRAMS)" ] ; then \ - for f in $(noinst_PROGRAMS); do \ - mkdir -p $(inplacedir); \ + mkdir -p $(inplacedir); \ + for f in $(noinst_PROGRAMS) ; do \ rm -f $(inplacedir)/$$f; \ ln -f -s ../$(subdir)/$$f $(inplacedir); \ done ; \ @@ -12,10 +13,10 @@ # This is used by coregrind/Makefile.am and by <tool>/Makefile.am for doing # "make install". It copies $(noinst_PROGRAMS) into $prefix/lib/valgrind/. # It needs to be depended on by an 'install-exec-local' rule. -install-exec-local-programs: +install-noinst_PROGRAMS: if [ -n "$(noinst_PROGRAMS)" ] ; then \ + $(mkinstalldirs) $(DESTDIR)$(valdir); \ for f in $(noinst_PROGRAMS); do \ - $(mkinstalldirs) $(DESTDIR)$(valdir); \ $(INSTALL_PROGRAM) $$f $(DESTDIR)$(valdir); \ done ; \ fi Modified: branches/DARWIN/Makefile.tool-tests.am =================================================================== --- branches/DARWIN/Makefile.tool-tests.am 2009-02-11 06:15:05 UTC (rev 9139) +++ branches/DARWIN/Makefile.tool-tests.am 2009-02-11 23:21:06 UTC (rev 9140) @@ -7,15 +7,15 @@ # 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; \ + for f in $(check_PROGRAMS) ; do \ + if [ ! -e $$f.dSYM -o $$f -nt $$f.dSYM ] ; then \ + echo "dsymutil $$f"; \ + dsymutil $$f; \ fi \ done clean-local: - for i in $(check_PROGRAMS) ; do \ - rm -rf $$i.dSYM; \ + for f in $(check_PROGRAMS) ; do \ + rm -rf $$f.dSYM; \ done endif Modified: branches/DARWIN/Makefile.tool.am =================================================================== --- branches/DARWIN/Makefile.tool.am 2009-02-11 06:15:05 UTC (rev 9139) +++ branches/DARWIN/Makefile.tool.am 2009-02-11 23:21:06 UTC (rev 9140) @@ -204,4 +204,41 @@ $(LIBREPLACEMALLOC_AMD64_DARWIN) -install-exec-local: install-exec-local-programs +# See Makefile.tool-tests.am for an explanation of dSYMs. +build-noinst_DSYMS: + for f in $(noinst_DSYMS); do \ + if [ ! -e $$f.dSYM -o $$f -nt $$f.dSYM ] ; then \ + echo "dsymutil $$f"; \ + dsymutil $$f; \ + fi; \ + done + +inplace-noinst_DSYMS: build-noinst_DSYMS + if [ -n "$(noinst_DSYMS)" ] ; then \ + mkdir -p $(inplacedir); \ + for f in $(noinst_DSYMS); do \ + rm -f $(inplacedir)/$$f.dSYM; \ + ln -f -s ../$(subdir)/$$f.dSYM $(inplacedir); \ + done ; \ + fi + +# Nb: we don't use $(INSTALL_PROGRAM) here because it doesn't work with +# directories. XXX: not sure whether the resulting permissions will be +# correct when using 'cp -R'... +install-noinst_DSYMS: build-noinst_DSYMS + if [ -n "$(noinst_DSYMS)" ] ; then \ + $(mkinstalldirs) $(DESTDIR)$(valdir); \ + for f in $(noinst_DSYMS); do \ + cp -R $$f.dSYM $(DESTDIR)$(valdir); \ + done ; \ + fi + +all-local: inplace-noinst_PROGRAMS inplace-noinst_DSYMS + +clean-local: + for f in $(noinst_DSYMS); do \ + rm -rf $$f.dSYM; \ + done + +install-exec-local: install-noinst_PROGRAMS install-noinst_DSYMS + Modified: branches/DARWIN/coregrind/Makefile.am =================================================================== --- branches/DARWIN/coregrind/Makefile.am 2009-02-11 06:15:05 UTC (rev 9139) +++ branches/DARWIN/coregrind/Makefile.am 2009-02-11 23:21:06 UTC (rev 9140) @@ -584,13 +584,15 @@ vgpreload_core_amd64_darwin_so_CFLAGS = $(AM_CFLAGS_AMD64_DARWIN) $(AM_CFLAGS_PIC) vgpreload_core_amd64_darwin_so_LDFLAGS = $(PRELOAD_LDFLAGS_AMD64_DARWIN) +all-local: inplace-noinst_PROGRAMS + clean-local: $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" clean rm -f $(mach_srcs) $(mach_server_srcs) $(mach_hdrs) # Nb: The loop installs the libvex library for possible use by standalone # tools. -install-exec-local: install-exec-local-programs +install-exec-local: install-noinst_PROGRAMS for v in $(LIBVEX) ; do \ $(INSTALL_DATA) @VEX_DIR@/$$v $(DESTDIR)$(valdir) ; \ done Modified: branches/DARWIN/drd/Makefile.am =================================================================== --- branches/DARWIN/drd/Makefile.am 2009-02-11 06:15:05 UTC (rev 9139) +++ branches/DARWIN/drd/Makefile.am 2009-02-11 23:21:06 UTC (rev 9140) @@ -1,6 +1,7 @@ include $(top_srcdir)/Makefile.tool.am noinst_PROGRAMS = +noinst_DSYMS = if VGCONF_PLATFORMS_INCLUDE_X86_LINUX noinst_PROGRAMS += drd-x86-linux vgpreload_drd-x86-linux.so endif @@ -21,9 +22,11 @@ endif if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN noinst_PROGRAMS += drd-x86-darwin vgpreload_drd-x86-darwin.so + noinst_DSYMS += vgpreload_drd-x86-darwin.so endif if VGCONF_PLATFORMS_INCLUDE_AMD64_DARWIN noinst_PROGRAMS += drd-amd64-darwin vgpreload_drd-amd64-darwin.so + noinst_DSYMS += vgpreload_drd-amd64-darwin.so endif Modified: branches/DARWIN/exp-ptrcheck/Makefile.am =================================================================== --- branches/DARWIN/exp-ptrcheck/Makefile.am 2009-02-11 06:15:05 UTC (rev 9139) +++ branches/DARWIN/exp-ptrcheck/Makefile.am 2009-02-11 23:21:06 UTC (rev 9140) @@ -1,6 +1,7 @@ include $(top_srcdir)/Makefile.tool.am noinst_PROGRAMS = +noinst_DSYMS = if VGCONF_PLATFORMS_INCLUDE_X86_LINUX noinst_PROGRAMS += exp-ptrcheck-x86-linux vgpreload_exp-ptrcheck-x86-linux.so endif @@ -21,9 +22,11 @@ endif if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN noinst_PROGRAMS += exp-ptrcheck-x86-darwin vgpreload_exp-ptrcheck-x86-darwin.so +noinst_DSYMS += vgpreload_exp-ptrcheck-x86-darwin.so endif if VGCONF_PLATFORMS_INCLUDE_AMD64_DARWIN noinst_PROGRAMS += exp-ptrcheck-amd64-darwin vgpreload_exp-ptrcheck-amd64-darwin.so +noinst_DSYMS += vgpreload_exp-ptrcheck-amd64-darwin.so endif Modified: branches/DARWIN/helgrind/Makefile.am =================================================================== --- branches/DARWIN/helgrind/Makefile.am 2009-02-11 06:15:05 UTC (rev 9139) +++ branches/DARWIN/helgrind/Makefile.am 2009-02-11 23:21:06 UTC (rev 9140) @@ -1,6 +1,7 @@ include $(top_srcdir)/Makefile.tool.am noinst_PROGRAMS = +noinst_DSYMS = if VGCONF_PLATFORMS_INCLUDE_X86_LINUX noinst_PROGRAMS += helgrind-x86-linux vgpreload_helgrind-x86-linux.so endif @@ -21,9 +22,11 @@ endif if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN noinst_PROGRAMS += helgrind-x86-darwin vgpreload_helgrind-x86-darwin.so +noinst_DSYMS += vgpreload_helgrind-x86-darwin.so endif if VGCONF_PLATFORMS_INCLUDE_AMD64_DARWIN noinst_PROGRAMS += helgrind-amd64-darwin vgpreload_helgrind-amd64-darwin.so +noinst_DSYMS += vgpreload_helgrind-amd64-darwin.so endif VGPRELOAD_HELGRIND_SOURCES_COMMON = hg_intercepts.c Modified: branches/DARWIN/massif/Makefile.am =================================================================== --- branches/DARWIN/massif/Makefile.am 2009-02-11 06:15:05 UTC (rev 9139) +++ branches/DARWIN/massif/Makefile.am 2009-02-11 23:21:06 UTC (rev 9140) @@ -5,6 +5,7 @@ bin_SCRIPTS = ms_print noinst_PROGRAMS = +noinst_DSYMS = if VGCONF_PLATFORMS_INCLUDE_X86_LINUX noinst_PROGRAMS += massif-x86-linux vgpreload_massif-x86-linux.so endif @@ -25,9 +26,11 @@ endif if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN noinst_PROGRAMS += massif-x86-darwin vgpreload_massif-x86-darwin.so +noinst_DSYMS += vgpreload_massif-x86-darwin.so endif if VGCONF_PLATFORMS_INCLUDE_AMD64_DARWIN noinst_PROGRAMS += massif-amd64-darwin vgpreload_massif-amd64-darwin.so +noinst_DSYMS += vgpreload_massif-amd64-darwin.so endif vgpreload_massif_x86_linux_so_SOURCES = Modified: branches/DARWIN/memcheck/Makefile.am =================================================================== --- branches/DARWIN/memcheck/Makefile.am 2009-02-11 06:15:05 UTC (rev 9139) +++ branches/DARWIN/memcheck/Makefile.am 2009-02-11 23:21:06 UTC (rev 9140) @@ -1,6 +1,7 @@ include $(top_srcdir)/Makefile.tool.am noinst_PROGRAMS = +noinst_DSYMS = if VGCONF_PLATFORMS_INCLUDE_X86_LINUX noinst_PROGRAMS += memcheck-x86-linux vgpreload_memcheck-x86-linux.so endif @@ -21,9 +22,11 @@ endif if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN noinst_PROGRAMS += memcheck-x86-darwin vgpreload_memcheck-x86-darwin.so +noinst_DSYMS += vgpreload_memcheck-x86-darwin.so endif if VGCONF_PLATFORMS_INCLUDE_AMD64_DARWIN noinst_PROGRAMS += memcheck-amd64-darwin vgpreload_memcheck-amd64-darwin.so +noinst_DSYMS += vgpreload_memcheck-amd64-darwin.so endif VGPRELOAD_MEMCHECK_SOURCES_COMMON = mc_replace_strmem.c Modified: branches/DARWIN/memcheck/tests/filter_xml =================================================================== --- branches/DARWIN/memcheck/tests/filter_xml 2009-02-11 06:15:05 UTC (rev 9139) +++ branches/DARWIN/memcheck/tests/filter_xml 2009-02-11 23:21:06 UTC (rev 9140) @@ -8,7 +8,7 @@ sed "s/<line>.*<\/line>/<line>...<\/line>/" | sed "s/<dir>.*<\/dir>/<dir>...<\/dir>/" | sed "s/<count>.*<\/count>/<count>...<\/count>/" | -sed "s/\(m_replacemalloc\/\)\?vg_replace_malloc.c/vg_replace_malloc.c/" | +perl -p -e "s/(m_replacemalloc\/)?vg_replace_malloc.c/vg_replace_malloc.c/" | perl -0 -p -e "s/<suppcounts>.*<\/suppcounts>/<suppcounts>...<\/suppcounts>/s" | perl -p -e "s/<time>.*<\/time>/<time>...<\/time>/s" | perl -0 -p -e "s/<vargv>.*<\/vargv>/<vargv>...<\/vargv>/s" @@ -23,6 +23,7 @@ # # The other is that as somebody else said you need to change the input # record separator so that it reads in the whole file as a single line -# which you can do with the -0 switch. +# (which means we can do multi-line matching in a single regexp) which you +# can do with the -0 switch. # # Hence -0 -p. Modified: branches/DARWIN/tests/filter_stderr_basic =================================================================== --- branches/DARWIN/tests/filter_stderr_basic 2009-02-11 06:15:05 UTC (rev 9139) +++ branches/DARWIN/tests/filter_stderr_basic 2009-02-11 23:21:06 UTC (rev 9140) @@ -26,11 +26,8 @@ sed "/For more details, rerun with: -v/d" | # Anonymise line numbers in vg_replace_malloc.c, remove dirname if present -sed "s/\(m_replacemalloc\/\)\?vg_replace_malloc.c:[0-9]*/vg_replace_malloc.c:.../" | +perl -p -e "s/(m_replacemalloc\/)?vg_replace_malloc.c:[0-9]*/vg_replace_malloc.c:.../" | -# Anonymise vg_intercept lines -#sed "s/vg_intercept.c:[0-9]*/vg_intercept.c:.../" | - # Hide suppressed error counts sed "s/^\(ERROR SUMMARY[^(]*(suppressed: \)[0-9]*\( from \)[0-9]*)$/\10\20)/" | |