#include <ctype.h>
#include "gdb_string.h"
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifndef NO_SYS_FILE
-#include <sys/file.h>
-#endif
/* Temporary variable for SET_TOP_LEVEL. */
current_directory = gdb_dirbuf;
/* Parse arguments and options. */
-#ifndef WINGDB
{
int c;
/* When var field is 0, use flag field to record the equivalent
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
quiet = 1;
}
-#endif
gdb_init ();
/* Do these (and anything which might call wrap_here or *_filtered)
strcat (homeinit, "/");
strcat (homeinit, gdbinit);
- if (!inhibit_gdbinit && access (homeinit, R_OK) == 0)
+ if (!inhibit_gdbinit)
{
if (!SET_TOP_LEVEL ())
source_command (homeinit, 0);
if (!homedir
|| memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat)))
- if (!inhibit_gdbinit && access (gdbinit, R_OK) == 0)
+ if (!inhibit_gdbinit)
{
if (!SET_TOP_LEVEL ())
source_command (gdbinit, 0);
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.
The WIN32 Gui calls this main to set up gdb's state, and
has its own command loop. */
-#if !defined (WINGDB)
+#ifndef _WIN32
while (1)
{
if (!SET_TOP_LEVEL ())