]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Make -h -h be equivalent to --help-debug.
authorNicholas Nethercote <njn@valgrind.org>
Tue, 6 Jul 2010 04:25:12 +0000 (04:25 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Tue, 6 Jul 2010 04:25:12 +0000 (04:25 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11211

coregrind/m_main.c
docs/xml/manual-core.xml

index bae04633c935447f7ca19f196abda68fc358fa85..386b72ec791a6900679d446e4cee98f9ec78bfbd 100644 (file)
@@ -303,10 +303,10 @@ static void early_process_cmd_line_options ( /*OUT*/Int* need_help,
          VG_(printf)("valgrind-" VERSION "\n");
          VG_(exit)(0);
       }
-      else if VG_XACT_CLO(str, "--help", *need_help, 1) {}
-      else if VG_XACT_CLO(str, "-h",     *need_help, 1) {}
+      else if VG_XACT_CLO(str, "--help", *need_help, *need_help+1) {}
+      else if VG_XACT_CLO(str, "-h",     *need_help, *need_help+1) {}
 
-      else if VG_XACT_CLO(str, "--help-debug", *need_help, 2) {}
+      else if VG_XACT_CLO(str, "--help-debug", *need_help, *need_help+2) {}
 
       // The tool has already been determined, but we need to know the name
       // here.
@@ -1826,7 +1826,7 @@ Int valgrind_main ( Int argc, HChar **argv, HChar **envp )
    //--------------------------------------------------------------
    VG_(debugLog)(1, "main", "Print help and quit, if requested\n");
    if (need_help) {
-      usage_NORETURN(/*--help-debug?*/2 == need_help);
+      usage_NORETURN(/*--help-debug?*/need_help >= 2);
    }
 
    //--------------------------------------------------------------
index 724dac99e5d534b074283c06a10a48604abcf5e0..8a75292d369d00b730b522ae3d3e03b0dc2bcee7 100644 (file)
@@ -596,7 +596,8 @@ in most cases.  We group the available options by rough categories.</para>
     <term><option>-h --help</option></term>
     <listitem>
       <para>Show help for all options, both for the core and for the
-      selected tool.</para>
+      selected tool.  If the option is repeated it is equivalent to giving
+      <option>--help-debug</option>.</para>
     </listitem>
   </varlistentry>