|
From: <sv...@va...> - 2009-08-20 07:57:01
|
Author: tom
Date: 2009-08-20 08:56:45 +0100 (Thu, 20 Aug 2009)
New Revision: 10854
Log:
Add some extra debugging to the launcher.
Modified:
trunk/coregrind/launcher-linux.c
Modified: trunk/coregrind/launcher-linux.c
===================================================================
--- trunk/coregrind/launcher-linux.c 2009-08-20 06:07:10 UTC (rev 10853)
+++ trunk/coregrind/launcher-linux.c 2009-08-20 07:56:45 UTC (rev 10854)
@@ -116,19 +116,27 @@
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 @@
}
}
+ VG_(debugLog)(2, "launcher", "selected platform '%s'\n",
+ platform ? platform : "unknown");
+
return platform;
}
|