TIOCLINUX support for Valgrind

Pavel Roskin proski at gnu.org
Tue Aug 13 13:27:55 UTC 2002


Hello!

If somebody wants to use Valgrind with MC, this patch should be applied to
Valgrind 1.0.0.  It adds support for TIOCLINUX, which is used in MC.  I
already submitted this patch to the author of Valgrind.

==========================
--- vg_syscall_mem.c
+++ vg_syscall_mem.c
@@ -1693,6 +1693,13 @@ void VG_(perform_assumed_nonblocking_sys
                                  sizeof(struct winsize) );
                KERNEL_DO_SYSCALL(tid,res);
                break;
+            case TIOCLINUX:
+               must_be_readable( tst, "ioctl(TIOCLINUX)", arg3, 
+                                 sizeof(int) );
+               KERNEL_DO_SYSCALL(tid,res);
+               if (!VG_(is_kerror)(res) && res == 0)
+                  make_readable ( arg3, sizeof(int) );
+               break;
             case TIOCGPGRP:
                /* Get process group ID for foreground processing group. */
                must_be_writable( tst, "ioctl(TIOCGPGRP)", arg3,
==========================

-- 
Regards,
Pavel Roskin




More information about the mc-devel mailing list