|
From: Nicholas N. <nj...@cs...> - 2005-03-04 05:11:29
|
CVS commit by nethercote:
Make Memcheck the default tool again.
M +4 -24 coregrind/vg_main.c 1.261
M +1 -1 none/tests/cmdline1.stdout.exp 1.13
M +1 -1 none/tests/cmdline1.vgtest 1.2
M +1 -1 none/tests/cmdline2.stdout.exp 1.15
M +1 -1 none/tests/cmdline2.vgtest 1.2
--- valgrind/coregrind/vg_main.c #1.260:1.261
@@ -1285,13 +1285,4 @@ void VG_(bad_option) ( Char* opt )
}
-static void missing_tool_option ( void )
-{
- abort_msg();
- VG_(printf)("valgrind: Missing --tool option\n");
- list_tools();
- VG_(printf)("valgrind: Use --help for more information.\n");
- VG_(exit)(1);
-}
-
static void missing_prog ( void )
{
@@ -1476,5 +1467,5 @@ void usage ( Bool debug_help )
"\n"
" common user options for all Valgrind tools, with defaults in [ ]:\n"
-" --tool=<name> use the Valgrind tool named <name>\n"
+" --tool=<name> use the Valgrind tool named <name> [memcheck]\n"
" -h --help show this message\n"
" --help-debug show this message, plus debugging options\n"
@@ -1593,15 +1584,4 @@ static void pre_process_cmd_line_options
}
}
-
- /* If no tool specified, can act appropriately without loading tool */
- if (*tool == NULL) {
- if (0 == *need_help) {
- // neither --tool nor --help/--help-debug specified
- missing_tool_option();
- } else {
- // Give help message, without any tool-specific help
- usage(/*help-debug?*/2 == *need_help);
- }
- }
}
@@ -2350,5 +2330,5 @@ int main(int argc, char **argv, char **e
{
char **cl_argv;
- const char *tool = NULL;
+ const char *tool = "memcheck"; // default to Memcheck
const char *exec = NULL;
char *preload; /* tool-specific LD_PRELOAD .so */
@@ -2374,6 +2354,6 @@ int main(int argc, char **argv, char **e
// Command line argument handling order:
// * If --help/--help-debug are present, show usage message
- // (if --tool is also present, that includes the tool-specific usage)
- // * Then, if --tool is missing, abort with error msg
+ // (including the tool-specific usage)
+ // * (If no --tool option given, default to Memcheck)
// * Then, if client is missing, abort with error msg
// * Then, if any cmdline args are bad, abort with error msg
--- valgrind/none/tests/cmdline1.stdout.exp #1.12:1.13
@@ -2,5 +2,5 @@
common user options for all Valgrind tools, with defaults in [ ]:
- --tool=<name> use the Valgrind tool named <name>
+ --tool=<name> use the Valgrind tool named <name> [memcheck]
-h --help show this message
--help-debug show this message, plus debugging options
--- valgrind/none/tests/cmdline1.vgtest #1.1:1.2
@@ -1 +1 @@
-vgopts: --help
+vgopts: --help --tool=none
--- valgrind/none/tests/cmdline2.stdout.exp #1.14:1.15
@@ -2,5 +2,5 @@
common user options for all Valgrind tools, with defaults in [ ]:
- --tool=<name> use the Valgrind tool named <name>
+ --tool=<name> use the Valgrind tool named <name> [memcheck]
-h --help show this message
--help-debug show this message, plus debugging options
--- valgrind/none/tests/cmdline2.vgtest #1.1:1.2
@@ -1 +1 @@
-vgopts: --help-debug
+vgopts: --help-debug --tool=none
|