|
From: <sv...@va...> - 2007-11-20 19:45:04
|
Author: sewardj
Date: 2007-11-20 19:45:03 +0000 (Tue, 20 Nov 2007)
New Revision: 7192
Log:
In the --help text, print the actual name of the GDB that will by
default be used. Fixes #151938. Unfortunately this makes the help
text non-constant, which could have a bad effect on regtesting; but
GDB is so usually installed in the standard place /usr/bin/gdb that I
don't think that's much of a big deal.
Modified:
trunk/coregrind/m_main.c
Modified: trunk/coregrind/m_main.c
===================================================================
--- trunk/coregrind/m_main.c 2007-11-20 08:46:05 UTC (rev 7191)
+++ trunk/coregrind/m_main.c 2007-11-20 19:45:03 UTC (rev 7192)
@@ -104,6 +104,8 @@
static void usage_NORETURN ( Bool debug_help )
{
+ /* 'usage1' contains a %s for the name of the GDB executable, which
+ must be supplied when it is VG_(printf)'d. */
Char* usage1 =
"usage: valgrind [options] prog-and-args\n"
"\n"
@@ -145,7 +147,7 @@
" --suppressions=<filename> suppress errors described in <filename>\n"
" --gen-suppressions=no|yes|all print suppressions for errors? [no]\n"
" --db-attach=no|yes start debugger when errors detected? [no]\n"
-" --db-command=<command> command to start debugger [gdb -nw %%f %%p]\n"
+" --db-command=<command> command to start debugger [%s -nw %%f %%p]\n"
" --input-fd=<number> file descriptor for input [0=stdin]\n"
" --max-stackframe=<number> assume stack switch for SP changes larger\n"
" than <number> bytes [2000000]\n"
@@ -170,9 +172,6 @@
" --trace-sched=no|yes show thread scheduler details? [no]\n"
" --wait-for-gdb=yes|no pause on startup to wait for gdb attach\n"
" --sym-offsets=yes|no show syms in form 'name+offset' ? [no]\n"
-#if 0
-" --model-pthreads=yes|no model the pthreads library [no]\n"
-#endif
" --command-line-only=no|yes only use command line options [no]\n"
"\n"
" --vex-iropt-verbosity 0 .. 9 [0]\n"
@@ -214,7 +213,8 @@
VG_(clo_log_fd) = 1;
vg_assert( !VG_(logging_to_socket) );
- VG_(printf)(usage1);
+ /* 'usage1' expects one char* argument */
+ VG_(printf)(usage1, GDB_PATH);
if (VG_(details).name) {
VG_(printf)(" user options for %s:\n", VG_(details).name);
if (VG_(needs).command_line_options)
|