|
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>
|