From 08ce12e17dea2e078b000d5b644b7092d615652b Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 20 Aug 2009 07:56:45 +0000 Subject: [PATCH] Add some extra debugging to the launcher. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10854 --- coregrind/launcher-linux.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/coregrind/launcher-linux.c b/coregrind/launcher-linux.c index 65921fb362..da236f87fd 100644 --- a/coregrind/launcher-linux.c +++ b/coregrind/launcher-linux.c @@ -116,19 +116,27 @@ static const char *select_platform(const char *clientname) ssize_t n_bytes; const char *platform = NULL; + VG_(debugLog)(2, "launcher", "selecting platform for '%s'\n", clientname); + if (strchr(clientname, '/') == NULL) clientname = find_client(clientname); + VG_(debugLog)(2, "launcher", "selecting platform for '%s'\n", clientname); + if ((fd = open(clientname, O_RDONLY)) < 0) return NULL; // barf("open(%s): %s", clientname, strerror(errno)); + VG_(debugLog)(2, "launcher", "opened '%s'\n", clientname); + n_bytes = read(fd, header, sizeof(header)); close(fd); if (n_bytes < 2) { return NULL; } + VG_(debugLog)(2, "launcher", "read %d bytes from '%s'\n", n_bytes, clientname); + if (header[0] == '#' && header[1] == '!') { int i = 2; char *interp = (char *)header + 2; @@ -190,6 +198,9 @@ static const char *select_platform(const char *clientname) } } + VG_(debugLog)(2, "launcher", "selected platform '%s'\n", + platform ? platform : "unknown"); + return platform; } -- 2.47.2