aboutsummaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
authorDawn Perchik <dawn@cygnus>1996-06-28 12:42:10 +0000
committerDawn Perchik <dawn@cygnus>1996-06-28 12:42:10 +0000
commit265c044ac1c64e04518319bb4fcecca96e09d707 (patch)
tree1e215943a14c22f6855c8726f5d218da0123c7f2 /gdb/main.c
parentcb1709aeac4e07ce89f6d9a520cdc0fa83847a92 (diff)
downloadgdb-265c044ac1c64e04518319bb4fcecca96e09d707.zip
gdb-265c044ac1c64e04518319bb4fcecca96e09d707.tar.gz
gdb-265c044ac1c64e04518319bb4fcecca96e09d707.tar.bz2
* main.c (main): Add option "l" for setting remote_timeout.
Diffstat (limited to 'gdb/main.c')
-rw-r--r--gdb/main.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gdb/main.c b/gdb/main.c
index dcb985e..8671c9e 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -284,6 +284,23 @@ main (argc, argv)
else
baud_rate = i;
}
+ case 'l':
+ {
+ int i;
+ char *p;
+
+ i = strtol (optarg, &p, 0);
+ if (i == 0 && p == optarg)
+
+ /* Don't use *_filtered or warning() (which relies on
+ current_target) until after initialize_all_files(). */
+
+ fprintf_unfiltered
+ (gdb_stderr,
+ "warning: could not set timeout limit to `%s'.\n", optarg);
+ else
+ remote_timeout = i;
+ }
break;
#ifdef ADDITIONAL_OPTION_CASES
@@ -562,11 +579,13 @@ GDB manual (available as on-line info or a printed manual).\n", gdb_stdout);
if (display_space)
{
+#ifdef HAVE_SBRK
extern char **environ;
char *lim = (char *) sbrk (0);
printf_unfiltered ("Startup size: data size %ld\n",
(long) (lim - (char *) &environ));
+#endif
}
/* The default command loop.