[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: valgrind/coregrind
From: Nicholas Nethercote <njn25 () cam ! ac ! uk>
Date: 2004-01-31 22:55:15
Message-ID: 20040131225515.F22C09922 () office ! kde ! org
[Download RAW message or body]
CVS commit by nethercote:
No longer showing debugging options for --help; only for the newly added
--help-debug.
M +24 -18 vg_main.c 1.143
M +4 -0 docs/coregrind_core.html 1.25
--- valgrind/coregrind/vg_main.c #1.142:1.143
@@ -1353,5 +1353,5 @@ static void load_tool( const char *tooln
static void load_client(char* cl_argv[], const char* exec,
- /*inout*/Bool* need_help,
+ /*inout*/Int* need_help,
/*out*/struct exeinfo* info, /*out*/Addr* client_eip)
{
@@ -1362,5 +1362,5 @@ static void load_client(char* cl_argv[],
( NULL == (exec = find_executable(cl_argv[0])) ) )
{
- *need_help = True;
+ *need_help = 1;
}
}
@@ -1470,5 +1470,5 @@ static void config_error ( Char* msg )
}
-void usage ( void )
+void usage ( Bool debug_help )
{
Char* usage1 =
@@ -1478,4 +1478,5 @@ void usage ( void )
" --tool=<name> Use the Valgrind tool named <name>\n"
" --help show this message\n"
+" --help-debug show this message, plus debugging options\n"
" --version show version\n"
" -q --quiet run silently; only print error msgs\n"
@@ -1558,4 +1559,5 @@ void usage ( void )
VG_(printf)(" (none)\n");
}
+ if (debug_help) {
VG_(printf)(usage2);
@@ -1568,4 +1570,5 @@ void usage ( void )
VG_(printf)(" (none)\n");
}
+ }
VG_(printf)(usage3, VG_BUGS_TO);
@@ -1577,5 +1580,5 @@ void usage ( void )
static void pre_process_cmd_line_options
- ( Bool* need_help, const char** tool, const char** exec )
+ ( Int* need_help, const char** tool, const char** exec )
{
UInt i;
@@ -1589,5 +1592,8 @@ static void pre_process_cmd_line_options
} else if (strcmp(VG_(vg_argv)[i], "--help") == 0) {
- *need_help = True;
+ *need_help = 1;
+
+ } else if (strcmp(VG_(vg_argv)[i], "--help-debug") == 0) {
+ *need_help = 2;
} else if (strncmp(VG_(vg_argv)[i], "--tool=", 7) == 0 ||
@@ -1604,5 +1610,5 @@ static void pre_process_cmd_line_options
if (!need_help)
list_tools();
- usage();
+ usage(/*help-debug?*/False);
}
}
@@ -1610,5 +1616,5 @@ static void pre_process_cmd_line_options
static void process_cmd_line_options
( UInt* client_auxv, Addr esp_at_startup,
- const char* toolname, Bool need_help )
+ const char* toolname, Int need_help )
{
Int i, eventually_logfile_fd;
@@ -1639,5 +1645,5 @@ static void process_cmd_line_options
if (need_help)
- usage();
+ usage(/*--help-debug?*/need_help == 2);
/* We know the initial ESP is pointing at argc/argv */
@@ -1877,5 +1883,5 @@ static void process_cmd_line_options
else if ( ! VG_(needs).command_line_options
|| ! SK_(process_cmd_line_option)(arg) ) {
- usage();
+ usage(/*--help-debug?*/need_help == 2);
}
}
@@ -2689,5 +2695,5 @@ int main(int argc, char **argv)
char *preload; /* tool-specific LD_PRELOAD .so */
char **env;
- Bool need_help = False;
+ Int need_help = 0; // 0 = no, 1 = --help, 2 = --help-debug
struct exeinfo info;
ToolInfo *toolinfo = NULL;
--- valgrind/coregrind/docs/coregrind_core.html #1.24:1.25
@@ -496,4 +496,8 @@
selected tool. </li><br><p>
+ <li><code>--help-debug</code><br>
+ <p>Same as <code>--help</code>, but also lists debugging options which
+ usually are only of use to developers.</li><br><p>
+
<li><code>--version</code><br> <p>Show the version number of the
Valgrind core. Tools can have their own version numbers. There
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic