From: Julian Seward Date: Thu, 20 Oct 2005 01:09:57 +0000 (+0000) Subject: The Spin-Doctor arrives in Valgrind-Land: rename --weird-hacks= to X-Git-Tag: svn/VALGRIND_3_1_0~277 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4e2059f06ac74ffb47ee57482983b4f69330f532;p=thirdparty%2Fvalgrind.git The Spin-Doctor arrives in Valgrind-Land: rename --weird-hacks= to --simulation-hints=. Bwaha. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4955 --- diff --git a/coregrind/m_main.c b/coregrind/m_main.c index f9ea6c74b6..251e577c2e 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -883,8 +883,8 @@ static void usage_NORETURN ( Bool debug_help ) "\n" " uncommon user options for all Valgrind tools:\n" " --run-libc-freeres=no|yes free up glibc memory at exit? [yes]\n" -" --weird-hacks=hack1,hack2,... known hacks: lax-ioctls\n" -" enable-outer [none]\n" +" --simulation-hints=hint1,hint2,... known hints:\n" +" lax-ioctls, enable-outer [none]\n" " --pointercheck=no|yes enforce client address space limits [yes]\n" " --show-emwarns=no|yes show warnings about emulation limits? [no]\n" " --smc-check=none|stack|all checks for self-modifying code: none,\n" @@ -1111,7 +1111,7 @@ static Bool process_cmd_line_options( UInt* client_auxv, const char* toolname ) else VG_BOOL_CLO(arg, "--model-pthreads", VG_(clo_model_pthreads)) else VG_STR_CLO (arg, "--db-command", VG_(clo_db_command)) - else VG_STR_CLO (arg, "--weird-hacks", VG_(clo_weird_hacks)) + else VG_STR_CLO (arg, "--simulation-hints", VG_(clo_simulation_hints)) else VG_NUM_CLO (arg, "--dump-error", VG_(clo_dump_error)) else VG_NUM_CLO (arg, "--input-fd", VG_(clo_input_fd)) diff --git a/coregrind/m_options.c b/coregrind/m_options.c index 21a723727d..a60f074b6b 100644 --- a/coregrind/m_options.c +++ b/coregrind/m_options.c @@ -67,7 +67,7 @@ Bool VG_(clo_trace_sched) = False; Bool VG_(clo_trace_pthreads) = False; Int VG_(clo_dump_error) = 0; Int VG_(clo_backtrace_size) = 12; -Char* VG_(clo_weird_hacks) = NULL; +Char* VG_(clo_simulation_hints) = NULL; Bool VG_(clo_run_libc_freeres) = True; Bool VG_(clo_track_fds) = False; Bool VG_(clo_show_below_main)= False; diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c index ba07e6db49..fb8ffb5a94 100644 --- a/coregrind/m_syswrap/syswrap-generic.c +++ b/coregrind/m_syswrap/syswrap-generic.c @@ -3857,7 +3857,7 @@ PRE(sys_ioctl) default: { UInt dir = _VKI_IOC_DIR(ARG2); UInt size = _VKI_IOC_SIZE(ARG2); - if (VG_(strstr)(VG_(clo_weird_hacks), "lax-ioctls") != NULL) { + if (VG_(strstr)(VG_(clo_simulation_hints), "lax-ioctls") != NULL) { /* * Be very lax about ioctl handling; the only * assumption is that the size is correct. Doesn't @@ -4711,10 +4711,10 @@ PRE(sys_write) PRE_REG_READ3(ssize_t, "write", unsigned int, fd, const char *, buf, vki_size_t, count); /* check to see if it is allowed. If not, try for an exemption from - --weird-hacks=enable-outer (used for self hosting). */ + --simulation-hints=enable-outer (used for self hosting). */ ok = ML_(fd_allowed)(ARG1, "write", tid, False); if (!ok && ARG1 == 2/*stderr*/ - && VG_(strstr)(VG_(clo_weird_hacks),"enable-outer")) + && VG_(strstr)(VG_(clo_simulation_hints),"enable-outer")) ok = True; if (!ok) SET_STATUS_Failure( VKI_EBADF ); diff --git a/coregrind/pub_core_options.h b/coregrind/pub_core_options.h index 67d8807259..2bac359977 100644 --- a/coregrind/pub_core_options.h +++ b/coregrind/pub_core_options.h @@ -122,14 +122,14 @@ extern Int VG_(clo_dump_error); /* Number of parents of a backtrace. Default: 8. */ extern Int VG_(clo_backtrace_size); /* Engage miscellaneous weird hacks needed for some progs. */ -extern Char* VG_(clo_weird_hacks); +extern Char* VG_(clo_simulation_hints); /* Track open file descriptors? */ extern Bool VG_(clo_track_fds); /* Should we run __libc_freeres at exit? Sometimes causes crashes. Default: YES. Note this is subservient to VG_(needs).libc_freeres; - if the latter says False, then the setting of VG_(clo_weird_hacks) + if the latter says False, then the setting of VG_(clo_run_libc_freeres) is ignored. Ie if a tool says no, I don't want this to run, that cannot be overridden from the command line. */ extern Bool VG_(clo_run_libc_freeres); diff --git a/docs/valgrind.1 b/docs/valgrind.1 index fbe7fd70e7..2da614434a 100644 --- a/docs/valgrind.1 +++ b/docs/valgrind.1 @@ -521,11 +521,11 @@ although at the cost of possibly falsely reporting space leaks in libc.so. .TP .B ---weird-hacks=hack1,hack2,\.\.\. +--simulation-hints=hint1,hint2,\.\.\. Pass miscellaneous hints to \fBvalgrind\fP which slightly modify the simulated behaviour in nonstandard or dangerous ways, possibly to help -the simulation of strange features. By default no hacks are enabled. Use -with caution! Currently known hacks are: +the simulation of strange features. By default no hints are enabled. Use +with caution! Currently known hints are: .RS .TP diff --git a/docs/xml/manual-core.xml b/docs/xml/manual-core.xml index 68b7b44041..fa55e92739 100644 --- a/docs/xml/manual-core.xml +++ b/docs/xml/manual-core.xml @@ -1009,13 +1009,13 @@ Addrcheck), the following options apply. libc.so. - - --weird-hacks=hack1,hack2,... + + --simulation-hints=hint1,hint2,... 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 are enabled. Use with caution! - Currently known hacks are: + By default no hints are enabled. Use with caution! + Currently known hints are: lax-ioctls Be very lax about ioctl handling; the only assumption diff --git a/memcheck/tests/weirdioctl.c b/memcheck/tests/weirdioctl.c index f79b3c8ff9..1548294979 100644 --- a/memcheck/tests/weirdioctl.c +++ b/memcheck/tests/weirdioctl.c @@ -1,9 +1,9 @@ /* A program which sets a readable fd to have a timeout, and therefore - needs --weird-hacks=ioctl-VTIME in order to run without + needs --simulation-hints=ioctl-VTIME in order to run without blocking. - [Nb: no longer true, since the ioctl-VTIME weird hack no longer exists] + [Nb: no longer true, since the ioctl-VTIME hack no longer exists] */ #include diff --git a/none/tests/cmdline1.stdout.exp b/none/tests/cmdline1.stdout.exp index 5ce37a323f..9cdf320372 100644 --- a/none/tests/cmdline1.stdout.exp +++ b/none/tests/cmdline1.stdout.exp @@ -18,8 +18,8 @@ usage: valgrind --tool= [options] prog-and-args uncommon user options for all Valgrind tools: --run-libc-freeres=no|yes free up glibc memory at exit? [yes] - --weird-hacks=hack1,hack2,... known hacks: lax-ioctls - enable-outer [none] + --simulation-hints=hint1,hint2,... known hints: + lax-ioctls, enable-outer [none] --pointercheck=no|yes enforce client address space limits [yes] --show-emwarns=no|yes show warnings about emulation limits? [no] --smc-check=none|stack|all checks for self-modifying code: none, diff --git a/none/tests/cmdline2.stdout.exp b/none/tests/cmdline2.stdout.exp index 896eefade0..f1d800b2ac 100644 --- a/none/tests/cmdline2.stdout.exp +++ b/none/tests/cmdline2.stdout.exp @@ -18,8 +18,8 @@ usage: valgrind --tool= [options] prog-and-args uncommon user options for all Valgrind tools: --run-libc-freeres=no|yes free up glibc memory at exit? [yes] - --weird-hacks=hack1,hack2,... known hacks: lax-ioctls - enable-outer [none] + --simulation-hints=hint1,hint2,... known hints: + lax-ioctls, enable-outer [none] --pointercheck=no|yes enforce client address space limits [yes] --show-emwarns=no|yes show warnings about emulation limits? [no] --smc-check=none|stack|all checks for self-modifying code: none,