Valgrind: r16321 - 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: r16321 - 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:09:56 2017
New Revision: 16321

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

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:09:56 2017
@@ -586,7 +586,7 @@
 // NYI recvmsg_x       // 480
 // NYI sendmsg_x       // 481
 // NYI thread_selfusage  // 482
-// NYI csrctl          // 483
+DECL_TEMPLATE(darwin, csrctl);                      // 483
 DECL_TEMPLATE(darwin, guarded_open_dprotected_np);  // 484
 DECL_TEMPLATE(darwin, guarded_write_np);            // 485
 DECL_TEMPLATE(darwin, guarded_pwrite_np);           // 486

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:09:56 2017
@@ -9731,6 +9731,13 @@
                  void*, cmd, void*, arg1, void*, arg2, void*, arg3);
 }
 
+PRE(csrctl)
+{
+   PRINT("csrctl(op:%ld, useraddr:%#lx, usersize:%#lx) FIXME", ARG1, ARG2, ARG3);
+   PRE_REG_READ3(int, "csrctl",
+                 uint32_t, op, user_addr_t, useraddr, user_addr_t, usersize);
+}
+
 PRE(guarded_open_dprotected_np)
 {
     PRINT("guarded_open_dprotected_np("
@@ -10316,6 +10323,7 @@
    MACXY(__NR_getattrlistbulk,     getattrlistbulk),    // 461
    MACX_(__NR_readlinkat,          readlinkat),         // 473
    MACX_(__NR_bsdthread_ctl,       bsdthread_ctl),      // 478
+   MACX_(__NR_csrctl,              csrctl),             // 483
    MACX_(__NR_guarded_open_dprotected_np, guarded_open_dprotected_np),  // 484
    MACX_(__NR_guarded_write_np, guarded_write_np),      // 485
    MACX_(__NR_guarded_pwrite_np, guarded_pwrite_np),    // 486

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:09:56 2017
@@ -748,6 +748,7 @@
 #if DARWIN_VERS >= DARWIN_10_10
 #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)
 #define __NR_guarded_open_dprotected_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(484)
 #define __NR_guarded_write_np       VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(485)
 #define __NR_guarded_pwrite_np      VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(486)


------------------------------------------------------------------------------
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