]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix spelling mistake: wierd*hacks --> weird*hacks
authorJulian Seward <jseward@acm.org>
Sun, 12 May 2002 10:52:16 +0000 (10:52 +0000)
committerJulian Seward <jseward@acm.org>
Sun, 12 May 2002 10:52:16 +0000 (10:52 +0000)
Also add a testcase.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@265

13 files changed:
cachegrind/docs/manual.html
coregrind/docs/manual.html
coregrind/valgrind.in
coregrind/vg_include.h
coregrind/vg_main.c
coregrind/vg_scheduler.c
docs/manual.html
memcheck/docs/manual.html
tests/weirdioctl.c [new file with mode: 0644]
valgrind.in
vg_include.h
vg_main.c
vg_scheduler.c

index 8ada25fe201badbf5114b23a7fc832d57ef53189..24f0d2b9722bd0309fadaf8823fded820a7ee2a5 100644 (file)
@@ -565,7 +565,7 @@ follows:
       described in detail in <a href="#cache">Section 7</a>.
       </li><br><p>
 
-  <li><code>--wierd-hacks=hack1,hack2,...</code>
+  <li><code>--weird-hacks=hack1,hack2,...</code>
       Pass miscellaneous hints to Valgrind which slightly modify the
       simulated behaviour in nonstandard or dangerous ways, possibly
       to help the simulation of strange features.  By default no hacks
index 8ada25fe201badbf5114b23a7fc832d57ef53189..24f0d2b9722bd0309fadaf8823fded820a7ee2a5 100644 (file)
@@ -565,7 +565,7 @@ follows:
       described in detail in <a href="#cache">Section 7</a>.
       </li><br><p>
 
-  <li><code>--wierd-hacks=hack1,hack2,...</code>
+  <li><code>--weird-hacks=hack1,hack2,...</code>
       Pass miscellaneous hints to Valgrind which slightly modify the
       simulated behaviour in nonstandard or dangerous ways, possibly
       to help the simulation of strange features.  By default no hacks
index 6cc9a544cc786f9e994d7819e3d6455396477458..3d12fe1ed518fa03b68b5654c4f8b4ee05dd2a08 100755 (executable)
@@ -67,7 +67,7 @@ do
     --suppressions=*)       vgopts="$vgopts $arg"; shift;;
     --cachesim=yes)         vgopts="$vgopts $arg"; shift;;
     --cachesim=no)          vgopts="$vgopts $arg"; shift;;
-    --wierd-hacks=*)        vgopts="$vgopts $arg"; shift;;
+    --weird-hacks=*)        vgopts="$vgopts $arg"; shift;;
 #   options for debugging Valgrind
     --sanity-level=*)       vgopts="$vgopts $arg"; shift;;
     --single-step=yes)      vgopts="$vgopts $arg"; shift;;
