Valgrind: r16322 - in /trunk: coregrind/m_syswrap/priv_syswrap-darwin.h coregrind/m_syswrap/syswrap-darwin.c include/vki/vki-scnums-darwin.h

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Valgrind: r16322 - in /trunk: coregrind/m_syswrap/priv_syswrap-darwin.h coregrind/m_syswrap/syswrap-darwin.c include/vki/vki-scnums-darwin.h

svn-2
Author: rhyskidd
Date: Sun Apr 30 01:28:10 2017
New Revision: 16322

Log:
macos: Add a no-op wrapper for a new-in-10.10 syscall: faccessat

Patch from Louis Brunner.

Modified:
    trunk/coregrind/m_syswrap/priv_syswrap-darwin.h
    trunk/coregrind/m_syswrap/syswrap-darwin.c
    trunk/include/vki/vki-scnums-darwin.h

Modified: trunk/coregrind/m_syswrap/priv_syswrap-darwin.h
==============================================================================
--- trunk/coregrind/m_syswrap/priv_syswrap-darwin.h (original)
+++ trunk/coregrind/m_syswrap/priv_syswrap-darwin.h Sun Apr 30 01:28:10 2017
@@ -569,7 +569,7 @@
 // NYI openat          // 463
 // NYI openat_nocancel // 464
 // NYI renameat        // 465
-// NYI faccessat       // 466
+DECL_TEMPLATE(darwin, faccessat);                // 466
 // NYI fchmodat        // 467
 // NYI fchownat        // 468
 // NYI fstatat         // 469

Modified: trunk/coregrind/m_syswrap/syswrap-darwin.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-darwin.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-darwin.c Sun Apr 30 01:28:10 2017
@@ -9699,6 +9699,14 @@
       POST_MEM_WRITE(ARG3, ARG4);
 }
 
+PRE(faccessat)
+{
+    PRINT("faccessat(FIXME)(fd:%ld, path:%#lx(%s), amode:%#lx, flag:%#lx)",
+        ARG1, ARG2, (HChar*)ARG2, ARG3, ARG4);
+    PRE_REG_READ4(int, "faccessat",
+                  int, fd, user_addr_t, path, int, amode, int, flag);
+}
+
 PRE(readlinkat)
 {
     Word  saved = SYSNO;
@@ -10321,6 +10329,7 @@
    MACXY(__NR_sysctlbyname,        sysctlbyname),       // 274
    MACXY(__NR_necp_match_policy,   necp_match_policy),  // 460
    MACXY(__NR_getattrlistbulk,     getattrlistbulk),    // 461
+   MACX_(__NR_faccessat,           faccessat),          // 466
    MACX_(__NR_readlinkat,          readlinkat),         // 473
    MACX_(__NR_bsdthread_ctl,       bsdthread_ctl),      // 478
    MACX_(__NR_csrctl,              csrctl),             // 483

Modified: trunk/include/vki/vki-scnums-darwin.h
==============================================================================
--- trunk/include/vki/vki-scnums-darwin.h (original)
+++ trunk/include/vki/vki-scnums-darwin.h Sun Apr 30 01:28:10 2017
@@ -746,6 +746,7 @@
 #endif /* DARWIN_VERS >= DARWIN_10_12 */
 
 #if DARWIN_VERS >= DARWIN_10_10
+#define __NR_faccessat              VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(466)
 #define __NR_readlinkat             VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(473)
 #define __NR_bsdthread_ctl          VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(478)
 #define __NR_csrctl                 VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(483)


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers