|
From: <sv...@va...> - 2009-02-17 00:06:12
|
Author: njn
Date: 2009-02-17 00:06:07 +0000 (Tue, 17 Feb 2009)
New Revision: 9185
Log:
Fixed up getsockopt mess.
Modified:
branches/DARWIN/coregrind/m_syswrap/priv_syswrap-generic.h
branches/DARWIN/coregrind/m_syswrap/priv_syswrap-linux.h
branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-linux.c
branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c
branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c
branches/DARWIN/coregrind/m_syswrap/syswrap-linux.c
branches/DARWIN/coregrind/m_syswrap/syswrap-ppc32-linux.c
branches/DARWIN/coregrind/m_syswrap/syswrap-ppc64-linux.c
branches/DARWIN/coregrind/m_syswrap/syswrap-x86-linux.c
Modified: branches/DARWIN/coregrind/m_syswrap/priv_syswrap-generic.h
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/priv_syswrap-generic.h 2009-02-16 22:06:20 UTC (rev 9184)
+++ branches/DARWIN/coregrind/m_syswrap/priv_syswrap-generic.h 2009-02-17 00:06:07 UTC (rev 9185)
@@ -73,22 +73,20 @@
extern void
ML_(notify_aspacem_and_tool_of_mprotect) ( Addr a, SizeT len, Int prot );
+extern void
+ML_(buf_and_len_pre_check) ( ThreadId tid, Addr buf_p, Addr buflen_p,
+ Char* buf_s, Char* buflen_s );
+extern void
+ML_(buf_and_len_post_check) ( ThreadId tid, SysRes res,
+ Addr buf_p, Addr buflen_p, Char* s );
+
/* PRE and POST for unknown ioctls based on ioctl request encoding */
extern
void ML_(PRE_unknown_ioctl)(ThreadId tid, UWord request, UWord arg);
extern
void ML_(POST_unknown_ioctl)(ThreadId tid, UInt res, UWord request, UWord arg);
-/* PRE and POST for platform-specific sockopts */
-extern void
-ML_(PRE_sys_getsockopt) ( ThreadId tid, UWord arg0, UWord arg1,
- UWord arg2, UWord arg3, UWord arg4 );
-extern void
-ML_(POST_sys_getsockopt) ( ThreadId tid, SysRes res,
- UWord arg0, UWord arg1, UWord arg2,
- UWord arg3, UWord arg4 );
-
DECL_TEMPLATE(generic, sys_ni_syscall); // * P -- unimplemented
DECL_TEMPLATE(generic, sys_exit);
DECL_TEMPLATE(generic, sys_fork);
@@ -234,8 +232,6 @@
extern void ML_(generic_POST_sys_recv) ( TId, UW, UW, UW, UW );
extern void ML_(generic_PRE_sys_connect) ( TId, UW, UW, UW );
extern void ML_(generic_PRE_sys_setsockopt) ( TId, UW, UW, UW, UW, UW );
-extern void ML_(generic_PRE_sys_getsockopt) ( TId, UW, UW, UW, UW, UW );
-extern void ML_(generic_POST_sys_getsockopt) ( TId, SR, UW, UW, UW, UW, UW );
extern void ML_(generic_PRE_sys_getsockname) ( TId, UW, UW, UW );
extern void ML_(generic_POST_sys_getsockname) ( TId, SR, UW, UW, UW );
extern void ML_(generic_PRE_sys_getpeername) ( TId, UW, UW, UW );
Modified: branches/DARWIN/coregrind/m_syswrap/priv_syswrap-linux.h
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/priv_syswrap-linux.h 2009-02-16 22:06:20 UTC (rev 9184)
+++ branches/DARWIN/coregrind/m_syswrap/priv_syswrap-linux.h 2009-02-17 00:06:07 UTC (rev 9185)
@@ -256,11 +256,13 @@
#define UW UWord
#define SR SysRes
-extern void ML_(linux_PRE_sys_msgsnd) ( TId, UW, UW, UW, UW );
-extern void ML_(linux_PRE_sys_msgrcv) ( TId, UW, UW, UW, UW, UW );
-extern void ML_(linux_POST_sys_msgrcv) ( TId, UW, UW, UW, UW, UW, UW );
-extern void ML_(linux_PRE_sys_msgctl) ( TId, UW, UW, UW );
-extern void ML_(linux_POST_sys_msgctl) ( TId, UW, UW, UW, UW );
+extern void ML_(linux_PRE_sys_msgsnd) ( TId, UW, UW, UW, UW );
+extern void ML_(linux_PRE_sys_msgrcv) ( TId, UW, UW, UW, UW, UW );
+extern void ML_(linux_POST_sys_msgrcv) ( TId, UW, UW, UW, UW, UW, UW );
+extern void ML_(linux_PRE_sys_msgctl) ( TId, UW, UW, UW );
+extern void ML_(linux_POST_sys_msgctl) ( TId, UW, UW, UW, UW );
+extern void ML_(linux_PRE_sys_getsockopt) ( TId, UW, UW, UW, UW, UW );
+extern void ML_(linux_POST_sys_getsockopt) ( TId, SR, UW, UW, UW, UW, UW );
#undef TId
#undef UW
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-linux.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-linux.c 2009-02-16 22:06:20 UTC (rev 9184)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-linux.c 2009-02-17 00:06:07 UTC (rev 9185)
@@ -641,13 +641,13 @@
PRE_REG_READ5(long, "getsockopt",
int, s, int, level, int, optname,
void *, optval, int, *optlen);
- ML_(generic_PRE_sys_getsockopt)(tid, ARG1,ARG2,ARG3,ARG4,ARG5);
+ ML_(linux_PRE_sys_getsockopt)(tid, ARG1,ARG2,ARG3,ARG4,ARG5);
}
POST(sys_getsockopt)
{
vg_assert(SUCCESS);
- ML_(generic_POST_sys_getsockopt)(tid, VG_(mk_SysRes_Success)(RES),
- ARG1,ARG2,ARG3,ARG4,ARG5);
+ ML_(linux_POST_sys_getsockopt)(tid, VG_(mk_SysRes_Success)(RES),
+ ARG1,ARG2,ARG3,ARG4,ARG5);
}
PRE(sys_connect)
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c 2009-02-16 22:06:20 UTC (rev 9184)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c 2009-02-17 00:06:07 UTC (rev 9185)
@@ -583,27 +583,9 @@
/* ---------------------------------------------------------------------
- darwin sockopt wrapper helpers
+ wrappers
------------------------------------------------------------------ */
-void
-ML_(PRE_sys_getsockopt) ( ThreadId tid,
- UWord arg0, UWord arg1, UWord arg2,
- UWord arg3, UWord arg4 )
-{
-#warning GrP fixme darwin-specific sockopts
-}
-
-void
-ML_(POST_sys_getsockopt) ( ThreadId tid,
- SysRes res,
- UWord arg0, UWord arg1, UWord arg2,
- UWord arg3, UWord arg4 )
-{
-#warning GrP fixme darwin-specific sockopts
-}
-
-
#define PRE(name) DEFN_PRE_TEMPLATE(darwin, name)
#define POST(name) DEFN_POST_TEMPLATE(darwin, name)
@@ -635,7 +617,7 @@
#define MACH_MSGH_ID VG_(get_ThreadState)(tid)->os_state.msgh_id
/* ---------------------------------------------------------------------
- darwin ioctl wrapper helpers
+ darwin ioctl wrapper
------------------------------------------------------------------ */
PRE(sys_ioctl)
@@ -954,7 +936,7 @@
/* ---------------------------------------------------------------------
- darwin fcntl wrapper helpers
+ darwin fcntl wrapper
------------------------------------------------------------------ */
static const char *name_for_fcntl(UWord cmd) {
#define F(n) case VKI_##n: return #n
@@ -2119,19 +2101,36 @@
PRE(sys_getsockopt)
{
+ Addr optval_p = ARG3;
+ Addr optlen_p = ARG4;
PRINT("sys_getsockopt ( %ld, %ld, %ld, %#lx, %#lx )",
ARG1,ARG2,ARG3,ARG4,ARG5);
PRE_REG_READ5(long, "getsockopt",
int, s, int, level, int, optname,
void *, optval, int, *optlen);
- ML_(generic_PRE_sys_getsockopt)(tid, ARG1,ARG2,ARG3,ARG4,ARG5);
+ /* int getsockopt(int socket, int level, int option_name,
+ void *restrict option_value,
+ socklen_t *restrict option_len); */
+ /* vg_assert(sizeof(socklen_t) == sizeof(UInt)); */
+ if (optval_p != (Addr)NULL) {
+ ML_(buf_and_len_pre_check) ( tid, optval_p, optlen_p,
+ "socketcall.getsockopt(optval)",
+ "socketcall.getsockopt(optlen)" );
+# warning GrP fixme darwin-specific sockopts
+ }
}
POST(sys_getsockopt)
{
+ Addr optval_p = ARG3;
+ Addr optlen_p = ARG4;
vg_assert(SUCCESS);
- ML_(generic_POST_sys_getsockopt)(tid, VG_(mk_SysRes_Success)(RES),
- ARG1,ARG2,ARG3,ARG4,ARG5);
+ if (optval_p != (Addr)NULL) {
+ ML_(buf_and_len_post_check) ( tid, VG_(mk_SysRes_Success)(RES),
+ optval_p, optlen_p,
+ "socketcall.getsockopt(optlen_out)" );
+# warning GrP fixme darwin-specific sockopts
+ }
}
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c 2009-02-16 22:06:20 UTC (rev 9184)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c 2009-02-17 00:06:07 UTC (rev 9185)
@@ -983,9 +983,8 @@
return *a_p;
}
-static
-void buf_and_len_pre_check( ThreadId tid, Addr buf_p, Addr buflen_p,
- Char* buf_s, Char* buflen_s )
+void ML_(buf_and_len_pre_check) ( ThreadId tid, Addr buf_p, Addr buflen_p,
+ Char* buf_s, Char* buflen_s )
{
if (VG_(tdict).track_pre_mem_write) {
UInt buflen_in = deref_UInt( tid, buflen_p, buflen_s);
@@ -995,9 +994,8 @@
}
}
-static
-void buf_and_len_post_check( ThreadId tid, SysRes res,
- Addr buf_p, Addr buflen_p, Char* s )
+void ML_(buf_and_len_post_check) ( ThreadId tid, SysRes res,
+ Addr buf_p, Addr buflen_p, Char* s )
{
if (!res.isError && VG_(tdict).track_post_mem_write) {
UInt buflen_out = deref_UInt( tid, buflen_p, s);
@@ -1284,9 +1282,9 @@
Addr addr_p = arg1;
Addr addrlen_p = arg2;
if (addr_p != (Addr)NULL)
- buf_and_len_pre_check ( tid, addr_p, addrlen_p,
- "socketcall.accept(addr)",
- "socketcall.accept(addrlen_in)" );
+ ML_(buf_and_len_pre_check) ( tid, addr_p, addrlen_p,
+ "socketcall.accept(addr)",
+ "socketcall.accept(addrlen_in)" );
}
SysRes
@@ -1303,8 +1301,8 @@
Addr addr_p = arg1;
Addr addrlen_p = arg2;
if (addr_p != (Addr)NULL)
- buf_and_len_post_check ( tid, res, addr_p, addrlen_p,
- "socketcall.accept(addrlen_out)" );
+ ML_(buf_and_len_post_check) ( tid, res, addr_p, addrlen_p,
+ "socketcall.accept(addrlen_out)" );
if (VG_(clo_track_fds))
ML_(record_fd_open_nameless)(tid, res.res);
}
@@ -1358,9 +1356,9 @@
Addr fromlen_p = arg5;
PRE_MEM_WRITE( "socketcall.recvfrom(buf)", buf_p, len );
if (from_p != (Addr)NULL)
- buf_and_len_pre_check ( tid, from_p, fromlen_p,
- "socketcall.recvfrom(from)",
- "socketcall.recvfrom(fromlen_in)" );
+ ML_(buf_and_len_pre_check) ( tid, from_p, fromlen_p,
+ "socketcall.recvfrom(from)",
+ "socketcall.recvfrom(fromlen_in)" );
}
void
@@ -1376,8 +1374,8 @@
vg_assert(!res.isError); /* guaranteed by caller */
if (from_p != (Addr)NULL)
- buf_and_len_post_check ( tid, res, from_p, fromlen_p,
- "socketcall.recvfrom(fromlen_out)" );
+ ML_(buf_and_len_post_check) ( tid, res, from_p, fromlen_p,
+ "socketcall.recvfrom(fromlen_out)" );
POST_MEM_WRITE( buf_p, len );
}
@@ -1439,49 +1437,6 @@
/* ------ */
void
-ML_(generic_PRE_sys_getsockopt) ( ThreadId tid,
- UWord arg0, UWord arg1, UWord arg2,
- UWord arg3, UWord arg4 )
-{
- /* int getsockopt(int s, int level, int optname,
- void *optval, socklen_t *optlen); */
- Addr optval_p = arg3;
- Addr optlen_p = arg4;
- /* vg_assert(sizeof(socklen_t) == sizeof(UInt)); */
- if (optval_p != (Addr)NULL) {
- buf_and_len_pre_check ( tid, optval_p, optlen_p,
- "socketcall.getsockopt(optval)",
- "socketcall.getsockopt(optlen)" );
- }
-
- // DDD fixme
- I_die_here;
- //ML_(PRE_sys_getsockopt)(tid, arg0, arg1, arg2, arg3, arg4);
-}
-
-void
-ML_(generic_POST_sys_getsockopt) ( ThreadId tid,
- SysRes res,
- UWord arg0, UWord arg1, UWord arg2,
- UWord arg3, UWord arg4 )
-{
- Addr optval_p = arg3;
- Addr optlen_p = arg4;
- vg_assert(!res.isError); /* guaranteed by caller */
- if (optval_p != (Addr)NULL) {
- buf_and_len_post_check ( tid, res, optval_p, optlen_p,
- "socketcall.getsockopt(optlen_out)" );
-
- }
-
- // DDD fixme
- I_die_here;
- //ML_(POST_sys_getsockopt)(tid, res, arg0, arg1, arg2, arg3, arg4);
-}
-
-/* ------ */
-
-void
ML_(generic_PRE_sys_getsockname) ( ThreadId tid,
UWord arg0, UWord arg1, UWord arg2 )
{
@@ -1489,9 +1444,9 @@
Addr name_p = arg1;
Addr namelen_p = arg2;
/* Nb: name_p cannot be NULL */
- buf_and_len_pre_check ( tid, name_p, namelen_p,
- "socketcall.getsockname(name)",
- "socketcall.getsockname(namelen_in)" );
+ ML_(buf_and_len_pre_check) ( tid, name_p, namelen_p,
+ "socketcall.getsockname(name)",
+ "socketcall.getsockname(namelen_in)" );
}
void
@@ -1502,8 +1457,8 @@
Addr name_p = arg1;
Addr namelen_p = arg2;
vg_assert(!res.isError); /* guaranteed by caller */
- buf_and_len_post_check ( tid, res, name_p, namelen_p,
- "socketcall.getsockname(namelen_out)" );
+ ML_(buf_and_len_post_check) ( tid, res, name_p, namelen_p,
+ "socketcall.getsockname(namelen_out)" );
}
/* ------ */
@@ -1516,9 +1471,9 @@
Addr name_p = arg1;
Addr namelen_p = arg2;
/* Nb: name_p cannot be NULL */
- buf_and_len_pre_check ( tid, name_p, namelen_p,
- "socketcall.getpeername(name)",
- "socketcall.getpeername(namelen_in)" );
+ ML_(buf_and_len_pre_check) ( tid, name_p, namelen_p,
+ "socketcall.getpeername(name)",
+ "socketcall.getpeername(namelen_in)" );
}
void
@@ -1529,8 +1484,8 @@
Addr name_p = arg1;
Addr namelen_p = arg2;
vg_assert(!res.isError); /* guaranteed by caller */
- buf_and_len_post_check ( tid, res, name_p, namelen_p,
- "socketcall.getpeername(namelen_out)" );
+ ML_(buf_and_len_post_check) ( tid, res, name_p, namelen_p,
+ "socketcall.getpeername(namelen_out)" );
}
/* ------ */
@@ -1978,21 +1933,21 @@
UWord arg1, UWord arg2, UWord arg3,
UWord arg4, UWord arg5, Off64T arg6 )
{
- // GrP fixme this has races - don't use
- // * needs to RETRY if advisory succeeds but map fails
- // (could have been some other thread in a nonblocking call)
- // * needs to not use fixed-position mmap() on Darwin
- // (mmap will cheerfully smash whatever's already there, which might
- // be a new mapping from some other thread in a nonblocking call)
-#if defined(VGO_darwin)
- __builtin_trap();
-#endif
-
Addr advised;
SysRes sres;
MapRequest mreq;
Bool mreq_ok;
+ // GrP fixme this has races - don't use
+ // * needs to RETRY if advisory succeeds but map fails
+ // (could have been some other thread in a nonblocking call)
+ // * needs to not use fixed-position mmap() on Darwin
+ // (mmap will cheerfully smash whatever's already there, which might
+ // be a new mapping from some other thread in a nonblocking call)
+#if defined(VGO_darwin)
+ __builtin_trap();
+#endif
+
if (arg2 == 0) {
/* SuSV3 says: If len is zero, mmap() shall fail and no mapping
shall be established. */
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-linux.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-linux.c 2009-02-16 22:06:20 UTC (rev 9184)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-linux.c 2009-02-17 00:06:07 UTC (rev 9185)
@@ -5102,6 +5102,72 @@
}
}
+/* ---------------------------------------------------------------------
+ socketcall wrapper helpers
+ ------------------------------------------------------------------ */
+
+void
+ML_(linux_PRE_sys_getsockopt) ( ThreadId tid,
+ UWord arg0, UWord arg1, UWord arg2,
+ UWord arg3, UWord arg4 )
+{
+ /* int getsockopt(int s, int level, int optname,
+ void *optval, socklen_t *optlen); */
+ Addr optval_p = arg3;
+ Addr optlen_p = arg4;
+ /* vg_assert(sizeof(socklen_t) == sizeof(UInt)); */
+ if (optval_p != (Addr)NULL) {
+ ML_(buf_and_len_pre_check) ( tid, optval_p, optlen_p,
+ "socketcall.getsockopt(optval)",
+ "socketcall.getsockopt(optlen)" );
+ if (arg1 == VKI_SOL_SCTP &&
+ (arg2 == VKI_SCTP_GET_PEER_ADDRS ||
+ arg2 == VKI_SCTP_GET_LOCAL_ADDRS))
+ {
+ struct vki_sctp_getaddrs *ga = (struct vki_sctp_getaddrs*)arg3;
+ int address_bytes = sizeof(struct vki_sockaddr_in6) * ga->addr_num;
+ PRE_MEM_WRITE( "socketcall.getsockopt(optval.addrs)",
+ (Addr)ga->addrs, address_bytes );
+ }
+ }
+}
+
+void
+ML_(linux_POST_sys_getsockopt) ( ThreadId tid,
+ SysRes res,
+ UWord arg0, UWord arg1, UWord arg2,
+ UWord arg3, UWord arg4 )
+{
+ Addr optval_p = arg3;
+ Addr optlen_p = arg4;
+ vg_assert(!res.isError); /* guaranteed by caller */
+ if (optval_p != (Addr)NULL) {
+ ML_(buf_and_len_post_check) ( tid, res, optval_p, optlen_p,
+ "socketcall.getsockopt(optlen_out)" );
+ if (arg1 == VKI_SOL_SCTP &&
+ (arg2 == VKI_SCTP_GET_PEER_ADDRS ||
+ arg2 == VKI_SCTP_GET_LOCAL_ADDRS))
+ {
+ struct vki_sctp_getaddrs *ga = (struct vki_sctp_getaddrs*)arg3;
+ struct vki_sockaddr *a = ga->addrs;
+ int i;
+ for (i = 0; i < ga->addr_num; i++) {
+ int sl = 0;
+ if (a->sa_family == VKI_AF_INET)
+ sl = sizeof(struct vki_sockaddr_in);
+ else if (a->sa_family == VKI_AF_INET6)
+ sl = sizeof(struct vki_sockaddr_in6);
+ else {
+ VG_(message)(Vg_UserMsg, "Warning: getsockopt: unhandled address type %d", a->sa_family);
+ }
+ a = (struct vki_sockaddr*)((char*)a + sl);
+ }
+ POST_MEM_WRITE( (Addr)ga->addrs, (char*)a - (char*)ga->addrs );
+ }
+ }
+}
+
+
#undef PRE
#undef POST
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-ppc32-linux.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-02-16 22:06:20 UTC (rev 9184)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-02-17 00:06:07 UTC (rev 9185)
@@ -507,8 +507,8 @@
/* int getsockopt(int s, int level, int optname,
void *optval, socklen_t *optlen); */
PRE_MEM_READ( "socketcall.getsockopt(args)", ARG2, 5*sizeof(Addr) );
- ML_(generic_PRE_sys_getsockopt)( tid, ARG2_0, ARG2_1, ARG2_2,
- ARG2_3, ARG2_4 );
+ ML_(linux_PRE_sys_getsockopt)( tid, ARG2_0, ARG2_1, ARG2_2,
+ ARG2_3, ARG2_4 );
break;
case VKI_SYS_GETSOCKNAME:
@@ -628,9 +628,9 @@
break;
case VKI_SYS_GETSOCKOPT:
- ML_(generic_POST_sys_getsockopt)( tid, VG_(mk_SysRes_Success)(RES),
- ARG2_0, ARG2_1,
- ARG2_2, ARG2_3, ARG2_4 );
+ ML_(linux_POST_sys_getsockopt)( tid, VG_(mk_SysRes_Success)(RES),
+ ARG2_0, ARG2_1,
+ ARG2_2, ARG2_3, ARG2_4 );
break;
case VKI_SYS_GETSOCKNAME:
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-ppc64-linux.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-02-16 22:06:20 UTC (rev 9184)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-02-17 00:06:07 UTC (rev 9185)
@@ -534,8 +534,8 @@
/* int getsockopt(int s, int level, int optname,
void *optval, socklen_t *optlen); */
PRE_MEM_READ( "socketcall.getsockopt(args)", ARG2, 5*sizeof(Addr) );
- ML_(generic_PRE_sys_getsockopt)( tid, ARG2_0, ARG2_1, ARG2_2,
- ARG2_3, ARG2_4 );
+ ML_(linux_PRE_sys_getsockopt)( tid, ARG2_0, ARG2_1, ARG2_2,
+ ARG2_3, ARG2_4 );
break;
case VKI_SYS_GETSOCKNAME:
@@ -655,9 +655,9 @@
break;
case VKI_SYS_GETSOCKOPT:
- ML_(generic_POST_sys_getsockopt)( tid, VG_(mk_SysRes_Success)(RES),
- ARG2_0, ARG2_1,
- ARG2_2, ARG2_3, ARG2_4 );
+ ML_(linux_POST_sys_getsockopt)( tid, VG_(mk_SysRes_Success)(RES),
+ ARG2_0, ARG2_1,
+ ARG2_2, ARG2_3, ARG2_4 );
break;
case VKI_SYS_GETSOCKNAME:
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-x86-linux.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-x86-linux.c 2009-02-16 22:06:20 UTC (rev 9184)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-x86-linux.c 2009-02-17 00:06:07 UTC (rev 9185)
@@ -1512,8 +1512,8 @@
/* int getsockopt(int s, int level, int optname,
void *optval, socklen_t *optlen); */
PRE_MEM_READ( "socketcall.getsockopt(args)", ARG2, 5*sizeof(Addr) );
- ML_(generic_PRE_sys_getsockopt)( tid, ARG2_0, ARG2_1, ARG2_2,
- ARG2_3, ARG2_4 );
+ ML_(linux_PRE_sys_getsockopt)( tid, ARG2_0, ARG2_1, ARG2_2,
+ ARG2_3, ARG2_4 );
break;
case VKI_SYS_GETSOCKNAME:
@@ -1633,9 +1633,9 @@
break;
case VKI_SYS_GETSOCKOPT:
- ML_(generic_POST_sys_getsockopt)( tid, VG_(mk_SysRes_Success)(RES),
- ARG2_0, ARG2_1,
- ARG2_2, ARG2_3, ARG2_4 );
+ ML_(linux_POST_sys_getsockopt)( tid, VG_(mk_SysRes_Success)(RES),
+ ARG2_0, ARG2_1,
+ ARG2_2, ARG2_3, ARG2_4 );
break;
case VKI_SYS_GETSOCKNAME:
|