]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add some extra debugging to the launcher.
authorTom Hughes <tom@compton.nu>
Thu, 20 Aug 2009 07:56:45 +0000 (07:56 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 20 Aug 2009 07:56:45 +0000 (07:56 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10854

coregrind/launcher-linux.c

index 65921fb3621818b1a954ef4d322fe060ef86f7f2..da236f87fda7a26378a2ab7de7f00010109a89fe 100644 (file)
@@ -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;
 }