From: Julian Seward Date: Sun, 12 May 2002 10:52:16 +0000 (+0000) Subject: Fix spelling mistake: wierd*hacks --> weird*hacks X-Git-Tag: svn/VALGRIND_1_0_3~199 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6920d2b5cd26295385d5e693d621e0930e15eff;p=thirdparty%2Fvalgrind.git Fix spelling mistake: wierd*hacks --> weird*hacks Also add a testcase. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@265 --- diff --git a/cachegrind/docs/manual.html b/cachegrind/docs/manual.html index 8ada25fe20..24f0d2b972 100644 --- a/cachegrind/docs/manual.html +++ b/cachegrind/docs/manual.html @@ -565,7 +565,7 @@ follows: described in detail in Section 7.

-

  • --wierd-hacks=hack1,hack2,... +
  • --weird-hacks=hack1,hack2,... 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/coregrind/docs/manual.html b/coregrind/docs/manual.html index 8ada25fe20..24f0d2b972 100644 --- a/coregrind/docs/manual.html +++ b/coregrind/docs/manual.html @@ -565,7 +565,7 @@ follows: described in detail in Section 7.

  • -

  • --wierd-hacks=hack1,hack2,... +
  • --weird-hacks=hack1,hack2,... 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/coregrind/valgrind.in b/coregrind/valgrind.in index 6cc9a544cc..3d12fe1ed5 100755 --- a/coregrind/valgrind.in +++ b/coregrind/valgrind.in @@ -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 diff --git a/coregrind/vg_include.h b/coregrind/vg_include.h index 74bfa7d257..765d719f4f 100644 --- a/coregrind/vg_include.h +++ b/coregrind/vg_include.h @@ -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); /* --------------------------------------------------------------------- diff --git a/coregrind/vg_main.c b/coregrind/vg_main.c index 05273b1632..0d965a6b2e 100644 --- a/coregrind/vg_main.c +++ b/coregrind/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]); diff --git a/coregrind/vg_scheduler.c b/coregrind/vg_scheduler.c index 88cbe3e747..53edabb28d 100644 --- a/coregrind/vg_scheduler.c +++ b/coregrind/vg_scheduler.c @@ -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: diff --git a/docs/manual.html b/docs/manual.html index 8ada25fe20..24f0d2b972 100644 --- a/docs/manual.html +++ b/docs/manual.html @@ -565,7 +565,7 @@ follows: described in detail in Section 7.

  • -

  • --wierd-hacks=hack1,hack2,... +
  • --weird-hacks=hack1,hack2,... 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/memcheck/docs/manual.html b/memcheck/docs/manual.html index 8ada25fe20..24f0d2b972 100644 --- a/memcheck/docs/manual.html +++ b/memcheck/docs/manual.html @@ -565,7 +565,7 @@ follows: described in detail in Section 7.

  • -

  • --wierd-hacks=hack1,hack2,... +
  • --weird-hacks=hack1,hack2,... 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 index 0000000000..a666795e32 --- /dev/null +++ b/tests/weirdioctl.c @@ -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 +#include +#include + +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; +} diff --git a/valgrind.in b/valgrind.in index 6cc9a544cc..3d12fe1ed5 100755 --- a/valgrind.in +++ b/valgrind.in @@ -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 diff --git a/vg_include.h b/vg_include.h index 74bfa7d257..765d719f4f 100644 --- a/vg_include.h +++ b/vg_include.h @@ -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); /* --------------------------------------------------------------------- diff --git a/vg_main.c b/vg_main.c index 05273b1632..0d965a6b2e 100644 --- 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]); diff --git a/vg_scheduler.c b/vg_scheduler.c index 88cbe3e747..53edabb28d 100644 --- a/vg_scheduler.c +++ b/vg_scheduler.c @@ -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: