/* Top level stuff for GDB, the GNU debugger.
- Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994
+ Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995
Free Software Foundation, Inc.
This file is part of GDB.
#include <sys/stat.h>
#include <ctype.h>
+extern void initialize_targets PARAMS ((void));
+
+extern void initialize_utils PARAMS ((void));
+
/* Prototypes for local functions */
static char * line_completion_function PARAMS ((char *, int, char *, int));
#define GDBINIT_FILENAME ".gdbinit"
#endif
char gdbinit[] = GDBINIT_FILENAME;
+
int inhibit_gdbinit = 0;
-/* Disable windows if non-zero */
+/* If nonzero, and GDB has been configured to be able to use windows,
+ attempt to open them upon startup. */
-int use_windows = 0; /* Defaults to off for now */
+int use_windows = 1;
/* Version number of GDB, as a string. */
int caution = 1; /* Default is yes, sigh. */
-/*
- * Define all cmd_list_element's
- */
+/* Define all cmd_list_elements. */
/* Chain containing all defined commands. */
void (*interactive_hook) PARAMS ((void));
+/* Called when the registers have changed, as a hint to a GUI
+ to minimize window update. */
+
+void (*registers_changed_hook) PARAMS ((void));
+
/* Called when going to wait for the target. Usually allows the GUI to run
while waiting for target events. */
locate_arg (p)
char *p;
{
- while (p = strchr (p, '$'))
+ while ((p = strchr (p, '$')))
{
if (strncmp (p, "$arg", 4) == 0 && isdigit (p[4]))
return p;
/* First we need to know how much memory to allocate for the new line. */
save_line = line;
len = 0;
- while (p = locate_arg (line))
+ while ((p = locate_arg (line)))
{
len += p - line;
i = p[4] - '0';
/* Save pointer to beginning of new line. */
save_line = new_line;
- while (p = locate_arg (line))
+ while ((p = locate_arg (line)))
{
int i, len;
new_line += p - line;
i = p[4] - '0';
- if (len = user_args->a[i].len)
+ len = user_args->a[i].len;
+ if (len)
{
memcpy (new_line, user_args->a[i].arg, len);
new_line += len;
Definition appears on following lines, one command per line.\n\
End with a line of just \"end\".\n\
Use the \"document\" command to give documentation for the new command.\n\
-Commands defined in this way do not take arguments.");
+Commands defined in this way may have up to ten arguments.");
#ifdef __STDC__
c = add_cmd ("source", class_support, source_command,