@@ -133,7 +133,7 @@ if [ $# = 0 ] || [ z"$dousage" = z1 ]; then
    echo "    --check-addrVs=no|yes     experimental lighterweight checking? [yes]"
    echo "                              yes == Valgrind's original behaviour"
    echo "    --cachesim=no|yes         do cache profiling? [no]"
-   echo "    --wierd-hacks=hack1,hack2,...  [no hacks selected]"
+   echo "    --weird-hacks=hack1,hack2,...  [no hacks selected]"
    echo "         recognised hacks are: ioctl-VTIME"
    echo ""
    echo
index 74bfa7d257c5d9cf6934f24e8646d7c6be699282..765d719f4f922535fd628f35b7e53a3bfa149449 100644 (file)
@@ -263,7 +263,7 @@ extern Int   VG_(clo_dump_error);
 /* Number of parents of a backtrace.  Default: 8.  */
 extern Int   VG_(clo_backtrace_size);
 /* Engage miscellaneous wierd hacks needed for some progs. */
-extern Char* VG_(clo_wierd_hacks);
+extern Char* VG_(clo_weird_hacks);
 
 
 /* ---------------------------------------------------------------------
index 05273b16327c4670cc680c59f650f63877196e2e..0d965a6b2e4630f7d28fe977f7c76c837c0978cd 100644 (file)
@@ -441,7 +441,7 @@ Int    VG_(clo_trace_pthread_level);
 ULong  VG_(clo_stop_after);
 Int    VG_(clo_dump_error);
 Int    VG_(clo_backtrace_size);
-Char*  VG_(clo_wierd_hacks);
+Char*  VG_(clo_weird_hacks);
 
 /* This Bool is needed by wrappers in vg_clientmalloc.c to decide how
    to behave.  Initially we say False. */
@@ -534,7 +534,7 @@ static void process_cmd_line_options ( void )
    VG_(clo_stop_after)       = 1000000000000LL;
    VG_(clo_dump_error)       = 0;
    VG_(clo_backtrace_size)   = 4;
-   VG_(clo_wierd_hacks)      = NULL;
+   VG_(clo_weird_hacks)      = NULL;
 
    eventually_logfile_fd = VG_(clo_logfile_fd);
 
@@ -799,8 +799,8 @@ static void process_cmd_line_options ( void )
       else if (STREQ(argv[i], "--trace-pthread=all"))
          VG_(clo_trace_pthread_level) = 2;
 
-      else if (STREQN(14, argv[i], "--wierd-hacks="))
-         VG_(clo_wierd_hacks) = &argv[i][14];
+      else if (STREQN(14, argv[i], "--weird-hacks="))
+         VG_(clo_weird_hacks) = &argv[i][14];
 
       else if (STREQN(13, argv[i], "--stop-after="))
          VG_(clo_stop_after) = VG_(atoll)(&argv[i][13]);
index 88cbe3e747c5c2fca3bb4d2ffd159952d147e54d..53edabb28d841a65efac2f106c37b45dd09024c6 100644 (file)
@@ -979,7 +979,7 @@ void poll_for_ready_fds ( void )
                writable, for some reason.  Ask me not why.  Since this
                is strange and potentially troublesome we only do it if
                the user asks specially. */
-            if (VG_(strstr)(VG_(clo_wierd_hacks), "ioctl-VTIME") != NULL)
+            if (VG_(strstr)(VG_(clo_weird_hacks), "ioctl-VTIME") != NULL)
                VKI_FD_SET(fd, &writefds);
             VKI_FD_SET(fd, &readfds); break;
          case __NR_write: 
index 8ada25fe201badbf5114b23a7fc832d57ef53189..24f0d2b9722bd0309fadaf8823fded820a7ee2a5 100644 (file)
@@ -565,7 +565,7 @@ follows:
       described in detail in <a href="#cache">Section 7</a>.
       </li><br><p>
 
-  <li><code>--wierd-hacks=hack1,hack2,...</code>
+  <li><code>--weird-hacks=hack1,hack2,...</code>
       Pass miscellaneous hints to Valgrind which slightly modify the
       simulated behaviour in nonstandard or dangerous ways, possibly
       to help the simulation of strange features.  By default no hacks
index 8ada25fe201badbf5114b23a7fc832d57ef53189..24f0d2b9722bd0309fadaf8823fded820a7ee2a5 100644 (file)
@@ -565,7 +565,7 @@ follows:
       described in detail in <a href="#cache">Section 7</a>.
       </li><br><p>
 
-  <li><code>--wierd-hacks=hack1,hack2,...</code>
+  <li><code>--weird-hacks=hack1,hack2,...</code>
       Pass miscellaneous hints to Valgrind which slightly modify the
       simulated behaviour in nonstandard or dangerous ways, possibly
       to help the simulation of strange features.  By default no hacks
diff --git a/tests/weirdioctl.c b/tests/weirdioctl.c
new file mode 100644 (file)
index 0000000..a666795
--- /dev/null
@@ -0,0 +1,43 @@
+
+/* A program which sets a readable fd to have a timeout, and therefore
+   needs --weird-hacks=ioctl-VTIME in order to run without
+   blocking. */
+
+#include <stdio.h>
+#include <sys/ioctl.h>
+#include <termio.h>
+
+int main ( void )
+{
+   int c;
+   int res;
+         struct termio tty, oldtty;
+
+          /**
+           ** Save the old tty settings, and get rid of echo
+           ** for the new tty settings
+           **/
+          ioctl(0, TCGETA, &oldtty);
+          tty = oldtty;
+          tty.c_lflag    &= ~(ICANON|ECHO|ECHOE|ECHOK|ECHONL);
+          tty.c_cc[VMIN]  = 0;
+          tty.c_cc[VTIME] = 5;
+          res = ioctl(0, TCSETA, &tty);
+         printf("first ioctl returned %d\n", res);
+
+          /**
+           ** Now do whatever stuff you want non-echoed
+           **/
+         while (1) {
+           c = getchar();
+           printf("got %d\n", c);
+         }
+
+          /**
+           ** Now reset the old settings
+           **/
+          res = ioctl(0, TCSETA, &oldtty);
+         printf("second ioctl returned %d\n", res);
+
+return 0;
+}
index 6cc9a544cc786f9e994d7819e3d6455396477458..3d12fe1ed518fa03b68b5654c4f8b4ee05dd2a08 100755 (executable)
@@ -67,7 +67,7 @@ do
     --suppressions=*)       vgopts="$vgopts $arg"; shift;;
     --cachesim=yes)         vgopts="$vgopts $arg"; shift;;
     --cachesim=no)          vgopts="$vgopts $arg"; shift;;
