|
From: <sv...@va...> - 2005-09-26 13:42:33
|
Author: sewardj
Date: 2005-09-26 14:42:16 +0100 (Mon, 26 Sep 2005)
New Revision: 4783
Log:
Add a simulation for /proc/self/cmdline using the scheme suggested by
Tom Hughes. As a side effect, we now have VG_(mkstemp), and
VG_(random) is generalised to allow multiple simultaneous generators.
OOo finally runs successfully on this branch now.
Modified:
branches/ASPACEM/coregrind/m_clientstate.c
branches/ASPACEM/coregrind/m_debugger.c
branches/ASPACEM/coregrind/m_libcbase.c
branches/ASPACEM/coregrind/m_libcfile.c
branches/ASPACEM/coregrind/m_main.c
branches/ASPACEM/coregrind/m_skiplist.c
branches/ASPACEM/coregrind/m_syswrap/syswrap-generic.c
branches/ASPACEM/coregrind/m_syswrap/syswrap-main.c
branches/ASPACEM/coregrind/pub_core_clientstate.h
branches/ASPACEM/coregrind/pub_core_libcfile.h
branches/ASPACEM/include/pub_tool_libcbase.h
branches/ASPACEM/include/pub_tool_libcfile.h
Modified: branches/ASPACEM/coregrind/m_clientstate.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_clientstate.c 2005-09-26 10:05:38 UTC (r=
ev 4782)
+++ branches/ASPACEM/coregrind/m_clientstate.c 2005-09-26 13:42:16 UTC (r=
ev 4783)
@@ -53,8 +53,10 @@
Addr VG_(brk_limit) =3D 0; /* current brk */
=20
/* A fd which refers to the client executable. */
-Int VG_(clexecfd) =3D -1;
+Int VG_(cl_exec_fd) =3D -1;
=20
+/* A fd which refers to the fake /proc/<pid>/cmdline in /tmp. */
+Int VG_(cl_cmdline_fd) =3D -1;
=20
// Command line pieces, after they have been extracted from argv in
// m_main.main(). The payload vectors are allocated in VG_AR_TOOL
Modified: branches/ASPACEM/coregrind/m_debugger.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_debugger.c 2005-09-26 10:05:38 UTC (rev =
4782)
+++ branches/ASPACEM/coregrind/m_debugger.c 2005-09-26 13:42:16 UTC (rev =
4783)
@@ -122,7 +122,7 @@
Char *cmdptr;
=20
VG_(sprintf)(pidbuf, "%d", pid);
- VG_(sprintf)(file, "/proc/%d/fd/%d", pid, VG_(clexecfd));
+ VG_(sprintf)(file, "/proc/%d/fd/%d", pid, VG_(cl_exec_fd));
=20
bufptr =3D buf;
cmdptr =3D VG_(clo_db_command);
Modified: branches/ASPACEM/coregrind/m_libcbase.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_libcbase.c 2005-09-26 10:05:38 UTC (rev =
4782)
+++ branches/ASPACEM/coregrind/m_libcbase.c 2005-09-26 13:42:16 UTC (rev =
4783)
@@ -497,19 +497,22 @@
#undef SORT
}
=20
+// This random number generator is based on the one suggested in Kernigh=
an
+// and Ritchie's "The C Programming Language".
+
+// A pseudo-random number generator returning a random UInt. If pSeed
+// is NULL, it uses its own seed, which starts at zero. If pSeed is
+// non-NULL, it uses and updates whatever pSeed points at.
+
static UInt seed =3D 0;
=20
-void VG_(srandom)(UInt s)
+UInt VG_(random)( /*MOD*/UInt* pSeed )
{
- seed =3D s;
-}
+ if (pSeed =3D=3D NULL)=20
+ pSeed =3D &seed;
=20
-// This random number generator is based on the one suggested in Kernigh=
an
-// and Ritchie's "The C Programming Language".
-UInt VG_(random)(void)
-{
- seed =3D (1103515245*seed + 12345);
- return seed;
+ *pSeed =3D (1103515245 * *pSeed + 12345);
+ return *pSeed;
}
=20
/*--------------------------------------------------------------------*/
Modified: branches/ASPACEM/coregrind/m_libcfile.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_libcfile.c 2005-09-26 10:05:38 UTC (rev =
4782)
+++ branches/ASPACEM/coregrind/m_libcfile.c 2005-09-26 13:42:16 UTC (rev =
4783)
@@ -33,6 +33,7 @@
#include "pub_core_libcassert.h"
#include "pub_core_libcfile.h"
#include "pub_core_libcprint.h" // For VG_(sprintf)()
+#include "pub_core_libcproc.h" // VG_(getpid), VG_(getppid)
#include "pub_core_syscall.h"
#include "vki_unistd.h"
=20
@@ -140,10 +141,9 @@
return res.isError ? (-1) : buf.st_size;
}
=20
-Int VG_(dup2) ( Int oldfd, Int newfd )
+SysRes VG_(dup) ( Int oldfd )
{
- SysRes res =3D VG_(do_syscall2)(__NR_dup2, oldfd, newfd);
- return res.isError ? (-1) : res.val;
+ return VG_(do_syscall1)(__NR_dup, oldfd);
}
=20
/* Returns -1 on error. */
@@ -219,6 +219,48 @@
return res;
}
=20
+/* Create and open (-rw------) a tmp file name incorporating said arg.
+ Returns -1 on failure, else the fd of the file. If fullname is
+ non-NULL, the file's name is written into it. The number of bytes
+ written is guaranteed not to exceed 64+strlen(part_of_name). */
+
+Int VG_(mkstemp) ( HChar* part_of_name, /*OUT*/HChar* fullname )
+{
+ HChar buf[200];
+ Int n, tries, fd;
+ UInt seed;
+ SysRes sres;
+
+ vg_assert(part_of_name);
+ n =3D VG_(strlen)(part_of_name);
+ vg_assert(n > 0 && n < 100);
+
+ seed =3D (VG_(getpid)() << 9) ^ VG_(getppid)();
+
+ tries =3D 0;
+ while (True) {
+ if (tries > 10)=20
+ return -1;
+ VG_(sprintf)( buf, "/tmp/valgrind_%s_%08x",=20
+ part_of_name, VG_(random)( &seed ));
+ if (0)
+ VG_(printf)("VG_(mkstemp): trying: %s\n", buf);
+
+ sres =3D VG_(open)(buf,
+ VKI_O_CREAT|VKI_O_RDWR|VKI_O_EXCL|VKI_O_TRUNC,
+ VKI_S_IRUSR|VKI_S_IWUSR);
+ if (sres.isError)
+ continue;
+ /* VG_(safe_fd) doesn't return if it fails. */
+ fd =3D VG_(safe_fd)( sres.val );
+ if (fullname)
+ VG_(strcpy)( fullname, buf );
+ return fd;
+ }
+ /* NOTREACHED */
+}
+
+
/* ---------------------------------------------------------------------
Socket-related stuff. This is very Linux-kernel specific.
------------------------------------------------------------------ */
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-09-26 10:05:38 UTC (rev 4782=
)
+++ branches/ASPACEM/coregrind/m_main.c 2005-09-26 13:42:16 UTC (rev 4783=
)
@@ -853,7 +853,7 @@
executable. This is needed for attaching to GDB. */
res =3D VG_(open)(exec, VKI_O_RDONLY, VKI_S_IRUSR);
if (!res.isError)
- VG_(clexecfd) =3D res.val;
+ VG_(cl_exec_fd) =3D res.val;
=20
/* Copy necessary bits of 'info' that were filled in */
*client_eip =3D info->init_eip;
@@ -1681,8 +1681,8 @@
/* Update the soft limit. */
VG_(setrlimit)(VKI_RLIMIT_NOFILE, &rl);
=20
- if (VG_(clexecfd) !=3D -1)
- VG_(clexecfd) =3D VG_(safe_fd)( VG_(clexecfd) );
+ if (VG_(cl_exec_fd) !=3D -1)
+ VG_(cl_exec_fd) =3D VG_(safe_fd)( VG_(cl_exec_fd) );
}
=20
=20
@@ -2125,15 +2125,15 @@
// p: load_client() [for 'info' and hence VG_(brk_base)]
//--------------------------------------------------------------
if (!need_help) {=20
- SizeT m1 =3D 1024 * 1024;
- SizeT m8 =3D 8 * m1;
- SizeT dseg_max_size =3D (SizeT)VG_(client_rlimit_data).rlim_cur;
- VG_(debugLog)(1, "main", "Setup client data (brk) segment\n");
- if (dseg_max_size < m1) dseg_max_size =3D m1;
- if (dseg_max_size > m8) dseg_max_size =3D m8;
- dseg_max_size =3D VG_PGROUNDUP(dseg_max_size);
+ SizeT m1 =3D 1024 * 1024;
+ SizeT m8 =3D 8 * m1;
+ SizeT dseg_max_size =3D (SizeT)VG_(client_rlimit_data).rlim_cur;
+ VG_(debugLog)(1, "main", "Setup client data (brk) segment\n");
+ if (dseg_max_size < m1) dseg_max_size =3D m1;
+ if (dseg_max_size > m8) dseg_max_size =3D m8;
+ dseg_max_size =3D VG_PGROUNDUP(dseg_max_size);
=20
- setup_client_dataseg( dseg_max_size );
+ setup_client_dataseg( dseg_max_size );
}
=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
@@ -2150,6 +2150,51 @@
setup_file_descriptors();
=20
//--------------------------------------------------------------
+ // create the fake /proc/<pid>/cmdline file and then unlink it,
+ // but hold onto the fd, so we can hand it out to the client
+ // when it tries to open /proc/<pid>/cmdline for itself.
+ // p: setup file descriptors
+ //--------------------------------------------------------------
+ if (!need_help) {
+ HChar buf[50], buf2[50+64];
+ HChar nul[1];
+ Int fd, r;
+ HChar* exename;
+
+ VG_(debugLog)(1, "main", "Create fake /proc/<pid>/cmdline\n");
+
+ VG_(sprintf)(buf, "proc_%d_cmdline", VG_(getpid)());
+ fd =3D VG_(mkstemp)( buf, buf2 );
+ if (fd =3D=3D -1)
+ config_error("Can't create client cmdline file in /tmp.");
+
+ nul[0] =3D 0;
+ exename =3D VG_(args_the_exename) ? VG_(args_the_exename)
+ : "unknown_exename";
+
+ VG_(write)(fd, VG_(args_the_exename),=20
+ VG_(strlen)( VG_(args_the_exename) ));
+ VG_(write)(fd, nul, 1);
+
+ for (i =3D 0; i < VG_(args_for_client).used; i++) {
+ VG_(write)(fd, VG_(args_for_client).strs[i],
+ VG_(strlen)( VG_(args_for_client).strs[i] ));
+ VG_(write)(fd, nul, 1);
+ }
+
+ /* Don't bother to seek the file back to the start; instead do
+ it every time a copy of it is given out (by PRE(sys_open)).=20
+ That is probably more robust across fork() etc. */
+
+ /* Now delete it, but hang on to the fd. */
+ r =3D VG_(unlink)( buf2 );
+ if (r)
+ config_error("Can't delete client cmdline file in /tmp.");
+
+ VG_(cl_cmdline_fd) =3D fd;
+ }
+
+ //--------------------------------------------------------------
// Init tool part 1: pre_clo_init
// p: setup_client_stack() [for 'VG_(client_arg[cv]']
// p: setup_file_descriptors() [for 'VG_(fd_xxx_limit)']
Modified: branches/ASPACEM/coregrind/m_skiplist.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_skiplist.c 2005-09-26 10:05:38 UTC (rev =
4782)
+++ branches/ASPACEM/coregrind/m_skiplist.c 2005-09-26 13:42:16 UTC (rev =
4783)
@@ -119,7 +119,7 @@
{
UInt ret =3D 0;
=20
- while((ret < SK_MAXHEIGHT - 1) && (VG_(random)() & 1))
+ while((ret < SK_MAXHEIGHT - 1) && (VG_(random)(NULL) & 1))
ret++;
=20
return ret;
Modified: branches/ASPACEM/coregrind/m_syswrap/syswrap-generic.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_syswrap/syswrap-generic.c 2005-09-26 10:=
05:38 UTC (rev 4782)
+++ branches/ASPACEM/coregrind/m_syswrap/syswrap-generic.c 2005-09-26 13:=
42:16 UTC (rev 4783)
@@ -4937,7 +4937,9 @@
=20
PRE(sys_open)
{
- *flags |=3D SfMayBlock;
+ HChar name[30];
+ SysRes sres;
+
if (ARG2 & VKI_O_CREAT) {
// 3-arg version
PRINT("sys_open ( %p(%s), %d, %d )",ARG1,ARG1,ARG2,ARG3);
@@ -4950,6 +4952,28 @@
const char *, filename, int, flags);
}
PRE_MEM_RASCIIZ( "open(filename)", ARG1 );
+
+ /* Handle the case where the open is of /proc/self/cmdline or
+ /proc/<pid>/cmdline, and just give it a copy of the fd for the
+ fake file we cooked up at startup (in m_main). Also, seek the
+ cloned fd back to the start. */
+
+ VG_(sprintf)(name, "/proc/%d/cmdline", VG_(getpid)());
+ if (ML_(safe_to_deref)( (void*)ARG1, 1 )
+ && (VG_(strcmp)((Char *)ARG1, name) =3D=3D 0=20
+ || VG_(strcmp)((Char *)ARG1, "/proc/self/cmdline") =3D=3D 0))=
{
+ sres =3D VG_(dup)( VG_(cl_cmdline_fd) );
+ SET_STATUS_from_SysRes( sres );
+ if (!sres.isError) {
+ OffT off =3D VG_(lseek)( sres.val, 0, VKI_SEEK_SET );
+ if (off)
+ SET_STATUS_Failure( VKI_EMFILE );
+ }
+ return;
+ }
+
+ /* Otherwise handle normally */
+ *flags |=3D SfMayBlock;
}
=20
POST(sys_open)
@@ -5110,7 +5134,7 @@
VG_(sprintf)(name, "/proc/%d/exe", VG_(getpid)());
if (VG_(strcmp)((Char *)ARG1, name) =3D=3D 0 ||
VG_(strcmp)((Char *)ARG1, "/proc/self/exe") =3D=3D 0) {
- VG_(sprintf)(name, "/proc/self/fd/%d", VG_(clexecfd));
+ VG_(sprintf)(name, "/proc/self/fd/%d", VG_(cl_exec_fd));
SET_STATUS_from_SysRes( VG_(do_syscall3)(saved, (UWord)name, AR=
G2, ARG3));
}
}
Modified: branches/ASPACEM/coregrind/m_syswrap/syswrap-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_syswrap/syswrap-main.c 2005-09-26 10:05:=
38 UTC (rev 4782)
+++ branches/ASPACEM/coregrind/m_syswrap/syswrap-main.c 2005-09-26 13:42:=
16 UTC (rev 4783)
@@ -673,7 +673,7 @@
success. */
PRINT(" --> [pre-success] Success(0x%llx)\n", (Long)sci->status.va=
l );
=20
- /* In this case thes allowable flag are to ask for a signal-poll
+ /* In this case the allowable flags are to ask for a signal-poll
and/or a yield after the call. Changing the args isn't
allowed. */
vg_assert(0 =3D=3D (sci->flags & ~(SfPollAfter | SfYieldAfter)));
Modified: branches/ASPACEM/coregrind/pub_core_clientstate.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_clientstate.h 2005-09-26 10:05:38=
UTC (rev 4782)
+++ branches/ASPACEM/coregrind/pub_core_clientstate.h 2005-09-26 13:42:16=
UTC (rev 4783)
@@ -52,8 +52,19 @@
extern Addr VG_(brk_limit); // current brk
=20
/* A fd which refers to the client executable. */
-extern Int VG_(clexecfd);
+extern Int VG_(cl_exec_fd);
=20
+/* A fd which refers to the fake /proc/<pid>/cmdline in /tmp. The
+ idea is: make up the /proc/<pid>/cmdline file the client would
+ expect to see if it was running natively. Copy into a file in
+ /tmp. When the client then does an open of /proc/<pid>/cmdline or
+ /proc/self/cmdline, instead give it a file handle to the file in
+ /tmp. The problem of deleting said file when Valgrind exits is
+ neatly sidestepped by unlinking it as soon as it has been created,
+ but holding on to the file handle. That causes the kernel to keep
+ the file contents alive exactly until the process exits. */
+extern Int VG_(cl_cmdline_fd);
+
// Client's original rlimit data and rlimit stack
extern struct vki_rlimit VG_(client_rlimit_data);
extern struct vki_rlimit VG_(client_rlimit_stack);
Modified: branches/ASPACEM/coregrind/pub_core_libcfile.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_libcfile.h 2005-09-26 10:05:38 UT=
C (rev 4782)
+++ branches/ASPACEM/coregrind/pub_core_libcfile.h 2005-09-26 13:42:16 UT=
C (rev 4783)
@@ -67,6 +67,12 @@
=20
extern SysRes VG_(pread) ( Int fd, void* buf, Int count, Int offset );
=20
+/* Create and open (-rw------) a tmp file name incorporating said arg.
+ Returns -1 on failure, else the fd of the file. If fullname is
+ non-NULL, the file's name is written into it. The number of bytes
+ written is guaranteed not to exceed 64+strlen(part_of_name). */
+extern Int VG_(mkstemp) ( HChar* part_of_name, /*OUT*/HChar* fullname );
+
#endif // __PUB_CORE_LIBCFILE_H
=20
/*--------------------------------------------------------------------*/
Modified: branches/ASPACEM/include/pub_tool_libcbase.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/include/pub_tool_libcbase.h 2005-09-26 10:05:38 UTC =
(rev 4782)
+++ branches/ASPACEM/include/pub_tool_libcbase.h 2005-09-26 13:42:16 UTC =
(rev 4783)
@@ -114,10 +114,10 @@
/* Returns the base-2 logarithm of x. */
extern Int VG_(log2) ( Int x );
=20
-// A pseudo-random number generator returning a random UInt, and its
-// seed function.
-extern void VG_(srandom) ( UInt seed );
-extern UInt VG_(random) ( void );
+// A pseudo-random number generator returning a random UInt. If pSeed
+// is NULL, it uses its own seed, which starts at zero. If pSeed is
+// non-NULL, it uses and updates whatever pSeed points at.
+extern UInt VG_(random) ( /*MOD*/UInt* pSeed );
=20
#endif // __PUB_TOOL_LIBCBASE_H
=20
Modified: branches/ASPACEM/include/pub_tool_libcfile.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/include/pub_tool_libcfile.h 2005-09-26 10:05:38 UTC =
(rev 4782)
+++ branches/ASPACEM/include/pub_tool_libcfile.h 2005-09-26 13:42:16 UTC =
(rev 4783)
@@ -44,7 +44,7 @@
=20
extern SysRes VG_(stat) ( Char* file_name, struct vki_stat* buf );
extern Int VG_(fstat) ( Int fd, struct vki_stat* buf );
-extern Int VG_(dup2) ( Int oldfd, Int newfd );
+extern SysRes VG_(dup) ( Int oldfd );
extern Int VG_(rename) ( Char* old_name, Char* new_name );
extern Int VG_(unlink) ( Char* file_name );
=20
|