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
(8) |
2
(8) |
3
(15) |
4
(14) |
5
(12) |
6
(40) |
7
(9) |
|
8
(5) |
9
(12) |
10
(9) |
11
(13) |
12
(7) |
13
(7) |
14
(19) |
|
15
(18) |
16
(13) |
17
(16) |
18
(8) |
19
(16) |
20
(16) |
21
(12) |
|
22
(21) |
23
(39) |
24
(27) |
25
(33) |
26
(41) |
27
(17) |
28
(15) |
|
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)/" | |
|
From: Nicholas N. <n.n...@gm...> - 2009-02-11 22:41:41
|
On Thu, Feb 12, 2009 at 5:38 AM, Bart Van Assche <bar...@gm...> wrote: > > While browsing around on the Valgrind website I discovered a broken > link: on the page http://www.valgrind.org/docs/manual/tech-docs.html > the item "1. The Design and Implementation of Valgrind" points to the > URL http://www.valgrind.org/docs/manual/new-tech-docs.html. An attempt > to navigate to this URL resulted in "ERROR 404 (file not found)". new-tech-docs.xml exists in the repository in docs/xml/. And in my 3.3.1-Debian installation the html link is ok. So maybe something went wrong copying it over to the website. Julian? N |
|
From: Konstantin S. <kon...@gm...> - 2009-02-11 20:00:43
|
On Wed, Feb 11, 2009 at 8:53 PM, Bart Van Assche <bar...@gm...> wrote: > On Tue, Feb 10, 2009 at 7:42 AM, Konstantin Serebryany > <kon...@gm...> wrote: >> On Mon, Feb 9, 2009 at 9:48 PM, Bart Van Assche >> <bar...@gm...> wrote: >>> IMHO it would be a significant advantage for Valgrind users if there >>> would be a single set of source code annotations that is understood by >>> all data race detectors built on top of Valgrind (Helgrind, DRD and >>> ThreadSanitizer). >> >> Yes. >> Another question: should these client requests be binary compatible >> with each other, or only source compatible? >> (source compatible == macro definitions with different >> implementations for different tools) >> If we push for binary compatibility, we may loose the ability to be >> compatible with non-valgrind-based tools. > > Do you think it is possible to define the annotations such that > recompilation would only be needed when switching between > Valgrind-tools and non-Valgrind tools ? Yes, sure. either define the same client requests in all three tools or intercept the same functions (like AnnotateBlahBlahBlah()) --kcc --kcc > > Bart. > |
|
From: Bart V. A. <bar...@gm...> - 2009-02-11 18:38:43
|
Hello, While browsing around on the Valgrind website I discovered a broken link: on the page http://www.valgrind.org/docs/manual/tech-docs.html the item "1. The Design and Implementation of Valgrind" points to the URL http://www.valgrind.org/docs/manual/new-tech-docs.html. An attempt to navigate to this URL resulted in "ERROR 404 (file not found)". Bart. |
|
From: Bart V. A. <bar...@gm...> - 2009-02-11 17:53:17
|
On Tue, Feb 10, 2009 at 7:42 AM, Konstantin Serebryany <kon...@gm...> wrote: > On Mon, Feb 9, 2009 at 9:48 PM, Bart Van Assche > <bar...@gm...> wrote: >> IMHO it would be a significant advantage for Valgrind users if there >> would be a single set of source code annotations that is understood by >> all data race detectors built on top of Valgrind (Helgrind, DRD and >> ThreadSanitizer). > > Yes. > Another question: should these client requests be binary compatible > with each other, or only source compatible? > (source compatible == macro definitions with different > implementations for different tools) > If we push for binary compatibility, we may loose the ability to be > compatible with non-valgrind-based tools. Do you think it is possible to define the annotations such that recompilation would only be needed when switching between Valgrind-tools and non-Valgrind tools ? Bart. |
|
From: Bill H. <bil...@ki...> - 2009-02-11 16:14:55
|
Ashley Pittman wrote: > On Thu, 2009-01-29 at 21:28 +0300, Konstantin Serebryany wrote: >> I also have to use a patch similar to this one. Useful feature indeed. >> Both black and white lists would be good. > > +1 again. > > The real reason for posting however is my email address is changing any > day now so can you drop me from the cc list, my new email is > as...@pi... although I am subscribed to the list anyway. > > I hope to have some free time shortly to scrub up some old patches I > have lying around. > > Ashley Pittman. > > So, what is the process to get this into valgrind proper? -Bill |
|
From: Florian K. <br...@ac...> - 2009-02-11 12:47:05
|
On Wednesday 11 February 2009 01:06:12 sv...@va... wrote:
> + /* Do the below-main hack */
> + // To reduce the endless nuisance of multiple different names
> + // for "the frame below main()" screwing up the testsuite, change all
> + // known incarnations of said into a single name, "(below main)", if
> + // --show-below-main=yes.
I think you meant: --show-below-main=no
> + if ( do_below_main_renaming && ! VG_(clo_show_below_main) &&
> + Vg_FnNameBelowMain == VG_(get_fnname_kind)(buf) )
> + {
Florian
|
|
From: <sv...@va...> - 2009-02-11 06:15:17
|
Author: njn
Date: 2009-02-11 06:15:05 +0000 (Wed, 11 Feb 2009)
New Revision: 9139
Log:
Merge r9138 (clean up demangling mess) from the trunk.
Modified:
branches/DARWIN/coregrind/m_debuginfo/debuginfo.c
branches/DARWIN/coregrind/m_demangle/demangle.c
branches/DARWIN/coregrind/m_errormgr.c
branches/DARWIN/coregrind/m_replacemalloc/vg_replace_malloc.c
branches/DARWIN/coregrind/m_stacktrace.c
branches/DARWIN/coregrind/pub_core_debuginfo.h
branches/DARWIN/coregrind/pub_core_demangle.h
Modified: branches/DARWIN/coregrind/m_debuginfo/debuginfo.c
===================================================================
--- branches/DARWIN/coregrind/m_debuginfo/debuginfo.c 2009-02-11 06:06:10 UTC (rev 9138)
+++ branches/DARWIN/coregrind/m_debuginfo/debuginfo.c 2009-02-11 06:15:05 UTC (rev 9139)
@@ -1109,13 +1109,15 @@
/* The whole point of this whole big deal: map a code address to a
plausible symbol name. Returns False if no idea; otherwise True.
- Caller supplies buf and nbuf. If demangle is False, don't do
- demangling, regardless of VG_(clo_demangle) -- probably because the
- call has come from VG_(get_fnname_nodemangle)(). findText
+ Caller supplies buf and nbuf. If do_cxx_demangling is False, don't do
+ C++ demangling, regardless of VG_(clo_demangle) -- probably because the
+ call has come from VG_(get_fnname_raw)(). findText
indicates whether we're looking for a text symbol or a data symbol
-- caller must choose one kind or the other. */
static
-Bool get_sym_name ( Bool demangle, Addr a, Char* buf, Int nbuf,
+Bool get_sym_name ( Bool do_cxx_demangling, Bool do_z_demangling,
+ Bool do_below_main_renaming,
+ Addr a, Char* buf, Int nbuf,
Bool match_anywhere_in_sym, Bool show_offset,
Bool findText, /*OUT*/PtrdiffT* offsetP )
{
@@ -1126,14 +1128,20 @@
search_all_symtabs ( a, &di, &sno, match_anywhere_in_sym, findText );
if (di == NULL)
return False;
- if (demangle) {
- VG_(demangle) ( True/*do C++ demangle*/,
- di->symtab[sno].name, buf, nbuf );
- } else {
- VG_(strncpy_safely) ( buf, di->symtab[sno].name, nbuf );
+ VG_(demangle) ( do_cxx_demangling, do_z_demangling,
+ di->symtab[sno].name, buf, nbuf );
+
+ /* Do the below-main hack */
+ // To reduce the endless nuisance of multiple different names
+ // for "the frame below main()" screwing up the testsuite, change all
+ // known incarnations of said into a single name, "(below main)", if
+ // --show-below-main=yes.
+ if ( do_below_main_renaming && ! VG_(clo_show_below_main) &&
+ Vg_FnNameBelowMain == VG_(get_fnname_kind)(buf) )
+ {
+ VG_(strncpy_safely)(buf, "(below main)", nbuf);
}
-
offset = a - di->symtab[sno].addr;
if (offsetP) *offsetP = offset;
@@ -1154,6 +1162,8 @@
}
}
+ buf[nbuf-1] = 0; /* paranoia */
+
return True;
}
@@ -1178,7 +1188,9 @@
match anywhere in function, but don't show offsets. */
Bool VG_(get_fnname) ( Addr a, Char* buf, Int nbuf )
{
- return get_sym_name ( /*demangle*/True, a, buf, nbuf,
+ return get_sym_name ( /*C++-demangle*/True, /*Z-demangle*/True,
+ /*below-main-renaming*/True,
+ a, buf, nbuf,
/*match_anywhere_in_fun*/True,
/*show offset?*/False,
/*text syms only*/True,
@@ -1189,7 +1201,9 @@
match anywhere in function, and show offset if nonzero. */
Bool VG_(get_fnname_w_offset) ( Addr a, Char* buf, Int nbuf )
{
- return get_sym_name ( /*demangle*/True, a, buf, nbuf,
+ return get_sym_name ( /*C++-demangle*/True, /*Z-demangle*/True,
+ /*below-main-renaming*/True,
+ a, buf, nbuf,
/*match_anywhere_in_fun*/True,
/*show offset?*/True,
/*text syms only*/True,
@@ -1201,18 +1215,23 @@
and don't show offsets. */
Bool VG_(get_fnname_if_entry) ( Addr a, Char* buf, Int nbuf )
{
- return get_sym_name ( /*demangle*/True, a, buf, nbuf,
+ return get_sym_name ( /*C++-demangle*/True, /*Z-demangle*/True,
+ /*below-main-renaming*/True,
+ a, buf, nbuf,
/*match_anywhere_in_fun*/False,
/*show offset?*/False,
/*text syms only*/True,
/*offsetP*/NULL );
}
-/* This is only available to core... don't demangle C++ names,
- match anywhere in function, and don't show offsets. */
-Bool VG_(get_fnname_nodemangle) ( Addr a, Char* buf, Int nbuf )
+/* This is only available to core... don't C++-demangle, don't Z-demangle,
+ don't rename below-main, match anywhere in function, and don't show
+ offsets. */
+Bool VG_(get_fnname_raw) ( Addr a, Char* buf, Int nbuf )
{
- return get_sym_name ( /*demangle*/False, a, buf, nbuf,
+ return get_sym_name ( /*C++-demangle*/False, /*Z-demangle*/False,
+ /*below-main-renaming*/False,
+ a, buf, nbuf,
/*match_anywhere_in_fun*/True,
/*show offset?*/False,
/*text syms only*/True,
@@ -1220,29 +1239,17 @@
}
/* This is only available to core... don't demangle C++ names, but do
- do Z-demangling, match anywhere in function, and don't show
- offsets. */
-Bool VG_(get_fnname_Z_demangle_only) ( Addr a, Char* buf, Int nbuf )
+ do Z-demangling and below-main-renaming, match anywhere in function, and
+ don't show offsets. */
+Bool VG_(get_fnname_no_cxx_demangle) ( Addr a, Char* buf, Int nbuf )
{
-# define N_TMPBUF 4096 /* arbitrary, 4096 == ERRTXT_LEN */
- Char tmpbuf[N_TMPBUF];
- Bool ok;
- vg_assert(nbuf > 0);
- ok = get_sym_name ( /*demangle*/False, a, tmpbuf, N_TMPBUF,
- /*match_anywhere_in_fun*/True,
- /*show offset?*/False,
- /*text syms only*/True,
- /*offsetP*/NULL );
- tmpbuf[N_TMPBUF-1] = 0; /* paranoia */
- if (!ok)
- return False;
-
- /* We have something, at least. Try to Z-demangle it. */
- VG_(demangle)( False/*don't do C++ demangling*/, tmpbuf, buf, nbuf);
-
- buf[nbuf-1] = 0; /* paranoia */
- return True;
-# undef N_TMPBUF
+ return get_sym_name ( /*C++-demangle*/False, /*Z-demangle*/True,
+ /*below-main-renaming*/True,
+ a, buf, nbuf,
+ /*match_anywhere_in_fun*/True,
+ /*show offset?*/False,
+ /*text syms only*/True,
+ /*offsetP*/NULL );
}
Vg_FnNameKind VG_(get_fnname_kind) ( Char* name )
@@ -1278,7 +1285,7 @@
// We don't demangle, because it's faster not to, and the special names
// we're looking for won't be demangled.
- if (VG_(get_fnname_nodemangle) ( ip, buf, BUFLEN )) {
+ if (VG_(get_fnname_raw) ( ip, buf, BUFLEN )) {
buf[BUFLEN-1] = '\0'; // paranoia
return VG_(get_fnname_kind)(buf);
} else {
@@ -1296,7 +1303,9 @@
{
Bool ok;
vg_assert(n_dname > 1);
- ok = get_sym_name ( /*demangle*/False, data_addr, dname, n_dname,
+ ok = get_sym_name ( /*C++-demangle*/False, /*Z-demangle*/False,
+ /*below-main-renaming*/False,
+ data_addr, dname, n_dname,
/*match_anywhere_in_sym*/True,
/*show offset?*/False,
/*data syms only please*/False,
Modified: branches/DARWIN/coregrind/m_demangle/demangle.c
===================================================================
--- branches/DARWIN/coregrind/m_demangle/demangle.c 2009-02-11 06:06:10 UTC (rev 9138)
+++ branches/DARWIN/coregrind/m_demangle/demangle.c 2009-02-11 06:15:05 UTC (rev 9139)
@@ -29,7 +29,6 @@
*/
#include "pub_core_basics.h"
-#include "pub_core_debuginfo.h" // XXX: circular dependency
#include "pub_core_demangle.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcbase.h"
@@ -87,34 +86,31 @@
/* This is the main, standard demangler entry point. */
-void VG_(demangle) ( Bool do_cxx_demangle,
+void VG_(demangle) ( Bool do_cxx_demangling, Bool do_z_demangling,
Char* orig, Char* result, Int result_size )
{
# define N_ZBUF 4096
HChar* demangled = NULL;
HChar z_demangled[N_ZBUF];
- if (!VG_(clo_demangle)) {
- VG_(strncpy_safely)(result, orig, result_size);
- return;
- }
-
- /* Undo (2) */
- /* Demangling was requested. First see if it's a Z-mangled
- intercept specification. The fastest way is just to attempt a
- Z-demangling (with NULL soname buffer, since we're not
+ /* Possibly undo (2) */
+ /* Z-Demangling was requested.
+ The fastest way to see if it's a Z-mangled name is just to attempt
+ to Z-demangle it (with NULL for the soname buffer, since we're not
interested in that). */
- if (VG_(maybe_Z_demangle)( orig, NULL,0,/*soname*/
- z_demangled, N_ZBUF, NULL)) {
- orig = z_demangled;
+ if (do_z_demangling) {
+ if (VG_(maybe_Z_demangle)( orig, NULL,0,/*soname*/
+ z_demangled, N_ZBUF, NULL)) {
+ orig = z_demangled;
+ }
}
/* Possibly undo (1) */
- if (do_cxx_demangle)
+ if (do_cxx_demangling && VG_(clo_demangle)) {
demangled = ML_(cplus_demangle) ( orig, DMGL_ANSI | DMGL_PARAMS );
- else
+ } else {
demangled = NULL;
-
+ }
if (demangled) {
VG_(strncpy_safely)(result, demangled, result_size);
VG_(arena_free) (VG_AR_DEMANGLE, demangled);
@@ -127,19 +123,6 @@
// very rarely (ie. I've heard of it twice in 3 years), the demangler
// does leak. But, we can't do much about it, and it's not a disaster,
// so we just let it slide without aborting or telling the user.
-
- /* Do the below-main hack */
- // Finally, to reduce the endless nuisance of multiple different names
- // for "the frame below main()" screwing up the testsuite, change all
- // known incarnations of said into a single name, "(below main)", if
- // --show-below-main=yes.
- // XXX: this makes a circular dependency between m_demangle and
- // m_debuginfo.
- if ( ! VG_(clo_show_below_main) &&
- Vg_FnNameBelowMain == VG_(get_fnname_kind)(result))
- {
- VG_(strncpy_safely)(result, "(below main)", result_size);
- }
# undef N_ZBUF
}
Modified: branches/DARWIN/coregrind/m_errormgr.c
===================================================================
--- branches/DARWIN/coregrind/m_errormgr.c 2009-02-11 06:06:10 UTC (rev 9138)
+++ branches/DARWIN/coregrind/m_errormgr.c 2009-02-11 06:15:05 UTC (rev 9139)
@@ -404,7 +404,7 @@
{
static UChar buf[ERRTXT_LEN];
- if ( VG_(get_fnname_Z_demangle_only) (ip, buf, ERRTXT_LEN) ) {
+ if ( VG_(get_fnname_no_cxx_demangle) (ip, buf, ERRTXT_LEN) ) {
VG_(printf)(" fun:%s\n", buf);
} else if ( VG_(get_objname)(ip, buf, ERRTXT_LEN) ) {
VG_(printf)(" obj:%s\n", buf);
@@ -1223,12 +1223,12 @@
case FunName:
/* Get the function name into 'caller_name', or "???"
if unknown. */
- // Nb: mangled names used in suppressions. Do, though,
+ // Nb: C++-mangled names are used in suppressions. Do, though,
// Z-demangle them, since otherwise it's possible to wind
// up comparing "malloc" in the suppression against
// "_vgrZU_libcZdsoZa_malloc" in the backtrace, and the
// two of them need to be made to match.
- if (!VG_(get_fnname_Z_demangle_only)(ip, caller_name, ERRTXT_LEN))
+ if (!VG_(get_fnname_no_cxx_demangle)(ip, caller_name, ERRTXT_LEN))
VG_(strcpy)(caller_name, "???");
break;
default:
Modified: branches/DARWIN/coregrind/m_replacemalloc/vg_replace_malloc.c
===================================================================
--- branches/DARWIN/coregrind/m_replacemalloc/vg_replace_malloc.c 2009-02-11 06:06:10 UTC (rev 9138)
+++ branches/DARWIN/coregrind/m_replacemalloc/vg_replace_malloc.c 2009-02-11 06:15:05 UTC (rev 9139)
@@ -748,8 +748,10 @@
NULL, // batch_free
NULL, // fixme introspect
2, // version (fixme 3?)
- // DDD: on my machine this last field doesn't exist in malloc_zone_t.
+ // DDD: this field exists in Mac OS 10.6, but not 10.5.
+ #if 0
(void*)VG_REPLACE_FUNCTION_ZU(VG_Z_LIBC_SONAME, malloc_zone_memalign)
+ #endif
};
#define DEFAULT_ZONE(soname, fnname) \
Modified: branches/DARWIN/coregrind/m_stacktrace.c
===================================================================
--- branches/DARWIN/coregrind/m_stacktrace.c 2009-02-11 06:06:10 UTC (rev 9138)
+++ branches/DARWIN/coregrind/m_stacktrace.c 2009-02-11 06:15:05 UTC (rev 9139)
@@ -337,8 +337,8 @@
UChar buf_lr[M_VG_ERRTXT], buf_ip[M_VG_ERRTXT];
/* The following conditional looks grossly inefficient and
surely could be majorly improved, with not much effort. */
- if (VG_(get_fnname_nodemangle) (lr, buf_lr, M_VG_ERRTXT))
- if (VG_(get_fnname_nodemangle) (ip, buf_ip, M_VG_ERRTXT))
+ if (VG_(get_fnname_raw) (lr, buf_lr, M_VG_ERRTXT))
+ if (VG_(get_fnname_raw) (ip, buf_ip, M_VG_ERRTXT))
if (VG_(strncmp)(buf_lr, buf_ip, M_VG_ERRTXT))
lr_is_first_RA = True;
# undef M_VG_ERRTXT
Modified: branches/DARWIN/coregrind/pub_core_debuginfo.h
===================================================================
--- branches/DARWIN/coregrind/pub_core_debuginfo.h 2009-02-11 06:06:10 UTC (rev 9138)
+++ branches/DARWIN/coregrind/pub_core_debuginfo.h 2009-02-11 06:15:05 UTC (rev 9139)
@@ -88,9 +88,19 @@
extern void VG_(di_discard_ALL_debuginfo)( void );
-extern Bool VG_(get_fnname_nodemangle)( Addr a,
- Char* fnname, Int n_fnname );
+/* Like VG_(get_fnname), but it does not do C++ demangling nor Z-demangling
+ * nor below-main renaming.
+ * It should not be used for any names that will be shown to users.
+ * It should only be used in cases where the names of interest will have
+ * particular (ie. non-mangled) forms, or the mangled form is acceptable. */
+extern
+Bool VG_(get_fnname_raw) ( Addr a, Char* buf, Int nbuf );
+/* Like VG_(get_fnname), but without C++ demangling. (But it does
+ * Z-demangling and below-main renaming.) */
+extern
+Bool VG_(get_fnname_no_cxx_demangle) ( Addr a, Char* buf, Int nbuf );
+
/* Use DWARF2/3 CFA information to do one step of stack unwinding. */
extern Bool VG_(use_CF_info) ( /*MOD*/Addr* ipP,
/*MOD*/Addr* spP,
@@ -103,12 +113,6 @@
guest_code_addr. Returns 0 if not known. */
extern Addr VG_(get_tocptr) ( Addr guest_code_addr );
-/* This is only available to core... don't demangle C++ names, but do
- do Z-demangling, match anywhere in function, and don't show
- offsets. */
-extern
-Bool VG_(get_fnname_Z_demangle_only) ( Addr a, Char* buf, Int nbuf );
-
/* Map a function name to its entry point and toc pointer. Is done by
sequential search of all symbol tables, so is very slow. To
mitigate the worst performance effects, you may specify a soname
Modified: branches/DARWIN/coregrind/pub_core_demangle.h
===================================================================
--- branches/DARWIN/coregrind/pub_core_demangle.h 2009-02-11 06:06:10 UTC (rev 9138)
+++ branches/DARWIN/coregrind/pub_core_demangle.h 2009-02-11 06:15:05 UTC (rev 9139)
@@ -36,15 +36,11 @@
// Z-encoded names.
//--------------------------------------------------------------------
-/* This is the main, standard demangler entry point. It does three things:
- * (1) undoes Z-encoding;
- * (2) undoes C++ demangling, if 'do_cxx_demangle' is True
- * (3) converts "below main" names (eg. '__libc_start_main') to "(below
- * main)", if --show-below-main=no.
- */
-
+/* This is the main, standard demangler entry point. It does two things:
+ * (1) undoes Z-encoding, if "do_z_demangle" is True;
+ * (2) undoes C++ demangling, if 'do_cxx_demangle' is True. */
extern
-void VG_(demangle) ( Bool do_cxx_demangle,
+void VG_(demangle) ( Bool do_cxx_demangling, Bool do_z_demangling,
Char* orig, Char* result, Int result_size );
/* Demangle a Z-encoded name as described in pub_tool_redir.h.
|
|
From: <sv...@va...> - 2009-02-11 06:06:16
|
Author: njn
Date: 2009-02-11 06:06:10 +0000 (Wed, 11 Feb 2009)
New Revision: 9138
Log:
Cleaned up the demangling mess:
- Now more clearly distinguishing between C++-demangling, Z-demangling, and
below-main renaming, particularly in 'get_sym_name'.
- --demangle=no no longer prevents Z-demangling, which makes more sense,
although it's unlikely to affect anyone.
- Broke the circular dependency between m_demangle and m_debuginfo by moving
below-main renaming into m_debuginfo.
- Renamed some get_fnname_* functions to make their effect clearer, and
improved their comments.
Modified:
trunk/coregrind/m_debuginfo/debuginfo.c
trunk/coregrind/m_demangle/demangle.c
trunk/coregrind/m_errormgr.c
trunk/coregrind/m_stacktrace.c
trunk/coregrind/pub_core_debuginfo.h
trunk/coregrind/pub_core_demangle.h
Modified: trunk/coregrind/m_debuginfo/debuginfo.c
===================================================================
--- trunk/coregrind/m_debuginfo/debuginfo.c 2009-02-11 01:10:43 UTC (rev 9137)
+++ trunk/coregrind/m_debuginfo/debuginfo.c 2009-02-11 06:06:10 UTC (rev 9138)
@@ -1091,13 +1091,15 @@
/* The whole point of this whole big deal: map a code address to a
plausible symbol name. Returns False if no idea; otherwise True.
- Caller supplies buf and nbuf. If demangle is False, don't do
- demangling, regardless of VG_(clo_demangle) -- probably because the
- call has come from VG_(get_fnname_nodemangle)(). findText
+ Caller supplies buf and nbuf. If do_cxx_demangling is False, don't do
+ C++ demangling, regardless of VG_(clo_demangle) -- probably because the
+ call has come from VG_(get_fnname_raw)(). findText
indicates whether we're looking for a text symbol or a data symbol
-- caller must choose one kind or the other. */
static
-Bool get_sym_name ( Bool demangle, Addr a, Char* buf, Int nbuf,
+Bool get_sym_name ( Bool do_cxx_demangling, Bool do_z_demangling,
+ Bool do_below_main_renaming,
+ Addr a, Char* buf, Int nbuf,
Bool match_anywhere_in_sym, Bool show_offset,
Bool findText, /*OUT*/PtrdiffT* offsetP )
{
@@ -1108,14 +1110,20 @@
search_all_symtabs ( a, &di, &sno, match_anywhere_in_sym, findText );
if (di == NULL)
return False;
- if (demangle) {
- VG_(demangle) ( True/*do C++ demangle*/,
- di->symtab[sno].name, buf, nbuf );
- } else {
- VG_(strncpy_safely) ( buf, di->symtab[sno].name, nbuf );
+ VG_(demangle) ( do_cxx_demangling, do_z_demangling,
+ di->symtab[sno].name, buf, nbuf );
+
+ /* Do the below-main hack */
+ // To reduce the endless nuisance of multiple different names
+ // for "the frame below main()" screwing up the testsuite, change all
+ // known incarnations of said into a single name, "(below main)", if
+ // --show-below-main=yes.
+ if ( do_below_main_renaming && ! VG_(clo_show_below_main) &&
+ Vg_FnNameBelowMain == VG_(get_fnname_kind)(buf) )
+ {
+ VG_(strncpy_safely)(buf, "(below main)", nbuf);
}
-
offset = a - di->symtab[sno].addr;
if (offsetP) *offsetP = offset;
@@ -1136,6 +1144,8 @@
}
}
+ buf[nbuf-1] = 0; /* paranoia */
+
return True;
}
@@ -1160,7 +1170,9 @@
match anywhere in function, but don't show offsets. */
Bool VG_(get_fnname) ( Addr a, Char* buf, Int nbuf )
{
- return get_sym_name ( /*demangle*/True, a, buf, nbuf,
+ return get_sym_name ( /*C++-demangle*/True, /*Z-demangle*/True,
+ /*below-main-renaming*/True,
+ a, buf, nbuf,
/*match_anywhere_in_fun*/True,
/*show offset?*/False,
/*text syms only*/True,
@@ -1171,7 +1183,9 @@
match anywhere in function, and show offset if nonzero. */
Bool VG_(get_fnname_w_offset) ( Addr a, Char* buf, Int nbuf )
{
- return get_sym_name ( /*demangle*/True, a, buf, nbuf,
+ return get_sym_name ( /*C++-demangle*/True, /*Z-demangle*/True,
+ /*below-main-renaming*/True,
+ a, buf, nbuf,
/*match_anywhere_in_fun*/True,
/*show offset?*/True,
/*text syms only*/True,
@@ -1183,18 +1197,23 @@
and don't show offsets. */
Bool VG_(get_fnname_if_entry) ( Addr a, Char* buf, Int nbuf )
{
- return get_sym_name ( /*demangle*/True, a, buf, nbuf,
+ return get_sym_name ( /*C++-demangle*/True, /*Z-demangle*/True,
+ /*below-main-renaming*/True,
+ a, buf, nbuf,
/*match_anywhere_in_fun*/False,
/*show offset?*/False,
/*text syms only*/True,
/*offsetP*/NULL );
}
-/* This is only available to core... don't demangle C++ names,
- match anywhere in function, and don't show offsets. */
-Bool VG_(get_fnname_nodemangle) ( Addr a, Char* buf, Int nbuf )
+/* This is only available to core... don't C++-demangle, don't Z-demangle,
+ don't rename below-main, match anywhere in function, and don't show
+ offsets. */
+Bool VG_(get_fnname_raw) ( Addr a, Char* buf, Int nbuf )
{
- return get_sym_name ( /*demangle*/False, a, buf, nbuf,
+ return get_sym_name ( /*C++-demangle*/False, /*Z-demangle*/False,
+ /*below-main-renaming*/False,
+ a, buf, nbuf,
/*match_anywhere_in_fun*/True,
/*show offset?*/False,
/*text syms only*/True,
@@ -1202,29 +1221,17 @@
}
/* This is only available to core... don't demangle C++ names, but do
- do Z-demangling, match anywhere in function, and don't show
- offsets. */
-Bool VG_(get_fnname_Z_demangle_only) ( Addr a, Char* buf, Int nbuf )
+ do Z-demangling and below-main-renaming, match anywhere in function, and
+ don't show offsets. */
+Bool VG_(get_fnname_no_cxx_demangle) ( Addr a, Char* buf, Int nbuf )
{
-# define N_TMPBUF 4096 /* arbitrary, 4096 == ERRTXT_LEN */
- Char tmpbuf[N_TMPBUF];
- Bool ok;
- vg_assert(nbuf > 0);
- ok = get_sym_name ( /*demangle*/False, a, tmpbuf, N_TMPBUF,
- /*match_anywhere_in_fun*/True,
- /*show offset?*/False,
- /*text syms only*/True,
- /*offsetP*/NULL );
- tmpbuf[N_TMPBUF-1] = 0; /* paranoia */
- if (!ok)
- return False;
-
- /* We have something, at least. Try to Z-demangle it. */
- VG_(demangle)( False/*don't do C++ demangling*/, tmpbuf, buf, nbuf);
-
- buf[nbuf-1] = 0; /* paranoia */
- return True;
-# undef N_TMPBUF
+ return get_sym_name ( /*C++-demangle*/False, /*Z-demangle*/True,
+ /*below-main-renaming*/True,
+ a, buf, nbuf,
+ /*match_anywhere_in_fun*/True,
+ /*show offset?*/False,
+ /*text syms only*/True,
+ /*offsetP*/NULL );
}
Vg_FnNameKind VG_(get_fnname_kind) ( Char* name )
@@ -1257,7 +1264,7 @@
// We don't demangle, because it's faster not to, and the special names
// we're looking for won't be demangled.
- if (VG_(get_fnname_nodemangle) ( ip, buf, BUFLEN )) {
+ if (VG_(get_fnname_raw) ( ip, buf, BUFLEN )) {
buf[BUFLEN-1] = '\0'; // paranoia
return VG_(get_fnname_kind)(buf);
} else {
@@ -1275,7 +1282,9 @@
{
Bool ok;
vg_assert(n_dname > 1);
- ok = get_sym_name ( /*demangle*/False, data_addr, dname, n_dname,
+ ok = get_sym_name ( /*C++-demangle*/False, /*Z-demangle*/False,
+ /*below-main-renaming*/False,
+ data_addr, dname, n_dname,
/*match_anywhere_in_sym*/True,
/*show offset?*/False,
/*data syms only please*/False,
Modified: trunk/coregrind/m_demangle/demangle.c
===================================================================
--- trunk/coregrind/m_demangle/demangle.c 2009-02-11 01:10:43 UTC (rev 9137)
+++ trunk/coregrind/m_demangle/demangle.c 2009-02-11 06:06:10 UTC (rev 9138)
@@ -29,7 +29,6 @@
*/
#include "pub_core_basics.h"
-#include "pub_core_debuginfo.h" // XXX: circular dependency
#include "pub_core_demangle.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcbase.h"
@@ -87,34 +86,31 @@
/* This is the main, standard demangler entry point. */
-void VG_(demangle) ( Bool do_cxx_demangle,
+void VG_(demangle) ( Bool do_cxx_demangling, Bool do_z_demangling,
Char* orig, Char* result, Int result_size )
{
# define N_ZBUF 4096
HChar* demangled = NULL;
HChar z_demangled[N_ZBUF];
- if (!VG_(clo_demangle)) {
- VG_(strncpy_safely)(result, orig, result_size);
- return;
- }
-
- /* Undo (2) */
- /* Demangling was requested. First see if it's a Z-mangled
- intercept specification. The fastest way is just to attempt a
- Z-demangling (with NULL soname buffer, since we're not
+ /* Possibly undo (2) */
+ /* Z-Demangling was requested.
+ The fastest way to see if it's a Z-mangled name is just to attempt
+ to Z-demangle it (with NULL for the soname buffer, since we're not
interested in that). */
- if (VG_(maybe_Z_demangle)( orig, NULL,0,/*soname*/
- z_demangled, N_ZBUF, NULL)) {
- orig = z_demangled;
+ if (do_z_demangling) {
+ if (VG_(maybe_Z_demangle)( orig, NULL,0,/*soname*/
+ z_demangled, N_ZBUF, NULL)) {
+ orig = z_demangled;
+ }
}
/* Possibly undo (1) */
- if (do_cxx_demangle)
+ if (do_cxx_demangling && VG_(clo_demangle)) {
demangled = ML_(cplus_demangle) ( orig, DMGL_ANSI | DMGL_PARAMS );
- else
+ } else {
demangled = NULL;
-
+ }
if (demangled) {
VG_(strncpy_safely)(result, demangled, result_size);
VG_(arena_free) (VG_AR_DEMANGLE, demangled);
@@ -127,19 +123,6 @@
// very rarely (ie. I've heard of it twice in 3 years), the demangler
// does leak. But, we can't do much about it, and it's not a disaster,
// so we just let it slide without aborting or telling the user.
-
- /* Do the below-main hack */
- // Finally, to reduce the endless nuisance of multiple different names
- // for "the frame below main()" screwing up the testsuite, change all
- // known incarnations of said into a single name, "(below main)", if
- // --show-below-main=yes.
- // XXX: this makes a circular dependency between m_demangle and
- // m_debuginfo.
- if ( ! VG_(clo_show_below_main) &&
- Vg_FnNameBelowMain == VG_(get_fnname_kind)(result))
- {
- VG_(strncpy_safely)(result, "(below main)", result_size);
- }
# undef N_ZBUF
}
Modified: trunk/coregrind/m_errormgr.c
===================================================================
--- trunk/coregrind/m_errormgr.c 2009-02-11 01:10:43 UTC (rev 9137)
+++ trunk/coregrind/m_errormgr.c 2009-02-11 06:06:10 UTC (rev 9138)
@@ -404,7 +404,7 @@
{
static UChar buf[ERRTXT_LEN];
- if ( VG_(get_fnname_Z_demangle_only) (ip, buf, ERRTXT_LEN) ) {
+ if ( VG_(get_fnname_no_cxx_demangle) (ip, buf, ERRTXT_LEN) ) {
VG_(printf)(" fun:%s\n", buf);
} else if ( VG_(get_objname)(ip, buf, ERRTXT_LEN) ) {
VG_(printf)(" obj:%s\n", buf);
@@ -1210,12 +1210,12 @@
case FunName:
/* Get the function name into 'caller_name', or "???"
if unknown. */
- // Nb: mangled names used in suppressions. Do, though,
+ // Nb: C++-mangled names are used in suppressions. Do, though,
// Z-demangle them, since otherwise it's possible to wind
// up comparing "malloc" in the suppression against
// "_vgrZU_libcZdsoZa_malloc" in the backtrace, and the
// two of them need to be made to match.
- if (!VG_(get_fnname_Z_demangle_only)(ip, caller_name, ERRTXT_LEN))
+ if (!VG_(get_fnname_no_cxx_demangle)(ip, caller_name, ERRTXT_LEN))
VG_(strcpy)(caller_name, "???");
break;
default:
Modified: trunk/coregrind/m_stacktrace.c
===================================================================
--- trunk/coregrind/m_stacktrace.c 2009-02-11 01:10:43 UTC (rev 9137)
+++ trunk/coregrind/m_stacktrace.c 2009-02-11 06:06:10 UTC (rev 9138)
@@ -337,8 +337,8 @@
UChar buf_lr[M_VG_ERRTXT], buf_ip[M_VG_ERRTXT];
/* The following conditional looks grossly inefficient and
surely could be majorly improved, with not much effort. */
- if (VG_(get_fnname_nodemangle) (lr, buf_lr, M_VG_ERRTXT))
- if (VG_(get_fnname_nodemangle) (ip, buf_ip, M_VG_ERRTXT))
+ if (VG_(get_fnname_raw) (lr, buf_lr, M_VG_ERRTXT))
+ if (VG_(get_fnname_raw) (ip, buf_ip, M_VG_ERRTXT))
if (VG_(strncmp)(buf_lr, buf_ip, M_VG_ERRTXT))
lr_is_first_RA = True;
# undef M_VG_ERRTXT
Modified: trunk/coregrind/pub_core_debuginfo.h
===================================================================
--- trunk/coregrind/pub_core_debuginfo.h 2009-02-11 01:10:43 UTC (rev 9137)
+++ trunk/coregrind/pub_core_debuginfo.h 2009-02-11 06:06:10 UTC (rev 9138)
@@ -87,9 +87,19 @@
extern void VG_(di_discard_ALL_debuginfo)( void );
-extern Bool VG_(get_fnname_nodemangle)( Addr a,
- Char* fnname, Int n_fnname );
+/* Like VG_(get_fnname), but it does not do C++ demangling nor Z-demangling
+ * nor below-main renaming.
+ * It should not be used for any names that will be shown to users.
+ * It should only be used in cases where the names of interest will have
+ * particular (ie. non-mangled) forms, or the mangled form is acceptable. */
+extern
+Bool VG_(get_fnname_raw) ( Addr a, Char* buf, Int nbuf );
+/* Like VG_(get_fnname), but without C++ demangling. (But it does
+ * Z-demangling and below-main renaming.) */
+extern
+Bool VG_(get_fnname_no_cxx_demangle) ( Addr a, Char* buf, Int nbuf );
+
/* Use DWARF2/3 CFA information to do one step of stack unwinding. */
extern Bool VG_(use_CF_info) ( /*MOD*/Addr* ipP,
/*MOD*/Addr* spP,
@@ -102,12 +112,6 @@
guest_code_addr. Returns 0 if not known. */
extern Addr VG_(get_tocptr) ( Addr guest_code_addr );
-/* This is only available to core... don't demangle C++ names, but do
- do Z-demangling, match anywhere in function, and don't show
- offsets. */
-extern
-Bool VG_(get_fnname_Z_demangle_only) ( Addr a, Char* buf, Int nbuf );
-
/* Map a function name to its entry point and toc pointer. Is done by
sequential search of all symbol tables, so is very slow. To
mitigate the worst performance effects, you may specify a soname
Modified: trunk/coregrind/pub_core_demangle.h
===================================================================
--- trunk/coregrind/pub_core_demangle.h 2009-02-11 01:10:43 UTC (rev 9137)
+++ trunk/coregrind/pub_core_demangle.h 2009-02-11 06:06:10 UTC (rev 9138)
@@ -36,15 +36,11 @@
// Z-encoded names.
//--------------------------------------------------------------------
-/* This is the main, standard demangler entry point. It does three things:
- * (1) undoes Z-encoding;
- * (2) undoes C++ demangling, if 'do_cxx_demangle' is True
- * (3) converts "below main" names (eg. '__libc_start_main') to "(below
- * main)", if --show-below-main=no.
- */
-
+/* This is the main, standard demangler entry point. It does two things:
+ * (1) undoes Z-encoding, if "do_z_demangle" is True;
+ * (2) undoes C++ demangling, if 'do_cxx_demangle' is True. */
extern
-void VG_(demangle) ( Bool do_cxx_demangle,
+void VG_(demangle) ( Bool do_cxx_demangling, Bool do_z_demangling,
Char* orig, Char* result, Int result_size );
/* Demangle a Z-encoded name as described in pub_tool_redir.h.
|
|
From: <sv...@va...> - 2009-02-11 01:10:54
|
Author: njn
Date: 2009-02-11 01:10:43 +0000 (Wed, 11 Feb 2009)
New Revision: 9137
Log:
Merge r9135 (avoid renaming files when installing them) from trunk, and
update Darwin-specific launcher code accordingly.
Modified:
branches/DARWIN/Makefile.install.am
branches/DARWIN/auxprogs/Makefile.am
branches/DARWIN/coregrind/Makefile.am
branches/DARWIN/coregrind/launcher-aix5.c
branches/DARWIN/coregrind/launcher-darwin.c
branches/DARWIN/coregrind/launcher-linux.c
branches/DARWIN/coregrind/m_initimg/initimg-aix5.c
branches/DARWIN/coregrind/m_initimg/initimg-darwin.c
branches/DARWIN/coregrind/m_initimg/initimg-linux.c
branches/DARWIN/coregrind/m_ume/elf.c
branches/DARWIN/memcheck/docs/mc-manual.xml
Modified: branches/DARWIN/Makefile.install.am
===================================================================
--- branches/DARWIN/Makefile.install.am 2009-02-11 00:50:18 UTC (rev 9136)
+++ branches/DARWIN/Makefile.install.am 2009-02-11 01:10:43 UTC (rev 9137)
@@ -1,40 +1,22 @@
# This is used by coregrind/Makefile.am and Makefile.tool.am for doing
-# "in-place" installs. It copies $(noinst_PROGRAMS) into $inplacedir, doing
-# some magic renaming as it does.
-# The similar code below explains how the magic sed commands work.
+# "in-place" installs. It copies $(noinst_PROGRAMS) into $inplacedir.
all-local:
if [ -n "$(noinst_PROGRAMS)" ] ; then \
for f in $(noinst_PROGRAMS); do \
- name=`echo $$f | sed -e 's/-\([^-]*-[^-.]*\)\(\..*\)\{0,1\}$$/\2/'`; \
- plat=`echo $$f | sed -e 's/^.*-\([^-]*-[^-.]*\)\(\..*\)\{0,1\}$$/\1/'`; \
- mkdir -p $(inplacedir)/$$plat; \
- rm -f $(inplacedir)/$$plat/$$name; \
- ln -f -s ../../$(subdir)/$$f $(inplacedir)/$$plat/$$name; \
+ mkdir -p $(inplacedir); \
+ rm -f $(inplacedir)/$$f; \
+ ln -f -s ../$(subdir)/$$f $(inplacedir); \
done ; \
fi
# This is used by coregrind/Makefile.am and by <tool>/Makefile.am for doing
-# "make install". It copies $(noinst_PROGRAMS) into $prefix/lib/valgrind/,
-# doing some magic renaming as it does.
+# "make install". It copies $(noinst_PROGRAMS) into $prefix/lib/valgrind/.
# It needs to be depended on by an 'install-exec-local' rule.
-#
-# Details about the renaming: the loop copies a bunch of files with
-# names of the form wurble-arch-os to $prefix/lib/valgrind/arch-os/wurble.
-# There is some complexity in the sed mangling because wurble may itself
-# contain a dash, which must be ignored. For example we want
-# exp-omega-x86-linux
-# to be installed in
-# $prefix/lib/valgrind/x86-linux/exp-omega
-# and not in
-# $prefix/lib/valgrind/omega-x86-linux/exp
-# or similarly mutant place.
install-exec-local-programs:
if [ -n "$(noinst_PROGRAMS)" ] ; then \
for f in $(noinst_PROGRAMS); do \
- name=`echo $$f | sed -e 's/-\([^-]*-[^-.]*\)\(\..*\)\{0,1\}$$/\2/'`; \
- plat=`echo $$f | sed -e 's/^.*-\([^-]*-[^-.]*\)\(\..*\)\{0,1\}$$/\1/'`; \
- $(mkinstalldirs) $(DESTDIR)$(valdir)/$$plat; \
- $(INSTALL_PROGRAM) $$f $(DESTDIR)$(valdir)/$$plat/$$name; \
+ $(mkinstalldirs) $(DESTDIR)$(valdir); \
+ $(INSTALL_PROGRAM) $$f $(DESTDIR)$(valdir); \
done ; \
fi
Modified: branches/DARWIN/auxprogs/Makefile.am
===================================================================
--- branches/DARWIN/auxprogs/Makefile.am 2009-02-11 00:50:18 UTC (rev 9136)
+++ branches/DARWIN/auxprogs/Makefile.am 2009-02-11 01:10:43 UTC (rev 9137)
@@ -91,12 +91,12 @@
install-exec-local:
if BUILD_MPIWRAP_PRI
- $(mkinstalldirs) $(DESTDIR)$(valdir)/@VGCONF_ARCH_PRI@-@VGCONF_OS@; \
- $(INSTALL_PROGRAM) ./libmpiwrap-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so $(DESTDIR)$(valdir)/@VGCONF_ARCH_PRI@-@VGCONF_OS@/libmpiwrap.so;
+ $(mkinstalldirs) $(DESTDIR)$(valdir); \
+ $(INSTALL_PROGRAM) ./libmpiwrap-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so $(DESTDIR)$(valdir);
endif
if BUILD_MPIWRAP_SEC
- $(mkinstalldirs) $(DESTDIR)$(valdir)/@VGCONF_ARCH_SEC@-@VGCONF_OS@; \
- $(INSTALL_PROGRAM) ./libmpiwrap-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so $(DESTDIR)$(valdir)/@VGCONF_ARCH_SEC@-@VGCONF_OS@/libmpiwrap.so;
+ $(mkinstalldirs) $(DESTDIR)$(valdir); \
+ $(INSTALL_PROGRAM) ./libmpiwrap-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so $(DESTDIR)$(valdir);
endif
Modified: branches/DARWIN/coregrind/Makefile.am
===================================================================
--- branches/DARWIN/coregrind/Makefile.am 2009-02-11 00:50:18 UTC (rev 9136)
+++ branches/DARWIN/coregrind/Makefile.am 2009-02-11 01:10:43 UTC (rev 9137)
@@ -39,39 +39,56 @@
default.supp: $(SUPP_FILES)
-noinst_LIBRARIES =
-LIBPLATFORMS =
+noinst_PROGRAMS =
+pkglib_LIBRARIES =
+LIBVEX =
+
if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
-noinst_LIBRARIES += libcoregrind_x86_linux.a libreplacemalloc_toolpreload_x86_linux.a
-LIBPLATFORMS += x86_linux
+noinst_PROGRAMS += vgpreload_core-x86-linux.so
+pkglib_LIBRARIES += libcoregrind_x86_linux.a libreplacemalloc_toolpreload_x86_linux.a
+LIBVEX += libvex_x86_linux.a
endif
+
if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
-noinst_LIBRARIES += libcoregrind_amd64_linux.a libreplacemalloc_toolpreload_amd64_linux.a
-LIBPLATFORMS += amd64_linux
+noinst_PROGRAMS += vgpreload_core-amd64-linux.so
+pkglib_LIBRARIES += libcoregrind_amd64_linux.a libreplacemalloc_toolpreload_amd64_linux.a
+LIBVEX += libvex_amd64_linux.a
endif
+
if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
-noinst_LIBRARIES += libcoregrind_ppc32_linux.a libreplacemalloc_toolpreload_ppc32_linux.a
-LIBPLATFORMS += ppc32_linux
+noinst_PROGRAMS += vgpreload_core-ppc32-linux.so
+pkglib_LIBRARIES += libcoregrind_ppc32_linux.a libreplacemalloc_toolpreload_ppc32_linux.a
+LIBVEX += libvex_ppc32_linux.a
endif
+
if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
-noinst_LIBRARIES += libcoregrind_ppc64_linux.a libreplacemalloc_toolpreload_ppc64_linux.a
-LIBPLATFORMS += ppc64_linux
+noinst_PROGRAMS += vgpreload_core-ppc64-linux.so
+pkglib_LIBRARIES += libcoregrind_ppc64_linux.a libreplacemalloc_toolpreload_ppc64_linux.a
+LIBVEX += libvex_ppc64_linux.a
endif
+
if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
-noinst_LIBRARIES += libcoregrind_ppc32_aix5.a libreplacemalloc_toolpreload_ppc32_aix5.a
-LIBPLATFORMS += ppc32_aix5
+noinst_PROGRAMS += vgpreload_core-ppc32-aix5.so
+pkglib_LIBRARIES += libcoregrind_ppc32_aix5.a libreplacemalloc_toolpreload_ppc32_aix5.a
+LIBVEX += libvex_ppc32_aix5.a
endif
+
if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
-noinst_LIBRARIES += libcoregrind_ppc64_aix5.a libreplacemalloc_toolpreload_ppc64_aix5.a
-LIBPLATFORMS += ppc64_aix5
+noinst_PROGRAMS += vgpreload_core-ppc64-aix5.so
+pkglib_LIBRARIES += libcoregrind_ppc64_aix5.a libreplacemalloc_toolpreload_ppc64_aix5.a
+LIBVEX += libvex_ppc64_aix5.a
endif
+
if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
-noinst_LIBRARIES += libcoregrind_x86_darwin.a libreplacemalloc_toolpreload_x86_darwin.a
-LIBPLATFORMS += x86_darwin
+noinst_PROGRAMS += vgpreload_core-x86-darwin.so
+pkglib_LIBRARIES += libcoregrind_x86_darwin.a libreplacemalloc_toolpreload_x86_darwin.a
+LIBVEX += libvex_x86_darwin.a
endif
+
if VGCONF_PLATFORMS_INCLUDE_AMD64_DARWIN
-noinst_LIBRARIES += libcoregrind_amd64_darwin.a libreplacemalloc_toolpreload_amd64_darwin.a
-LIBPLATFORMS += amd64_darwin
+noinst_PROGRAMS += vgpreload_core-amd64-darwin.so
+pkglib_LIBRARIES += libcoregrind_amd64_darwin.a libreplacemalloc_toolpreload_amd64_darwin.a
+LIBVEX += libvex_amd64_darwin.a
endif
@@ -161,32 +178,6 @@
#----------------------------------------------------------
-noinst_PROGRAMS =
-if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
-noinst_PROGRAMS += vgpreload_core-x86-linux.so
-endif
-if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
-noinst_PROGRAMS += vgpreload_core-amd64-linux.so
-endif
-if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
-noinst_PROGRAMS += vgpreload_core-ppc32-linux.so
-endif
-if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
-noinst_PROGRAMS += vgpreload_core-ppc64-linux.so
-endif
-if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
-noinst_PROGRAMS += vgpreload_core-ppc32-aix5.so
-endif
-if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
-noinst_PROGRAMS += vgpreload_core-ppc64-aix5.so
-endif
-if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
-noinst_PROGRAMS += vgpreload_core-x86-darwin.so
-endif
-if VGCONF_PLATFORMS_INCLUDE_AMD64_DARWIN
-noinst_PROGRAMS += vgpreload_core-amd64-darwin.so
-endif
-
noinst_HEADERS = \
$(mach_hdrs) \
pub_core_aspacemgr.h \
@@ -597,19 +588,11 @@
$(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" clean
rm -f $(mach_srcs) $(mach_server_srcs) $(mach_hdrs)
-# Nb: The loop installs some .a files for possible use by standalone tools
-# into the correct (target-specific) lib dirs at install time.
-# $(LIBPLATFORMS) will look like this:
-# x86_linux amd64_linux
-# pD and pU are the (arch,os) target pairs separated by a dash (pD) or
-# an underscore (pU) respectively, eg amd64-linux (pD) and amd64_linux (pU).
-# It then copies the libraries to the right places.
+# Nb: The loop installs the libvex library for possible use by standalone
+# tools.
install-exec-local: install-exec-local-programs
- for pU in $(LIBPLATFORMS) ; do \
- pD=`echo $$pU | sed -e 's/_/-/g'` ; \
- $(INSTALL_DATA) libcoregrind_$$pU.a $(DESTDIR)$(valdir)/$$pD/libcoregrind.a ; \
- $(INSTALL_DATA) libreplacemalloc_toolpreload_$$pU.a $(DESTDIR)$(valdir)/$$pD/libreplacemalloc_toolpreload.a ; \
- $(INSTALL_DATA) @VEX_DIR@/libvex_$$pU.a $(DESTDIR)$(valdir)/$$pD/libvex.a ; \
+ for v in $(LIBVEX) ; do \
+ $(INSTALL_DATA) @VEX_DIR@/$$v $(DESTDIR)$(valdir) ; \
done
Modified: branches/DARWIN/coregrind/launcher-aix5.c
===================================================================
--- branches/DARWIN/coregrind/launcher-aix5.c 2009-02-11 00:50:18 UTC (rev 9136)
+++ branches/DARWIN/coregrind/launcher-aix5.c 2009-02-11 01:10:43 UTC (rev 9137)
@@ -1503,7 +1503,7 @@
fprintf(stderr,"%s: malloc of toolfile failed\n", argv[0]);
return 1;
}
- sprintf(toolfile, "%s/%s/%s", valgrind_lib, platform, toolname);
+ sprintf(toolfile, "%s/%s-%s", valgrind_lib, toolname, platform);
if (!file_exists(toolfile)) {
fprintf(stderr,"%s: can't stat %s\n", argv[0], toolfile);
Modified: branches/DARWIN/coregrind/launcher-darwin.c
===================================================================
--- branches/DARWIN/coregrind/launcher-darwin.c 2009-02-11 00:50:18 UTC (rev 9136)
+++ branches/DARWIN/coregrind/launcher-darwin.c 2009-02-11 01:10:43 UTC (rev 9137)
@@ -278,17 +278,18 @@
valgrind_lib = ( cp == NULL ? VG_LIBDIR : cp );
}
- /* Find installed architectures. */
+ /* Find installed architectures. Use vgpreload_core-<platform>.so as the
+ * indicator of whether the platform is installed. */
for (i = 0; i < valid_archs_count; i++) {
- char *tooldir;
- asprintf(&tooldir, "%s/%s-darwin", valgrind_lib, valid_archs[i].valgrind_name);
- if (access(tooldir, R_OK|X_OK) != 0) {
+ char *vgpreload_core;
+ asprintf(&vgpreload_core, "%s/vgpreload_core-%s-darwin.so", valgrind_lib, valid_archs[i].valgrind_name);
+ if (access(vgpreload_core, R_OK|X_OK) != 0) {
VG_(debugLog)(1, "launcher", "arch '%s' IS NOT installed\n", valid_archs[i].valgrind_name);
bzero(&valid_archs[i], sizeof(valid_archs[i]));
} else {
VG_(debugLog)(1, "launcher", "arch '%s' IS installed\n", valid_archs[i].valgrind_name);
}
- free(tooldir);
+ free(vgpreload_core);
}
/* Find the "default" arch (VGCONF_ARCH_PRI from configure).
@@ -305,7 +306,7 @@
break;
}
}
- if (i == valid_archs_count) barf("Unknown VG_PLATFORM '%s'", VG_PLATFORM);
+ if (i == valid_archs_count) barf("Unknown/uninstalled VG_PLATFORM '%s'", VG_PLATFORM);
assert(NULL != default_arch);
assert(0 != default_cputype);
@@ -400,9 +401,9 @@
new_argv[new_argc++] = NULL;
/* Build the stage2 invokation, and execve it. Bye! */
- asprintf(&toolfile, "%s/%s-darwin/%s", valgrind_lib, arch, toolname);
+ asprintf(&toolfile, "%s/%s-%s-darwin", valgrind_lib, toolname, arch);
if (access(toolfile, R_OK|X_OK) != 0) {
- barf("tool '%s' not installed (%s)", toolname, toolfile);
+ barf("tool '%s' not installed (%s) (%s)", toolname, toolfile, strerror(errno));
}
VG_(debugLog)(1, "launcher", "launching %s\n", toolfile);
Modified: branches/DARWIN/coregrind/launcher-linux.c
===================================================================
--- branches/DARWIN/coregrind/launcher-linux.c 2009-02-11 00:50:18 UTC (rev 9136)
+++ branches/DARWIN/coregrind/launcher-linux.c 2009-02-11 01:10:43 UTC (rev 9137)
@@ -309,7 +309,7 @@
toolfile = malloc(strlen(valgrind_lib) + strlen(toolname) + strlen(platform) + 3);
if (toolfile == NULL)
barf("malloc of toolfile failed.");
- sprintf(toolfile, "%s/%s/%s", valgrind_lib, platform, toolname);
+ sprintf(toolfile, "%s/%s-%s", valgrind_lib, toolname, platform);
VG_(debugLog)(1, "launcher", "launching %s\n", toolfile);
Modified: branches/DARWIN/coregrind/m_initimg/initimg-aix5.c
===================================================================
--- branches/DARWIN/coregrind/m_initimg/initimg-aix5.c 2009-02-11 00:50:18 UTC (rev 9136)
+++ branches/DARWIN/coregrind/m_initimg/initimg-aix5.c 2009-02-11 01:10:43 UTC (rev 9137)
@@ -71,8 +71,8 @@
{
/* Set up an AIX5PreloadPage structure with the names of
- $VALGRIND_LIB/PLATFORM/vgpreload_core.so
- $VALGRIND_LIB/PLATFORM/vgpreload_TOOL.so, if it exists
+ $VALGRIND_LIB/vgpreload_core_PLATFORM.so
+ $VALGRIND_LIB/vgpreload_TOOL_PLATFORM.so, if it exists
xxx in "LD_PRELOAD=xxx", if it exists
The client is started by running (on the simulator, of course)
@@ -83,9 +83,9 @@
stored in the AIX5PreloadPage. Finally, we jump to the client's
entry point address.
*/
- const HChar* _so = ".so";
- const HChar* vgpreload_ = "vgpreload_";
- const HChar* vgpreload_core_so = "vgpreload_core.so";
+ const HChar* _so = ".so";
+ const HChar* vgpreload_ = "vgpreload_";
+ const HChar* core = "core";
const HChar* errmsg_str
= "valgrind: FATAL: core/tool/LD_PRELOAD= "
"preload failed.\n";
@@ -108,10 +108,10 @@
vg_assert( iicii.toolname );
pltool_len = VG_(strlen)( VG_(libdir) )
+ 1 /*slash*/
- + VG_(strlen)(VG_PLATFORM)
- + 1 /*slash*/
+ VG_(strlen)( vgpreload_ )
+ VG_(strlen)( iicii.toolname )
+ + 1 /*dash*/
+ + VG_(strlen)(VG_PLATFORM)
+ VG_(strlen)( _so )
+ 1 /*NUL*/;
vg_assert(pltool_len > 0);
@@ -119,28 +119,32 @@
pltool_str[0] = 0;
VG_(strcat)( pltool_str, VG_(libdir) );
VG_(strcat)( pltool_str, "/" );
- VG_(strcat)( pltool_str, VG_PLATFORM );
- VG_(strcat)( pltool_str, "/" );
VG_(strcat)( pltool_str, vgpreload_ );
VG_(strcat)( pltool_str, iicii.toolname );
+ VG_(strcat)( pltool_str, "-" );
+ VG_(strcat)( pltool_str, VG_PLATFORM );
VG_(strcat)( pltool_str, _so );
vg_assert( pltool_str[pltool_len-1] == 0);
vg_assert( VG_(strlen)(pltool_str) == pltool_len-1 );
plcore_len = VG_(strlen)( VG_(libdir) )
+ 1 /*slash*/
+ + VG_(strlen)( vgpreload_ )
+ + VG_(strlen)( core )
+ + 1 /*dash*/
+ VG_(strlen)(VG_PLATFORM)
- + 1 /*slash*/
- + VG_(strlen)( vgpreload_core_so )
+ + VG_(strlen)(_so)
+ 1 /*NUL*/;
vg_assert(plcore_len > 0);
plcore_str = VG_(malloc)( "initimg-aix5.ici.2", plcore_len );
plcore_str[0] = 0;
VG_(strcat)( plcore_str, VG_(libdir) );
VG_(strcat)( plcore_str, "/" );
+ VG_(strcat)( plcore_str, vgpreload_ );
+ VG_(strcat)( plcore_str, core );
+ VG_(strcat)( plcore_str, "-" );
VG_(strcat)( plcore_str, VG_PLATFORM );
- VG_(strcat)( plcore_str, "/" );
- VG_(strcat)( plcore_str, vgpreload_core_so );
+ VG_(strcat)( plcore_str, _so );
vg_assert( plcore_str[plcore_len-1] == 0 );
vg_assert( VG_(strlen)(plcore_str) == plcore_len-1 );
@@ -168,7 +172,7 @@
if (0 != VG_(access)(plcore_str, True,False,True))
VG_(err_config_error)("Can't find core preload "
- "(vgpreload_core.so)");
+ "(vgpreload_core-<platform>.so)");
have_tool_so = 0 == VG_(access)(pltool_str, True,False,True);
@@ -520,18 +524,18 @@
/* Take the strings that this prints out and feed them
to /usr/sbin/execerror. For example, it might print
- (ld 3 1 __libc_freeres /foo/bar/ppc32-aix5/vgpreload_core.so
+ (ld 3 1 __libc_freeres /foo/bar/vgpreload_core-ppc32-aix5.so
in which case
$ execerror xyzzy \
- "(ld 3 1 __libc_freeres /foo/bar/ppc32-aix5/vgpreload_core.so"
+ "(ld 3 1 __libc_freeres /foo/bar/vgpreload_core-ppc32-aix5.so"
gets you
Could not load program xyzzy:
rtld: 0712-001 Symbol __libc_freeres was referenced
- from module /foo/bar/ppc32-aix5/vgpreload_core.so(),
+ from module /foo/bar/vgpreload_core-ppc32-aix5.so(),
but a runtime definition
of the symbol was not found.
*/
Modified: branches/DARWIN/coregrind/m_initimg/initimg-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_initimg/initimg-darwin.c 2009-02-11 00:50:18 UTC (rev 9136)
+++ branches/DARWIN/coregrind/m_initimg/initimg-darwin.c 2009-02-11 01:10:43 UTC (rev 9137)
@@ -95,8 +95,8 @@
/* Prepare the client's environment. This is basically a copy of our
environment, except:
- DYLD_INSERT_LIBRARIES=$VALGRIND_LIB/PLATFORM/vgpreload_core.so:
- ($VALGRIND_LIB/PLATFORM/vgpreload_TOOL.so:)?
+ DYLD_INSERT_LIBRARIES=$VALGRIND_LIB/vgpreload_core-PLATFORM.so:
+ ($VALGRIND_LIB/vgpreload_TOOL-PLATFORM.so:)?
DYLD_INSERT_LIBRARIES
If this is missing, then it is added.
@@ -143,18 +143,18 @@
HChar* preload_string = VG_(malloc)("initimg-darwin.sce.1", preload_string_len);
vg_assert(preload_string);
- /* Determine if there's a vgpreload_<tool>.so file, and setup
+ /* Determine if there's a vgpreload_<tool>_<platform>.so file, and setup
preload_string. */
preload_tool_path = VG_(malloc)("initimg-darwin.sce.2", preload_tool_path_len);
vg_assert(preload_tool_path);
VG_(snprintf)(preload_tool_path, preload_tool_path_len,
- "%s/%s/vgpreload_%s.so", VG_(libdir), VG_PLATFORM, toolname);
+ "%s/vgpreload_%s-%s.so", VG_(libdir), toolname, VG_PLATFORM);
if (VG_(access)(preload_tool_path, True/*r*/, False/*w*/, False/*x*/) == 0) {
- VG_(snprintf)(preload_string, preload_string_len, "%s/%s/%s.so:%s",
- VG_(libdir), VG_PLATFORM, preload_core, preload_tool_path);
+ VG_(snprintf)(preload_string, preload_string_len, "%s/%s-%s.so:%s",
+ VG_(libdir), preload_core, VG_PLATFORM, preload_tool_path);
} else {
- VG_(snprintf)(preload_string, preload_string_len, "%s/%s/%s.so",
- VG_(libdir), VG_PLATFORM, preload_core);
+ VG_(snprintf)(preload_string, preload_string_len, "%s/%s-%s.so",
+ VG_(libdir), preload_core, VG_PLATFORM);
}
VG_(free)(preload_tool_path);
Modified: branches/DARWIN/coregrind/m_initimg/initimg-linux.c
===================================================================
--- branches/DARWIN/coregrind/m_initimg/initimg-linux.c 2009-02-11 00:50:18 UTC (rev 9136)
+++ branches/DARWIN/coregrind/m_initimg/initimg-linux.c 2009-02-11 01:10:43 UTC (rev 9137)
@@ -202,8 +202,8 @@
/* Prepare the client's environment. This is basically a copy of our
environment, except:
- LD_PRELOAD=$VALGRIND_LIB/PLATFORM/vgpreload_core.so:
- ($VALGRIND_LIB/PLATFORM/vgpreload_TOOL.so:)?
+ LD_PRELOAD=$VALGRIND_LIB/vgpreload_core-PLATFORM.so:
+ ($VALGRIND_LIB/vgpreload_TOOL-PLATFORM.so:)?
$LD_PRELOAD
If this is missing, then it is added.
@@ -242,18 +242,18 @@
preload_string_len);
vg_assert(preload_string);
- /* Determine if there's a vgpreload_<tool>.so file, and setup
+ /* Determine if there's a vgpreload_<tool>_<platform>.so file, and setup
preload_string. */
preload_tool_path = VG_(malloc)("initimg-linux.sce.2", preload_tool_path_len);
vg_assert(preload_tool_path);
VG_(snprintf)(preload_tool_path, preload_tool_path_len,
- "%s/%s/vgpreload_%s.so", VG_(libdir), VG_PLATFORM, toolname);
+ "%s/vgpreload_%s-%s.so", VG_(libdir), toolname, VG_PLATFORM);
if (VG_(access)(preload_tool_path, True/*r*/, False/*w*/, False/*x*/) == 0) {
- VG_(snprintf)(preload_string, preload_string_len, "%s/%s/%s.so:%s",
- VG_(libdir), VG_PLATFORM, preload_core, preload_tool_path);
+ VG_(snprintf)(preload_string, preload_string_len, "%s/%s-%s.so:%s",
+ VG_(libdir), preload_core, VG_PLATFORM, preload_tool_path);
} else {
- VG_(snprintf)(preload_string, preload_string_len, "%s/%s/%s.so",
- VG_(libdir), VG_PLATFORM, preload_core);
+ VG_(snprintf)(preload_string, preload_string_len, "%s/%s-%s.so",
+ VG_(libdir), preload_core, VG_PLATFORM);
}
VG_(free)(preload_tool_path);
Modified: branches/DARWIN/coregrind/m_ume/elf.c
===================================================================
--- branches/DARWIN/coregrind/m_ume/elf.c 2009-02-11 00:50:18 UTC (rev 9136)
+++ branches/DARWIN/coregrind/m_ume/elf.c 2009-02-11 01:10:43 UTC (rev 9137)
@@ -44,7 +44,9 @@
#include "priv_ume.h"
-
+// DDD: ranlib complains about there being no symbols in this file, because
+// on Darwin the file is empty. Consider selecting/not selecting this file
+// from within coregrind/Makefile.am instead.
#if defined(HAVE_ELF)
/* --- !!! --- EXTERNAL HEADERS start --- !!! --- */
Modified: branches/DARWIN/memcheck/docs/mc-manual.xml
===================================================================
--- branches/DARWIN/memcheck/docs/mc-manual.xml 2009-02-11 00:50:18 UTC (rev 9136)
+++ branches/DARWIN/memcheck/docs/mc-manual.xml 2009-02-11 01:10:43 UTC (rev 9137)
@@ -1463,7 +1463,7 @@
this:</para>
<programlisting><![CDATA[
-LD_PRELOAD=$prefix/lib/valgrind/<platform>/libmpiwrap.so \
+LD_PRELOAD=$prefix/lib/valgrind/libmpiwrap-<platform>.so \
mpirun [args] $prefix/bin/valgrind ./hello
]]></programlisting>
@@ -1499,7 +1499,7 @@
<programlisting><![CDATA[
MPIWRAP_DEBUG=[wrapper-args] \
- LD_PRELOAD=$prefix/lib/valgrind/<platform>/libmpiwrap.so \
+ LD_PRELOAD=$prefix/lib/valgrind/libmpiwrap-<platform>.so \
mpirun [mpirun-args] \
$prefix/bin/valgrind [valgrind-args] \
[application] [app-args]
@@ -1507,9 +1507,9 @@
<para>As an alternative to
<computeroutput>LD_PRELOAD</computeroutput>ing
-<computeroutput>libmpiwrap.so</computeroutput>, you can simply link it
-to your application if desired. This should not disturb native
-behaviour of your application in any way.</para>
+<computeroutput>libmpiwrap-<platform>.so</computeroutput>, you can
+simply link it to your application if desired. This should not disturb
+native behaviour of your application in any way.</para>
</sect2>
|
|
From: <sv...@va...> - 2009-02-11 00:50:23
|
Author: njn Date: 2009-02-11 00:50:18 +0000 (Wed, 11 Feb 2009) New Revision: 9136 Log: Merge r9134 (minor test filter change) from trunk. Modified: branches/DARWIN/tests/filter_stderr_basic Modified: branches/DARWIN/tests/filter_stderr_basic =================================================================== --- branches/DARWIN/tests/filter_stderr_basic 2009-02-11 00:35:45 UTC (rev 9135) +++ branches/DARWIN/tests/filter_stderr_basic 2009-02-11 00:50:18 UTC (rev 9136) @@ -46,7 +46,7 @@ # complete list of messages in the bash source file siglist.c. # DDD: this used "sed -r", but that isn't supported on Darwin, and getting # the GNU and BSD versions of sed to work similarly is awful. -perl -n -e 'print if !/^(Segmentation fault|Alarm clock|Aborted)( \(core dumped\))?$/' | +perl -n -e 'print if !/^(Segmentation fault|Alarm clock|Aborted|Bus error)( \(core dumped\))?$/' | # Remove any ": dumping core" message as the user might have a # limit set that prevents the core dump |
|
From: <sv...@va...> - 2009-02-11 00:35:50
|
Author: njn
Date: 2009-02-11 00:35:45 +0000 (Wed, 11 Feb 2009)
New Revision: 9135
Log:
Changed the way files are installed. Instead of going into
$INSTALL/<platform>/<filename>, they go to $INSTALL/<filename>-<platform>.
These filenames match those built in the build tree, and so simplifies the
build system signficantly and avoids the horrible sed renamings that were
previously required. This will also help greatly with the treatment of
.dSYM debug directories in the DARWIN branch.
Files affected include:
- preload libraries such as vgpreload_core-<platform>.so and
libmpiwrap-<platform>.so
- libraries such as libcoregrind_<platform>.a
- executables such as memcheck-<platform>
I updated the manual and added a note to the NEWS file about the change,
because it will affect a small number of users.
I did my best to update the AIX launcher/initimg correctly, but it hasn't
been tested.
Modified:
trunk/Makefile.install.am
trunk/NEWS
trunk/auxprogs/Makefile.am
trunk/coregrind/Makefile.am
trunk/coregrind/launcher-aix5.c
trunk/coregrind/launcher-linux.c
trunk/coregrind/m_initimg/initimg-aix5.c
trunk/coregrind/m_initimg/initimg-linux.c
trunk/memcheck/docs/mc-manual.xml
Modified: trunk/Makefile.install.am
===================================================================
--- trunk/Makefile.install.am 2009-02-11 00:21:53 UTC (rev 9134)
+++ trunk/Makefile.install.am 2009-02-11 00:35:45 UTC (rev 9135)
@@ -1,40 +1,22 @@
# This is used by coregrind/Makefile.am and Makefile.tool.am for doing
-# "in-place" installs. It copies $(noinst_PROGRAMS) into $inplacedir, doing
-# some magic renaming as it does.
-# The similar code below explains how the magic sed commands work.
+# "in-place" installs. It copies $(noinst_PROGRAMS) into $inplacedir.
all-local:
if [ -n "$(noinst_PROGRAMS)" ] ; then \
for f in $(noinst_PROGRAMS); do \
- name=`echo $$f | sed -e 's/-\([^-]*-[^-.]*\)\(\..*\)\{0,1\}$$/\2/'`; \
- plat=`echo $$f | sed -e 's/^.*-\([^-]*-[^-.]*\)\(\..*\)\{0,1\}$$/\1/'`; \
- mkdir -p $(inplacedir)/$$plat; \
- rm -f $(inplacedir)/$$plat/$$name; \
- ln -f -s ../../$(subdir)/$$f $(inplacedir)/$$plat/$$name; \
+ mkdir -p $(inplacedir); \
+ rm -f $(inplacedir)/$$f; \
+ ln -f -s ../$(subdir)/$$f $(inplacedir); \
done ; \
fi
# This is used by coregrind/Makefile.am and by <tool>/Makefile.am for doing
-# "make install". It copies $(noinst_PROGRAMS) into $prefix/lib/valgrind/,
-# doing some magic renaming as it does.
+# "make install". It copies $(noinst_PROGRAMS) into $prefix/lib/valgrind/.
# It needs to be depended on by an 'install-exec-local' rule.
-#
-# Details about the renaming: the loop copies a bunch of files with
-# names of the form wurble-arch-os to $prefix/lib/valgrind/arch-os/wurble.
-# There is some complexity in the sed mangling because wurble may itself
-# contain a dash, which must be ignored. For example we want
-# exp-omega-x86-linux
-# to be installed in
-# $prefix/lib/valgrind/x86-linux/exp-omega
-# and not in
-# $prefix/lib/valgrind/omega-x86-linux/exp
-# or similarly mutant place.
install-exec-local-programs:
if [ -n "$(noinst_PROGRAMS)" ] ; then \
for f in $(noinst_PROGRAMS); do \
- name=`echo $$f | sed -e 's/-\([^-]*-[^-.]*\)\(\..*\)\?$$/\2/'`; \
- plat=`echo $$f | sed -e 's/^.*-\([^-]*-[^-.]*\)\(\..*\)\?$$/\1/'`; \
- $(mkinstalldirs) $(DESTDIR)$(valdir)/$$plat; \
- $(INSTALL_PROGRAM) $$f $(DESTDIR)$(valdir)/$$plat/$$name; \
+ $(mkinstalldirs) $(DESTDIR)$(valdir); \
+ $(INSTALL_PROGRAM) $$f $(DESTDIR)$(valdir); \
done ; \
fi
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2009-02-11 00:21:53 UTC (rev 9134)
+++ trunk/NEWS 2009-02-11 00:35:45 UTC (rev 9135)
@@ -1,6 +1,19 @@
Release 3.5.0 (???)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+* The location of some install files has changed. This should not affect
+ most users. Those who might be affected:
+
+ - For people who use Valgrind with MPI programs, the installed
+ libmpiwrap.so library has moved from $(INSTALL)/<platform>/libmpiwrap.so
+ to $(INSTALL)/libmpiwrap-<platform>.so.
+
+ - For people who distribute standalone Valgrind tools, the installed
+ libraries such as $(INSTALL)/<platform>/libcoregrind.a have moved to
+ $(INSTALL)/libcoregrind-<platform>.a.
+
+ These changes were made to simplify the build system.
+
* Previously, all the distributed suppression (*.supp) files were installed.
Now, only default.supp is installed. This should not affect users as the
other installed suppression files were not read.
Modified: trunk/auxprogs/Makefile.am
===================================================================
--- trunk/auxprogs/Makefile.am 2009-02-11 00:21:53 UTC (rev 9134)
+++ trunk/auxprogs/Makefile.am 2009-02-11 00:35:45 UTC (rev 9135)
@@ -85,12 +85,12 @@
install-exec-local:
if BUILD_MPIWRAP_PRI
- $(mkinstalldirs) $(DESTDIR)$(valdir)/@VGCONF_ARCH_PRI@-@VGCONF_OS@; \
- $(INSTALL_PROGRAM) ./libmpiwrap-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so $(DESTDIR)$(valdir)/@VGCONF_ARCH_PRI@-@VGCONF_OS@/libmpiwrap.so;
+ $(mkinstalldirs) $(DESTDIR)$(valdir); \
+ $(INSTALL_PROGRAM) ./libmpiwrap-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so $(DESTDIR)$(valdir);
endif
if BUILD_MPIWRAP_SEC
- $(mkinstalldirs) $(DESTDIR)$(valdir)/@VGCONF_ARCH_SEC@-@VGCONF_OS@; \
- $(INSTALL_PROGRAM) ./libmpiwrap-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so $(DESTDIR)$(valdir)/@VGCONF_ARCH_SEC@-@VGCONF_OS@/libmpiwrap.so;
+ $(mkinstalldirs) $(DESTDIR)$(valdir); \
+ $(INSTALL_PROGRAM) ./libmpiwrap-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so $(DESTDIR)$(valdir);
endif
Modified: trunk/coregrind/Makefile.am
===================================================================
--- trunk/coregrind/Makefile.am 2009-02-11 00:21:53 UTC (rev 9134)
+++ trunk/coregrind/Makefile.am 2009-02-11 00:35:45 UTC (rev 9135)
@@ -29,31 +29,44 @@
default.supp: $(SUPP_FILES)
-noinst_LIBRARIES =
-LIBPLATFORMS =
+noinst_PROGRAMS =
+pkglib_LIBRARIES =
+LIBVEX =
+
if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
-noinst_LIBRARIES += libcoregrind_x86_linux.a libreplacemalloc_toolpreload_x86_linux.a
-LIBPLATFORMS += x86_linux
+noinst_PROGRAMS += vgpreload_core-x86-linux.so
+pkglib_LIBRARIES += libcoregrind_x86_linux.a libreplacemalloc_toolpreload_x86_linux.a
+LIBVEX += libvex_x86_linux.a
endif
+
if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
-noinst_LIBRARIES += libcoregrind_amd64_linux.a libreplacemalloc_toolpreload_amd64_linux.a
-LIBPLATFORMS += amd64_linux
+noinst_PROGRAMS += vgpreload_core-amd64-linux.so
+pkglib_LIBRARIES += libcoregrind_amd64_linux.a libreplacemalloc_toolpreload_amd64_linux.a
+LIBVEX += libvex_amd64_linux.a
endif
+
if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
-noinst_LIBRARIES += libcoregrind_ppc32_linux.a libreplacemalloc_toolpreload_ppc32_linux.a
-LIBPLATFORMS += ppc32_linux
+noinst_PROGRAMS += vgpreload_core-ppc32-linux.so
+pkglib_LIBRARIES += libcoregrind_ppc32_linux.a libreplacemalloc_toolpreload_ppc32_linux.a
+LIBVEX += libvex_ppc32_linux.a
endif
+
if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
-noinst_LIBRARIES += libcoregrind_ppc64_linux.a libreplacemalloc_toolpreload_ppc64_linux.a
-LIBPLATFORMS += ppc64_linux
+noinst_PROGRAMS += vgpreload_core-ppc64-linux.so
+pkglib_LIBRARIES += libcoregrind_ppc64_linux.a libreplacemalloc_toolpreload_ppc64_linux.a
+LIBVEX += libvex_ppc64_linux.a
endif
+
if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
-noinst_LIBRARIES += libcoregrind_ppc32_aix5.a libreplacemalloc_toolpreload_ppc32_aix5.a
-LIBPLATFORMS += ppc32_aix5
+noinst_PROGRAMS += vgpreload_core-ppc32-aix5.so
+pkglib_LIBRARIES += libcoregrind_ppc32_aix5.a libreplacemalloc_toolpreload_ppc32_aix5.a
+LIBVEX += libvex_ppc32_aix5.a
endif
+
if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
-noinst_LIBRARIES += libcoregrind_ppc64_aix5.a libreplacemalloc_toolpreload_ppc64_aix5.a
-LIBPLATFORMS += ppc64_aix5
+noinst_PROGRAMS += vgpreload_core-ppc64-aix5.so
+pkglib_LIBRARIES += libcoregrind_ppc64_aix5.a libreplacemalloc_toolpreload_ppc64_aix5.a
+LIBVEX += libvex_ppc64_aix5.a
endif
@@ -88,26 +101,6 @@
#----------------------------------------------------------
-noinst_PROGRAMS =
-if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
-noinst_PROGRAMS += vgpreload_core-x86-linux.so
-endif
-if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
-noinst_PROGRAMS += vgpreload_core-amd64-linux.so
-endif
-if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
-noinst_PROGRAMS += vgpreload_core-ppc32-linux.so
-endif
-if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
-noinst_PROGRAMS += vgpreload_core-ppc64-linux.so
-endif
-if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
-noinst_PROGRAMS += vgpreload_core-ppc32-aix5.so
-endif
-if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
-noinst_PROGRAMS += vgpreload_core-ppc64-aix5.so
-endif
-
noinst_HEADERS = \
pub_core_aspacemgr.h \
pub_core_basics.h \
@@ -417,19 +410,11 @@
clean-local:
$(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" clean
-# Nb: The loop installs some .a files for possible use by standalone tools
-# into the correct (target-specific) lib dirs at install time.
-# $(LIBPLATFORMS) will look like this:
-# x86_linux amd64_linux
-# pD and pU are the (arch,os) target pairs separated by a dash (pD) or
-# an underscore (pU) respectively, eg amd64-linux (pD) and amd64_linux (pU).
-# It then copies the libraries to the right places.
+# Nb: The loop installs the libvex library for possible use by standalone
+# tools.
install-exec-local: install-exec-local-programs
- for pU in $(LIBPLATFORMS) ; do \
- pD=`echo $$pU | sed -e 's/_/-/g'` ; \
- $(INSTALL_DATA) libcoregrind_$$pU.a $(DESTDIR)$(valdir)/$$pD/libcoregrind.a ; \
- $(INSTALL_DATA) libreplacemalloc_toolpreload_$$pU.a $(DESTDIR)$(valdir)/$$pD/libreplacemalloc_toolpreload.a ; \
- $(INSTALL_DATA) @VEX_DIR@/libvex_$$pU.a $(DESTDIR)$(valdir)/$$pD/libvex.a ; \
+ for v in $(LIBVEX) ; do \
+ $(INSTALL_DATA) @VEX_DIR@/$$v $(DESTDIR)$(valdir) ; \
done
Modified: trunk/coregrind/launcher-aix5.c
===================================================================
--- trunk/coregrind/launcher-aix5.c 2009-02-11 00:21:53 UTC (rev 9134)
+++ trunk/coregrind/launcher-aix5.c 2009-02-11 00:35:45 UTC (rev 9135)
@@ -1503,7 +1503,7 @@
fprintf(stderr,"%s: malloc of toolfile failed\n", argv[0]);
return 1;
}
- sprintf(toolfile, "%s/%s/%s", valgrind_lib, platform, toolname);
+ sprintf(toolfile, "%s/%s-%s", valgrind_lib, toolname, platform);
if (!file_exists(toolfile)) {
fprintf(stderr,"%s: can't stat %s\n", argv[0], toolfile);
Modified: trunk/coregrind/launcher-linux.c
===================================================================
--- trunk/coregrind/launcher-linux.c 2009-02-11 00:21:53 UTC (rev 9134)
+++ trunk/coregrind/launcher-linux.c 2009-02-11 00:35:45 UTC (rev 9135)
@@ -309,7 +309,7 @@
toolfile = malloc(strlen(valgrind_lib) + strlen(toolname) + strlen(platform) + 3);
if (toolfile == NULL)
barf("malloc of toolfile failed.");
- sprintf(toolfile, "%s/%s/%s", valgrind_lib, platform, toolname);
+ sprintf(toolfile, "%s/%s-%s", valgrind_lib, toolname, platform);
VG_(debugLog)(1, "launcher", "launching %s\n", toolfile);
Modified: trunk/coregrind/m_initimg/initimg-aix5.c
===================================================================
--- trunk/coregrind/m_initimg/initimg-aix5.c 2009-02-11 00:21:53 UTC (rev 9134)
+++ trunk/coregrind/m_initimg/initimg-aix5.c 2009-02-11 00:35:45 UTC (rev 9135)
@@ -71,8 +71,8 @@
{
/* Set up an AIX5PreloadPage structure with the names of
- $VALGRIND_LIB/PLATFORM/vgpreload_core.so
- $VALGRIND_LIB/PLATFORM/vgpreload_TOOL.so, if it exists
+ $VALGRIND_LIB/vgpreload_core_PLATFORM.so
+ $VALGRIND_LIB/vgpreload_TOOL_PLATFORM.so, if it exists
xxx in "LD_PRELOAD=xxx", if it exists
The client is started by running (on the simulator, of course)
@@ -83,9 +83,9 @@
stored in the AIX5PreloadPage. Finally, we jump to the client's
entry point address.
*/
- const HChar* _so = ".so";
- const HChar* vgpreload_ = "vgpreload_";
- const HChar* vgpreload_core_so = "vgpreload_core.so";
+ const HChar* _so = ".so";
+ const HChar* vgpreload_ = "vgpreload_";
+ const HChar* core = "core";
const HChar* errmsg_str
= "valgrind: FATAL: core/tool/LD_PRELOAD= "
"preload failed.\n";
@@ -108,10 +108,10 @@
vg_assert( iicii.toolname );
pltool_len = VG_(strlen)( VG_(libdir) )
+ 1 /*slash*/
- + VG_(strlen)(VG_PLATFORM)
- + 1 /*slash*/
+ VG_(strlen)( vgpreload_ )
+ VG_(strlen)( iicii.toolname )
+ + 1 /*dash*/
+ + VG_(strlen)(VG_PLATFORM)
+ VG_(strlen)( _so )
+ 1 /*NUL*/;
vg_assert(pltool_len > 0);
@@ -119,28 +119,32 @@
pltool_str[0] = 0;
VG_(strcat)( pltool_str, VG_(libdir) );
VG_(strcat)( pltool_str, "/" );
- VG_(strcat)( pltool_str, VG_PLATFORM );
- VG_(strcat)( pltool_str, "/" );
VG_(strcat)( pltool_str, vgpreload_ );
VG_(strcat)( pltool_str, iicii.toolname );
+ VG_(strcat)( pltool_str, "-" );
+ VG_(strcat)( pltool_str, VG_PLATFORM );
VG_(strcat)( pltool_str, _so );
vg_assert( pltool_str[pltool_len-1] == 0);
vg_assert( VG_(strlen)(pltool_str) == pltool_len-1 );
plcore_len = VG_(strlen)( VG_(libdir) )
+ 1 /*slash*/
+ + VG_(strlen)( vgpreload_ )
+ + VG_(strlen)( core )
+ + 1 /*dash*/
+ VG_(strlen)(VG_PLATFORM)
- + 1 /*slash*/
- + VG_(strlen)( vgpreload_core_so )
+ + VG_(strlen)(_so)
+ 1 /*NUL*/;
vg_assert(plcore_len > 0);
plcore_str = VG_(malloc)( "initimg-aix5.ici.2", plcore_len );
plcore_str[0] = 0;
VG_(strcat)( plcore_str, VG_(libdir) );
VG_(strcat)( plcore_str, "/" );
+ VG_(strcat)( plcore_str, vgpreload_ );
+ VG_(strcat)( plcore_str, core );
+ VG_(strcat)( plcore_str, "-" );
VG_(strcat)( plcore_str, VG_PLATFORM );
- VG_(strcat)( plcore_str, "/" );
- VG_(strcat)( plcore_str, vgpreload_core_so );
+ VG_(strcat)( plcore_str, _so );
vg_assert( plcore_str[plcore_len-1] == 0 );
vg_assert( VG_(strlen)(plcore_str) == plcore_len-1 );
@@ -168,7 +172,7 @@
if (0 != VG_(access)(plcore_str, True,False,True))
VG_(err_config_error)("Can't find core preload "
- "(vgpreload_core.so)");
+ "(vgpreload_core-<platform>.so)");
have_tool_so = 0 == VG_(access)(pltool_str, True,False,True);
@@ -520,18 +524,18 @@
/* Take the strings that this prints out and feed them
to /usr/sbin/execerror. For example, it might print
- (ld 3 1 __libc_freeres /foo/bar/ppc32-aix5/vgpreload_core.so
+ (ld 3 1 __libc_freeres /foo/bar/vgpreload_core-ppc32-aix5.so
in which case
$ execerror xyzzy \
- "(ld 3 1 __libc_freeres /foo/bar/ppc32-aix5/vgpreload_core.so"
+ "(ld 3 1 __libc_freeres /foo/bar/vgpreload_core-ppc32-aix5.so"
gets you
Could not load program xyzzy:
rtld: 0712-001 Symbol __libc_freeres was referenced
- from module /foo/bar/ppc32-aix5/vgpreload_core.so(),
+ from module /foo/bar/vgpreload_core-ppc32-aix5.so(),
but a runtime definition
of the symbol was not found.
*/
Modified: trunk/coregrind/m_initimg/initimg-linux.c
===================================================================
--- trunk/coregrind/m_initimg/initimg-linux.c 2009-02-11 00:21:53 UTC (rev 9134)
+++ trunk/coregrind/m_initimg/initimg-linux.c 2009-02-11 00:35:45 UTC (rev 9135)
@@ -202,8 +202,8 @@
/* Prepare the client's environment. This is basically a copy of our
environment, except:
- LD_PRELOAD=$VALGRIND_LIB/PLATFORM/vgpreload_core.so:
- ($VALGRIND_LIB/PLATFORM/vgpreload_TOOL.so:)?
+ LD_PRELOAD=$VALGRIND_LIB/vgpreload_core-PLATFORM.so:
+ ($VALGRIND_LIB/vgpreload_TOOL-PLATFORM.so:)?
$LD_PRELOAD
If this is missing, then it is added.
@@ -242,18 +242,18 @@
preload_string_len);
vg_assert(preload_string);
- /* Determine if there's a vgpreload_<tool>.so file, and setup
+ /* Determine if there's a vgpreload_<tool>_<platform>.so file, and setup
preload_string. */
preload_tool_path = VG_(malloc)("initimg-linux.sce.2", preload_tool_path_len);
vg_assert(preload_tool_path);
VG_(snprintf)(preload_tool_path, preload_tool_path_len,
- "%s/%s/vgpreload_%s.so", VG_(libdir), VG_PLATFORM, toolname);
+ "%s/vgpreload_%s-%s.so", VG_(libdir), toolname, VG_PLATFORM);
if (VG_(access)(preload_tool_path, True/*r*/, False/*w*/, False/*x*/) == 0) {
- VG_(snprintf)(preload_string, preload_string_len, "%s/%s/%s.so:%s",
- VG_(libdir), VG_PLATFORM, preload_core, preload_tool_path);
+ VG_(snprintf)(preload_string, preload_string_len, "%s/%s-%s.so:%s",
+ VG_(libdir), preload_core, VG_PLATFORM, preload_tool_path);
} else {
- VG_(snprintf)(preload_string, preload_string_len, "%s/%s/%s.so",
- VG_(libdir), VG_PLATFORM, preload_core);
+ VG_(snprintf)(preload_string, preload_string_len, "%s/%s-%s.so",
+ VG_(libdir), preload_core, VG_PLATFORM);
}
VG_(free)(preload_tool_path);
Modified: trunk/memcheck/docs/mc-manual.xml
===================================================================
--- trunk/memcheck/docs/mc-manual.xml 2009-02-11 00:21:53 UTC (rev 9134)
+++ trunk/memcheck/docs/mc-manual.xml 2009-02-11 00:35:45 UTC (rev 9135)
@@ -1463,7 +1463,7 @@
this:</para>
<programlisting><![CDATA[
-LD_PRELOAD=$prefix/lib/valgrind/<platform>/libmpiwrap.so \
+LD_PRELOAD=$prefix/lib/valgrind/libmpiwrap-<platform>.so \
mpirun [args] $prefix/bin/valgrind ./hello
]]></programlisting>
@@ -1499,7 +1499,7 @@
<programlisting><![CDATA[
MPIWRAP_DEBUG=[wrapper-args] \
- LD_PRELOAD=$prefix/lib/valgrind/<platform>/libmpiwrap.so \
+ LD_PRELOAD=$prefix/lib/valgrind/libmpiwrap-<platform>.so \
mpirun [mpirun-args] \
$prefix/bin/valgrind [valgrind-args] \
[application] [app-args]
@@ -1507,9 +1507,9 @@
<para>As an alternative to
<computeroutput>LD_PRELOAD</computeroutput>ing
-<computeroutput>libmpiwrap.so</computeroutput>, you can simply link it
-to your application if desired. This should not disturb native
-behaviour of your application in any way.</para>
+<computeroutput>libmpiwrap-<platform>.so</computeroutput>, you can
+simply link it to your application if desired. This should not disturb
+native behaviour of your application in any way.</para>
</sect2>
|
|
From: <sv...@va...> - 2009-02-11 00:22:04
|
Author: njn Date: 2009-02-11 00:21:53 +0000 (Wed, 11 Feb 2009) New Revision: 9134 Log: Filter out "(core dumped)" after "Bus error" for consistency. This makes shell_zerolength pass on my Ubuntu 8.10 machine. Modified: trunk/tests/filter_stderr_basic Modified: trunk/tests/filter_stderr_basic =================================================================== --- trunk/tests/filter_stderr_basic 2009-02-10 07:42:39 UTC (rev 9133) +++ trunk/tests/filter_stderr_basic 2009-02-11 00:21:53 UTC (rev 9134) @@ -45,7 +45,7 @@ # of the bash process. Newer bash versions redirect such messages properly. # Suppress any redirected abnormal termination messages. You can find the # complete list of messages in the bash source file siglist.c. -sed -r "/^(Segmentation fault|Alarm clock|Aborted)( \(core dumped\))?$/d" | +sed -r "/^(Segmentation fault|Alarm clock|Aborted|Bus error)( \(core dumped\))?$/d" | # Remove any ": dumping core" message as the user might have a # limit set that prevents the core dump |