-    --wierd-hacks=*)        vgopts="$vgopts $arg"; shift;;
+    --weird-hacks=*)        vgopts="$vgopts $arg"; shift;;
 #   options for debugging Valgrind
     --sanity-level=*)       vgopts="$vgopts $arg"; shift;;
     --single-step=yes)      vgopts="$vgopts $arg"; shift;;
@@ -133,7 +133,7 @@ if [ $# = 0 ] || [ z"$dousage" = z1 ]; then
    echo "    --check-addrVs=no|yes     experimental lighterweight checking? [yes]"
    echo "                              yes == Valgrind's original behaviour"
    echo "    --cachesim=no|yes         do cache profiling? [no]"
-   echo "    --wierd-hacks=hack1,hack2,...  [no hacks selected]"
+   echo "    --weird-hacks=hack1,hack2,...  [no hacks selected]"
    echo "         recognised hacks are: ioctl-VTIME"
    echo ""
    echo
index 74bfa7d257c5d9cf6934f24e8646d7c6be699282..765d719f4f922535fd628f35b7e53a3bfa149449 100644 (file)
@@ -263,7 +263,7 @@ extern Int   VG_(clo_dump_error);
 /* Number of parents of a backtrace.  Default: 8.  */
 extern Int   VG_(clo_backtrace_size);
 /* Engage miscellaneous wierd hacks needed for some progs. */
-extern Char* VG_(clo_wierd_hacks);
+extern Char* VG_(clo_weird_hacks);
 
 
 /* ---------------------------------------------------------------------
index 05273b16327c4670cc680c59f650f63877196e2e..0d965a6b2e4630f7d28fe977f7c76c837c0978cd 100644 (file)
--- a/vg_main.c
+++ b/vg_main.c
@@ -441,7 +441,7 @@ Int    VG_(clo_trace_pthread_level);
 ULong  VG_(clo_stop_after);
 Int    VG_(clo_dump_error);
 Int    VG_(clo_backtrace_size);
-Char*  VG_(clo_wierd_hacks);
+Char*  VG_(clo_weird_hacks);
 
 /* This Bool is needed by wrappers in vg_clientmalloc.c to decide how
    to behave.  Initially we say False. */
@@ -534,7 +534,7 @@ static void process_cmd_line_options ( void )
    VG_(clo_stop_after)       = 1000000000000LL;
    VG_(clo_dump_error)       = 0;
    VG_(clo_backtrace_size)   = 4;
-   VG_(clo_wierd_hacks)      = NULL;
+   VG_(clo_weird_hacks)      = NULL;
 
    eventually_logfile_fd = VG_(clo_logfile_fd);
 
@@ -799,8 +799,8 @@ static void process_cmd_line_options ( void )
       else if (STREQ(argv[i], "--trace-pthread=all"))
          VG_(clo_trace_pthread_level) = 2;
 
-      else if (STREQN(14, argv[i], "--wierd-hacks="))
-         VG_(clo_wierd_hacks) = &argv[i][14];
+      else if (STREQN(14, argv[i], "--weird-hacks="))
+         VG_(clo_weird_hacks) = &argv[i][14];
 
       else if (STREQN(13, argv[i], "--stop-after="))
          VG_(clo_stop_after) = VG_(atoll)(&argv[i][13]);
index 88cbe3e747c5c2fca3bb4d2ffd159952d147e54d..53edabb28d841a65efac2f106c37b45dd09024c6 100644 (file)
@@ -979,7 +979,7 @@ void poll_for_ready_fds ( void )
                writable, for some reason.  Ask me not why.  Since this
                is strange and potentially troublesome we only do it if
                the user asks specially. */
-            if (VG_(strstr)(VG_(clo_wierd_hacks), "ioctl-VTIME") != NULL)
+            if (VG_(strstr)(VG_(clo_weird_hacks), "ioctl-VTIME") != NULL)
                VKI_FD_SET(fd, &writefds);
             VKI_FD_SET(fd, &readfds); break;
          case __NR_write: