|
From: <sv...@va...> - 2005-08-10 03:21:52
|
Author: sewardj
Date: 2005-08-09 01:45:22 +0100 (Tue, 09 Aug 2005)
New Revision: 4351
Log:
* Continue cleaning up following removal of stage1. =20
* Partially remove libc dependencies in m_main.c (remove use of=20
dirent.h, dlfcn.h, errno.h and string.h).
* New function in m_syscall, VG_(strerror), to get names for syscall
errors.
Modified:
branches/ASPACEM/coregrind/m_main.c
branches/ASPACEM/coregrind/m_syscall.c
branches/ASPACEM/coregrind/pub_core_syscall.h
branches/ASPACEM/coregrind/pub_core_ume.h
Modified: branches/ASPACEM/coregrind/m_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/ASPACEM/coregrind/m_main.c 2005-08-09 00:13:48 UTC (rev 4350=
)
+++ branches/ASPACEM/coregrind/m_main.c 2005-08-09 00:45:22 UTC (rev 4351=
)
@@ -44,6 +44,7 @@
#include "pub_core_libcprint.h"
#include "pub_core_libcproc.h"
#include "pub_core_libcsignal.h"
+#include "pub_core_syscall.h" // VG_(strerror)
#include "pub_core_machine.h"
#include "pub_core_main.h"
#include "pub_core_mallocfree.h"
@@ -60,12 +61,8 @@
#include "pub_core_transtab.h"
#include "pub_core_ume.h"
=20
-#include <dirent.h>
-//#include <dlfcn.h>
-#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include <unistd.h>
=20
#include "memcheck/memcheck.h"
@@ -107,7 +104,29 @@
it's own use - just a small constant. */
#define N_RESERVED_FDS (10)
=20
+
+
/*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
+/*=3D=3D=3D Ultra-basic startup stuff =
=3D=3D=3D*/
+/*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
+
+/* This may be needed before m_mylibc is OK to run. */
+static Int local_strcmp ( const HChar* s1, const HChar* s2 )
+{
+ while (True) {
+ if (*s1 =3D=3D 0 && *s2 =3D=3D 0) return 0;
+ if (*s1 =3D=3D 0) return -1;
+ if (*s2 =3D=3D 0) return 1;
+
+ if (*(UChar*)s1 < *(UChar*)s2) return -1;
+ if (*(UChar*)s1 > *(UChar*)s2) return 1;
+
+ s1++; s2++;
+ }
+}
+
+
+/*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
/*=3D=3D=3D Global entities not referenced from generated code =
=3D=3D=3D*/
/*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
=20
@@ -553,21 +572,21 @@
If this needs to handle any more variables it should be hacked
into something table driven.
*/
-static char **fix_environment(char **origenv, const char *preload)
+static HChar **fix_environment(HChar **origenv, const HChar *preload)
{
- static const char preload_core_so[] =3D "vg_preload_core.so";
- static const char ld_preload[] =3D "LD_PRELOAD=3D";
- static const char valgrind_clo[] =3D VALGRINDCLO "=3D";
+ static const HChar preload_core_so[] =3D "vg_preload_core.so";
+ static const HChar ld_preload[] =3D "LD_PRELOAD=3D";
+ static const HChar valgrind_clo[] =3D VALGRINDCLO "=3D";
static const int ld_preload_len =3D sizeof(ld_preload)-1;
static const int valgrind_clo_len =3D sizeof(valgrind_clo)-1;
int ld_preload_done =3D 0;
- char *preload_core_path;
+ HChar *preload_core_path;
int preload_core_path_len;
- int vgliblen =3D strlen(VG_(libdir));
- char **cpp;
- char **ret;
+ int vgliblen =3D VG_(strlen)(VG_(libdir));
+ HChar **cpp;
+ HChar **ret;
int envc;
- const int preloadlen =3D (preload =3D=3D NULL) ? 0 : strlen(preload);
+ const int preloadlen =3D (preload =3D=3D NULL) ? 0 : VG_(strlen)(prel=
oad);
=20
/* Find the vg_preload_core.so; also make room for the tool preload
library */
@@ -588,7 +607,7 @@
envc++;
=20
/* Allocate a new space */
- ret =3D malloc(sizeof(char *) * (envc+1+1)); /* 1 new entry + NULL */
+ ret =3D malloc(sizeof(HChar *) * (envc+1+1)); /* 1 new entry + NULL *=
/
vg_assert(ret);
=20
/* copy it over */
@@ -600,9 +619,9 @@
=20
/* Walk over the new environment, mashing as we go */
for (cpp =3D ret; cpp && *cpp; cpp++) {
- if (memcmp(*cpp, ld_preload, ld_preload_len) =3D=3D 0) {
- int len =3D strlen(*cpp) + preload_core_path_len;
- char *cp =3D malloc(len);
+ if (VG_(memcmp)(*cpp, ld_preload, ld_preload_len) =3D=3D 0) {
+ int len =3D VG_(strlen)(*cpp) + preload_core_path_len;
+ HChar *cp =3D malloc(len);
vg_assert(cp);
=20
snprintf(cp, len, "%s%s:%s",
@@ -611,7 +630,7 @@
*cpp =3D cp;
=20
ld_preload_done =3D 1;
- } else if (memcmp(*cpp, valgrind_clo, valgrind_clo_len) =3D=3D 0) =
{
+ } else if (VG_(memcmp)(*cpp, valgrind_clo, valgrind_clo_len) =3D=3D=
0) {
*cpp =3D "";
}
}
@@ -619,7 +638,7 @@
/* Add the missing bits */
if (!ld_preload_done) {
int len =3D ld_preload_len + preload_core_path_len;
- char *cp =3D malloc(len);
+ HChar *cp =3D malloc(len);
vg_assert(cp);
=20
snprintf(cp, len, "%s%s", ld_preload, preload_core_path);
@@ -716,31 +735,31 @@
argc =3D 0;
if (info->interp_name !=3D NULL) {
argc++;
- stringsize +=3D strlen(info->interp_name) + 1;
+ stringsize +=3D VG_(strlen)(info->interp_name) + 1;
}
if (info->interp_args !=3D NULL) {
argc++;
- stringsize +=3D strlen(info->interp_args) + 1;
+ stringsize +=3D VG_(strlen)(info->interp_args) + 1;
}
=20
/* now scan the args we're given... */
for (cpp =3D orig_argv; *cpp; cpp++) {
argc++;
- stringsize +=3D strlen(*cpp) + 1;
+ stringsize +=3D VG_(strlen)(*cpp) + 1;
}
=20
/* ...and the environment */
envc =3D 0;
for (cpp =3D orig_envp; cpp && *cpp; cpp++) {
envc++;
- stringsize +=3D strlen(*cpp) + 1;
+ stringsize +=3D VG_(strlen)(*cpp) + 1;
}
=20
/* now, how big is the auxv? */
auxsize =3D sizeof(*auxv); /* there's always at least one entry: AT_N=
ULL */
for (cauxv =3D orig_auxv; cauxv->a_type !=3D AT_NULL; cauxv++) {
if (cauxv->a_type =3D=3D AT_PLATFORM)
- stringsize +=3D strlen(cauxv->u.a_ptr) + 1;
+ stringsize +=3D VG_(strlen)(cauxv->u.a_ptr) + 1;
auxsize +=3D sizeof(*cauxv);
}
=20
@@ -862,7 +881,6 @@
break;
=20
case AT_IGNORE:
- case AT_EXECFD:
case AT_PHENT:
case AT_PAGESZ:
case AT_FLAGS:
@@ -932,20 +950,20 @@
/*=3D=3D=3D Find executable =
=3D=3D=3D*/
/*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
=20
-static const char* executable_name;
+/* Need a static copy because can't use dynamic mem allocation yet */
+static HChar executable_name[VKI_PATH_MAX];
=20
static Bool match_executable(const char *entry) {
- char buf[strlen(entry) + strlen(executable_name) + 2];
+ char buf[VG_(strlen)(entry) + VG_(strlen)(executable_name) + 2];
=20
/* empty PATH element means . */
if (*entry =3D=3D '\0')
entry =3D ".";
=20
snprintf(buf, sizeof(buf), "%s/%s", entry, executable_name);
- =20
if (access(buf, R_OK|X_OK) =3D=3D 0) {
- executable_name =3D strdup(buf);
- vg_assert(NULL !=3D executable_name);
+ VG_(strncpy)( executable_name, buf, VKI_PATH_MAX-1 );
+ executable_name[VKI_PATH_MAX-1] =3D 0;
return True;
}
return False;
@@ -954,8 +972,10 @@
static const char* find_executable(const char* exec)
{
vg_assert(NULL !=3D exec);
- executable_name =3D exec;
- if (strchr(executable_name, '/') =3D=3D NULL) {
+ VG_(strncpy)( executable_name, exec, VKI_PATH_MAX-1 );
+ executable_name[VKI_PATH_MAX-1] =3D 0;
+
+ if (VG_(strchr)(executable_name, '/') =3D=3D NULL) {
/* no '/' - we need to search the path */
char *path =3D getenv("PATH");
scan_colsep(path, match_executable);
@@ -968,140 +988,33 @@
/*=3D=3D=3D Loading tools =
=3D=3D=3D*/
/*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
=20
-static void list_tools(void)
-{
- DIR *dir =3D opendir(VG_(libdir));
- struct dirent *de;
- int first =3D 1;
+/* Return a pointer to the tool_info struct. Also looks to see if
+ there's a matching vgpreload_*.so file, and returns its name in
+ *preloadpath. */
=20
- if (dir =3D=3D NULL) {
- fprintf(stderr, "Can't open %s: %s (installation problem?)\n",
- VG_(libdir), strerror(errno));
- return;
- }
+/* HACK required because we can't use VG_(strdup) yet -- dynamic
+ memory allocation is not running. */
+static HChar load_tool__preloadpath[VKI_PATH_MAX];
=20
- while ((de =3D readdir(dir)) !=3D NULL) {
- int len =3D strlen(de->d_name);
-
- /* look for vgtool_TOOL.so names */
- if (len > (7+1+3) && /* "vgtool_" + at least 1-char toolname + "=
.so" */
- strncmp(de->d_name, "vgtool_", 7) =3D=3D 0 &&
- VG_STREQ(de->d_name + len - 3, ".so")) {
- if (first) {
- fprintf(stderr, "Available tools:\n");
- first =3D 0;
- }
- de->d_name[len-3] =3D '\0';
- fprintf(stderr, "\t%s\n", de->d_name+7);
- }
- }
-
- closedir(dir);
-
- if (first)
- fprintf(stderr, "No tools available in \"%s\" (installation proble=
m?)\n",
- VG_(libdir));
-}
-
-
-/* Find and load a tool, and check it looks ok. Also looks to see if th=
ere's=20
- * a matching vgpreload_*.so file, and returns its name in *preloadpath.=
*/
static void load_tool( const char *toolname,
ToolInfo** toolinfo_out, char **preloadpath_out )
{
extern ToolInfo VG_(tool_info);
*toolinfo_out =3D &VG_(tool_info);
- /* HHHHHHHHACCCCCCCCCCK */
- //*preloadpath_out =3D "/home/sewardj/VgASPACEM/aspacem/Inst/lib/valg=
rind/vgpreload_memcheck.so";
- int len =3D strlen(VG_(libdir)) + strlen(toolname) + 16;
- char buf[len];
- char* preloadpath =3D NULL;
=20
+ Int len =3D VG_(strlen)(VG_(libdir)) + VG_(strlen)(toolname) + 16;
+ HChar buf[len];
+
snprintf(buf, len, "%s/vgpreload_%s.so", VG_(libdir), toolname);
- if (access(buf, R_OK) =3D=3D 0) {
- preloadpath =3D strdup(buf);
- *preloadpath_out =3D preloadpath;
+ if (access(buf, R_OK) =3D=3D 0 || len >=3D VKI_PATH_MAX-1) {
+ VG_(strncpy)( load_tool__preloadpath, buf, VKI_PATH_MAX-1 );
+ load_tool__preloadpath[VKI_PATH_MAX-1] =3D 0;
+ *preloadpath_out =3D load_tool__preloadpath;
} else {
- fprintf(stderr, "valgrind: couldn't load tool\n");
- list_tools();
+ fprintf(stderr, "valgrind: couldn't find preload file for tool %s\=
n",=20
+ toolname);
exit(127);
}
-
-//zz Bool ok;
-//zz int len =3D strlen(VG_(libdir)) + strlen(toolname) + 16;
-//zz char buf[len];
-//zz void* handle;
-//zz ToolInfo* toolinfo;
-//zz char* preloadpath =3D NULL;
-//zz=20
-//zz // XXX: allowing full paths for --tool option -- does it make se=
nse?
-//zz // Doesn't allow for vgpreload_<tool>.so.
-//zz=20
-//zz if (strchr(toolname, '/') !=3D 0) {
-//zz /* toolname contains '/', and so must be a pathname */
-//zz handle =3D dlopen(toolname, RTLD_NOW);
-//zz } else {
-//zz /* just try in the libdir */
-//zz snprintf(buf, len, "%s/vgtool_%s.so", VG_(libdir), toolname);
-//zz handle =3D dlopen(buf, RTLD_NOW);
-//zz=20
-//zz if (handle !=3D NULL) {
-//zz snprintf(buf, len, "%s/vgpreload_%s.so", VG_(libdir), toolname);
-//zz if (access(buf, R_OK) =3D=3D 0) {
-//zz preloadpath =3D strdup(buf);
-//zz vg_assert(NULL !=3D preloadpath);
-//zz }
-//zz }
-//zz }
-//zz=20
-//zz ok =3D (NULL !=3D handle);
-//zz if (!ok) {
-//zz fprintf(stderr, "Can't open tool \"%s\": %s\n", toolname, dle=
rror());
-//zz goto bad_load;
-//zz }
-//zz=20
-//zz toolinfo =3D dlsym(handle, "vgPlain_tool_info");
-//zz ok =3D (NULL !=3D toolinfo);
-//zz if (!ok) {
-//zz fprintf(stderr, "Tool \"%s\" doesn't define its ToolInfo - "
-//zz "add VG_DETERMINE_INTERFACE_VERSION?\n", tool=
name);
-//zz goto bad_load;
-//zz }
-//zz=20
-//zz ok =3D (toolinfo->sizeof_ToolInfo =3D=3D sizeof(*toolinfo) &&
-//zz toolinfo->interface_version =3D=3D VG_CORE_INTERFACE_VERSI=
ON &&
-//zz toolinfo->tl_pre_clo_init !=3D NULL);
-//zz if (!ok) {=20
-//zz fprintf(stderr, "Error:\n"
-//zz " Tool and core interface versions do not match.\n"
-//zz " Interface version used by core is: %d (size %d)\n"
-//zz " Interface version used by tool is: %d (size %d)\n"
-//zz " The version numbers must match.\n",
-//zz VG_CORE_INTERFACE_VERSION,=20
-//zz (Int)sizeof(*toolinfo),
-//zz toolinfo->interface_version,
-//zz toolinfo->sizeof_ToolInfo);
-//zz fprintf(stderr, " You need to at least recompile, and possib=
ly update,\n");
-//zz if (VG_CORE_INTERFACE_VERSION > toolinfo->interface_version)
-//zz fprintf(stderr, " your tool to work with this version of =
Valgrind.\n");
-//zz else
-//zz fprintf(stderr, " your version of Valgrind to work with t=
his tool.\n");
-//zz goto bad_load;
-//zz }
-//zz=20
-//zz vg_assert(NULL !=3D toolinfo);
-//zz *toolinfo_out =3D toolinfo;
-//zz *preloadpath_out =3D preloadpath;
-//zz return;
-//zz=20
-//zz=20
-//zz bad_load:
-//zz if (handle !=3D NULL)
-//zz dlclose(handle);
-//zz=20
-//zz fprintf(stderr, "valgrind: couldn't load tool\n");
-//zz list_tools();
-//zz exit(127);
}
=20
=20
@@ -1174,7 +1087,7 @@
ret =3D VG_(do_exec)(exec, info);
if (ret !=3D 0) {
fprintf(stderr, "valgrind: do_exec(%s) failed: %s\n",
- exec, strerror(ret));
+ exec, VG_(strerror)(ret));
exit(127);
}
}
@@ -1327,7 +1240,7 @@
/* parse the options we have (only the options we care about now) */
for (i =3D 1; i < vg_argc; i++) {
=20
- if (strcmp(vg_argv[i], "--version") =3D=3D 0) {
+ if (local_strcmp(vg_argv[i], "--version") =3D=3D 0) {
printf("valgrind-" VERSION "\n");
exit(0);
=20
@@ -1385,7 +1298,7 @@
// prefix matches, convert "--toolname:foo" to "--foo"
if (0)
VG_(printf)("tool-specific arg: %s\n", arg);
- arg =3D strdup(arg + toolname_len + 1);
+ arg =3D VG_(strdup)(arg + toolname_len + 1);
arg[0] =3D '-';
arg[1] =3D '-';
=20
@@ -1767,8 +1680,8 @@
=20
=20
/* Check that the requested tool actually supports XML output. */
- if (VG_(clo_xml) && 0 !=3D VG_(strcmp)(toolname, "memcheck")
- && 0 !=3D VG_(strcmp)(toolname, "none")) {
+ if (VG_(clo_xml) && 0 !=3D local_strcmp(toolname, "memcheck")
+ && 0 !=3D local_strcmp(toolname, "none")) {
VG_(clo_xml) =3D False;
VG_(message)(Vg_UserMsg,=20
"Currently only Memcheck|None supports XML output.");=20
@@ -1980,7 +1893,7 @@
=20
if (VG_(memcmp)(arg, "--exec=3D", 7) =3D=3D 0) {
// don't copy existing --exec=3D arg
- } else if (VG_(strcmp)(arg, "--") =3D=3D 0) {
+ } else if (local_strcmp(arg, "--") =3D=3D 0) {
// stop at "--"
break;
} else {
@@ -2351,22 +2264,6 @@
*/
=20
=20
-/* This may be needed before m_mylibc is OK to run. */
-static Int local_strcmp ( const HChar* s1, const HChar* s2 )
-{
- while (True) {
- if (*s1 =3D=3D 0 && *s2 =3D=3D 0) return 0;
- if (*s1 =3D=3D 0) return -1;
- if (*s2 =3D=3D 0) return 1;
-
- if (*(UChar*)s1 < *(UChar*)s2) return -1;
- if (*(UChar*)s1 > *(UChar*)s2) return 1;
-
- s1++; s2++;
- }
-}
-
-
Int main(Int argc, HChar **argv, HChar **envp)
{
HChar **cl_argv;
Modified: branches/ASPACEM/coregrind/m_syscall.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/ASPACEM/coregrind/m_syscall.c 2005-08-09 00:13:48 UTC (rev 4=
350)
+++ branches/ASPACEM/coregrind/m_syscall.c 2005-08-09 00:45:22 UTC (rev 4=
351)
@@ -215,6 +215,36 @@
#endif
}
=20
+/* ---------------------------------------------------------------------
+ Names of errors.
+ ------------------------------------------------------------------ */
+
+/* Return a string which gives the name of an error value. Note,
+ unlike the standard C syserror fn, the returned string is not
+ malloc-allocated or writable -- treat it as a constant.=20
+ TODO: implement this properly. */
+
+const HChar* VG_(strerror) ( UWord errnum )
+{
+ switch (errnum) {
+ case VKI_EPERM: return "EPERM";
+ case VKI_ESRCH: return "ESRCH";
+ case VKI_EINTR: return "EINTR";
+ case VKI_EBADF: return "EBADF";
+ case VKI_EAGAIN: return "EAGAIN";
+ case VKI_ENOMEM: return "ENOMEM";
+ case VKI_EACCES: return "EACCES";
+ case VKI_EFAULT: return "EFAULT";
+ case VKI_EEXIST: return "EEXIST";
+ case VKI_EINVAL: return "EINVAL";
+ case VKI_EMFILE: return "EMFILE";
+ case VKI_ENOSYS: return "ENOSYS";
+ case VKI_ERESTARTSYS: return "ERESTARTSYS";
+ default: return "VG_(strerror): unknown error";
+ }
+}
+
+
/*--------------------------------------------------------------------*/
/*--- end ---*/
/*--------------------------------------------------------------------*/
Modified: branches/ASPACEM/coregrind/pub_core_syscall.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/ASPACEM/coregrind/pub_core_syscall.h 2005-08-09 00:13:48 UTC=
(rev 4350)
+++ branches/ASPACEM/coregrind/pub_core_syscall.h 2005-08-09 00:45:22 UTC=
(rev 4351)
@@ -67,9 +67,16 @@
extern SysRes VG_(mk_SysRes_Error) ( UWord val );
extern SysRes VG_(mk_SysRes_Success) ( UWord val );
=20
+
+/* Return a string which gives the name of an error value. Note,
+ unlike the standard C syserror fn, the returned string is not
+ malloc-allocated or writable -- treat it as a constant. */
+
+extern const HChar* VG_(strerror) ( UWord errnum );
+
+
#endif // __PUB_CORE_SYSCALL_H
=20
/*--------------------------------------------------------------------*/
/*--- end ---*/
/*--------------------------------------------------------------------*/
-
Modified: branches/ASPACEM/coregrind/pub_core_ume.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/ASPACEM/coregrind/pub_core_ume.h 2005-08-09 00:13:48 UTC (re=
v 4350)
+++ branches/ASPACEM/coregrind/pub_core_ume.h 2005-08-09 00:45:22 UTC (re=
v 4351)
@@ -112,10 +112,6 @@
=20
extern struct ume_auxv *VG_(find_auxv)(UWord* orig_esp);
=20
-/* Our private auxv entries */
-#define AT_UME_PADFD 0xff01 /* padding file fd */
-#define AT_UME_EXECFD 0xff02 /* stage1 executable fd */
-
#endif /* __PUB_CORE_UME_H */
=20
/*--------------------------------------------------------------------*/
|