This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Enable hidden option -l


Daniel Jacobowitz <drow@false.org> writes:

> On Tue, Dec 07, 2004 at 12:42:04AM +0100, Andreas Schwab wrote:
>> GDB has (since the beginning of CVS history) a hidden option -l that can
>> be used to set the timeout for remote communication.  But it was never
>> possible to pass it because it is missing from long_options.
>> 
>> The option is quite useful when debugging gdbserver.
>
> This is the same as "set remotetimeout".

Oh, I only grepped in the gdb toplevel so I missed the cli directory.

> I can see how the command line argument would be useful, though.  Eli
> and I both think this is a good idea; so I'll approve the code change.

This is what I'm checking in:

2004-12-07  Andreas Schwab  <schwab@suse.de>

	* main.c (long_options): Add entry for "-l".
	(print_gdb_help): Add line for -l option.
	* NEWS: Mention it.

doc/
	* gdb.texinfo (Mode Options): Document -l option.

Index: gdb/NEWS
===================================================================
RCS file: /cvs/src/src/gdb/NEWS,v
retrieving revision 1.167
diff -u -p -a -r1.167 NEWS
--- gdb/NEWS	14 Nov 2004 00:10:52 -0000	1.167
+++ gdb/NEWS	7 Dec 2004 11:00:56 -0000
@@ -14,6 +14,11 @@ NEC V850					v850-*-*
 
 *** Changes in GDB 6.3:
 
+* New command line option
+
+GDB now accepts -l followed by a number to set the timeout for remote
+debugging.
+
 * GDB works with GCC -feliminate-dwarf2-dups
 
 GDB now supports a more compact representation of DWARF-2 debug
Index: gdb/main.c
===================================================================
RCS file: /cvs/src/src/gdb/main.c,v
retrieving revision 1.44
diff -u -p -a -r1.44 main.c
--- gdb/main.c	10 Aug 2004 22:36:39 -0000	1.44
+++ gdb/main.c	7 Dec 2004 11:00:56 -0000
@@ -300,6 +300,7 @@ captured_main (void *data)
       {"statistics", no_argument, 0, OPT_STATISTICS},
       {"write", no_argument, &write_files, 1},
       {"args", no_argument, &set_args, 1},
+     {"l", required_argument, 0, 'l'},
       {0, no_argument, 0, 0}
     };
 
@@ -854,6 +855,7 @@ Options:\n\n\
                      Select a specific interpreter / user interface\n\
 "), stream);
   fputs_unfiltered (_("\
+  -l TIMEOUT         Set timeout in seconds for remote debugging.\n\
   --mapped           Use mapped symbol files if supported on this system.\n\
   --nw		     Do not use a window interface.\n\
   --nx               Do not read "), stream);
Index: gdb/doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.227
diff -u -p -a -r1.227 gdb.texinfo
--- gdb/doc/gdb.texinfo	23 Nov 2004 12:12:15 -0000	1.227
+++ gdb/doc/gdb.texinfo	7 Dec 2004 11:00:57 -0000
@@ -1078,6 +1078,11 @@ This option stops option processing.
 Set the line speed (baud rate or bits per second) of any serial
 interface used by @value{GDBN} for remote debugging.
 
+@item -l @var{timeout}
+@cindex @code{-l}
+Set the timeout (in seconds) of any communication used by @value{GDBN}
+for remote debugging.
+
 @item -tty @var{device}
 @itemx -t @var{device}
 @cindex @code{--tty}

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]