diff options
author | Jason Molenda <jmolenda@apple.com> | 1999-06-14 18:08:47 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1999-06-14 18:08:47 +0000 |
commit | 0f71a2f66f83f4c7ac139fa8d33ab882362fe861 (patch) | |
tree | 16074aaf8b9c3abda2ddf840b5b307c933298a75 /gdb/main.c | |
parent | 308b1ffdedc0380e17d84260b0069593eb4f9336 (diff) | |
download | gdb-0f71a2f66f83f4c7ac139fa8d33ab882362fe861.zip gdb-0f71a2f66f83f4c7ac139fa8d33ab882362fe861.tar.gz gdb-0f71a2f66f83f4c7ac139fa8d33ab882362fe861.tar.bz2 |
import gdb-1999-06-14 snapshot
Diffstat (limited to 'gdb/main.c')
-rw-r--r-- | gdb/main.c | 26 |
1 files changed, 15 insertions, 11 deletions
@@ -48,7 +48,7 @@ int display_space; invoked on the command line with the -nw --async options. In this version, the usual command_loop is substituted by and event loop which processes UI events asynchronously. */ -int async = 0; +int async_p = 0; /* Whether this is the command line version or not */ int tui_version = 0; @@ -61,6 +61,7 @@ int dbx_commands = 0; GDB_FILE *gdb_stdout; GDB_FILE *gdb_stderr; +GDB_FILE *gdb_stdlog; /* Whether to enable writing into executable and core files */ extern int write_files; @@ -161,9 +162,11 @@ main (argc, argv) /* not yet */ gdb_stdout = stdio_fileopen (stdout); gdb_stderr = stdio_fileopen (stderr); + gdb_stdlog = gdb_stderr; /* for moment */ #else gdb_stdout = tui_fileopen (stdout); gdb_stderr = tui_fileopen (stderr); + gdb_stdlog = gdb_stdout; /* for moment */ #endif /* Parse arguments and options. */ @@ -174,7 +177,8 @@ main (argc, argv) with no equivalent). */ static struct option long_options[] = { - {"async", no_argument, &async, 1}, + {"async", no_argument, &async_p, 1}, + {"noasync", no_argument, &async_p, 0}, #if defined(TUI) {"tui", no_argument, &tui_version, 1}, #endif @@ -388,12 +392,16 @@ main (argc, argv) /* Get ready to invoke the event loop instead of the command_loop. See event-loop.h for more details.*/ - if (async) - async_hook = setup_event_loop; + if (async_p) + command_loop_hook = start_event_loop; #if defined(TUI) + /* Should this be moved to tui-top.c:_initialize_tui()? */ if (tui_version) init_ui_hook = tuiInit; #endif + + /* Initialize all files. Give the interpreter a chance to take + control of the console via the init_ui_hook()) */ gdb_init (argv[0]); /* Do these (and anything which might call wrap_here or *_filtered) @@ -617,12 +625,6 @@ main (argc, argv) #endif } - /* Call the event loop, if gdb was invoked with the --async - option. Control will never get back to this file, if the event - loop is invoked. See the files event-*.[ch] for details. */ - if (async_hook) - async_hook(); - /* The default command loop. The WIN32 Gui calls this main to set up gdb's state, and has its own command loop. */ @@ -642,7 +644,6 @@ main (argc, argv) quit_command ((char *)0, instream == stdin); } } - /* No exit -- exit is through quit_command. */ #endif @@ -661,6 +662,9 @@ This is the GNU debugger. Usage:\n\n\ gdb [options] [executable-file [core-file or process-id]]\n\n\ Options:\n\n\ ", stream); + fputs_unfiltered ("\ + --[no]async Enable (disable) asynchronous version of CLI\n\ +", stream); fputs_unfiltered ("\ -b BAUDRATE Set serial port baud rate used for remote debugging.\n\ --batch Exit after processing options.\n\ |