aboutsummaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-09-26 17:46:04 +0000
committerAndrew Cagney <cagney@redhat.com>2002-09-26 17:46:04 +0000
commitf15ab4a7d1f9b4df5376f568a634c0408b074cee (patch)
tree20038e67b0cdd74d862172cee0ceb92057c9e517 /gdb/main.c
parent3396de367a522c2e10a68389b48fc9e944d7cc04 (diff)
downloadgdb-f15ab4a7d1f9b4df5376f568a634c0408b074cee.zip
gdb-f15ab4a7d1f9b4df5376f568a634c0408b074cee.tar.gz
gdb-f15ab4a7d1f9b4df5376f568a634c0408b074cee.tar.bz2
2002-09-26 Andrew Cagney <ac131313@redhat.com>
From Grace Sainsbury <graces@redhat.com>: * Makefile.in (gdbtk-main.o): New target. (gdb.o): New target. (main_h): Define. (main.o): Update dependencies. (gdb$(EXEEXT)): Add gdb.o. (SUBDIR_GDBTK_SRCS): Add gdbtk-main.c. (SUBDIR_GDBTK_ALL, SUBDIR_GDBTK_UNINSTALL): Set. (SUBDIR_GDBTK_CLEAN): Set. (install-gdbtk): Install the insight binary. (uninstall-gdbtk): New target. (all-gdbtk, clean-gdbtk): New rule. * top.c (use_windows): Default to zero. * main.c: Include "main.h". (main): Delete. (struct captured_main_args): Delete. (gdb_main): New function. * main.h: New file. * gdb.c: New File. 2002-09-26 Andrew Cagney <ac131313@redhat.com> From Grace Sainsbury <graces@redhat.com>: * generic/gdbtk-main.c: New file.
Diffstat (limited to 'gdb/main.c')
-rw-r--r--gdb/main.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/gdb/main.c b/gdb/main.c
index 4299817..eb88747 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -37,6 +37,8 @@
#include "event-loop.h"
#include "ui-out.h"
+#include "main.h"
+
/* If nonzero, display time usage both at startup and for each command. */
int display_time;
@@ -108,12 +110,6 @@ captured_command_loop (void *data)
return 1;
}
-struct captured_main_args
- {
- int argc;
- char **argv;
- };
-
static int
captured_main (void *data)
{
@@ -736,12 +732,10 @@ extern int gdbtk_test (char *);
}
int
-main (int argc, char **argv)
+gdb_main (struct captured_main_args *args)
{
- struct captured_main_args args;
- args.argc = argc;
- args.argv = argv;
- catch_errors (captured_main, &args, "", RETURN_MASK_ALL);
+ use_windows = args->use_windows;
+ catch_errors (captured_main, args, "", RETURN_MASK_ALL);
return 0;
}