diff options
author | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 1998-05-21 18:03:25 +0000 |
---|---|---|
committer | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 1998-05-21 18:03:25 +0000 |
commit | cb432079654bad71f05fba032cd8263bd6c862d8 (patch) | |
tree | d906f3391632f519659dfd07a05ffe8e98ac2c38 /gdb/gdbtk.c | |
parent | fab0ee0d0b9cad1e25b085c4fb7d001997fda59a (diff) | |
download | gdb-cb432079654bad71f05fba032cd8263bd6c862d8.zip gdb-cb432079654bad71f05fba032cd8263bd6c862d8.tar.gz gdb-cb432079654bad71f05fba032cd8263bd6c862d8.tar.bz2 |
Thu May 21 13:56:24 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* gdbtk.c: reinserted the changes that were accidentally deleted:
(_initialize_gdbtk): Use correct device names in
cygwin-specific call (cosmetic change).
(gdbtk_ignorable_warning): removed va_list parameter,
which was unused.
(_initialize_gdbtk): add cygwin32 specific code to
allow `gdb -nw' to work when specified specified from a windows
console-mode command line.
* ChangeLog: moved Chris Faylor's comment to ChangeLog-gdbtk
Diffstat (limited to 'gdb/gdbtk.c')
-rw-r--r-- | gdb/gdbtk.c | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/gdb/gdbtk.c b/gdb/gdbtk.c index 96aaa97..6027cdb 100644 --- a/gdb/gdbtk.c +++ b/gdb/gdbtk.c @@ -98,7 +98,7 @@ static void gdbtk_flush PARAMS ((FILE *)); static void gdbtk_fputs PARAMS ((const char *, FILE *)); static int gdbtk_query PARAMS ((const char *, va_list)); static void gdbtk_warning PARAMS ((const char *, va_list)); -static void gdbtk_ignorable_warning PARAMS ((const char *, va_list)); +static void gdbtk_ignorable_warning PARAMS ((const char *)); static char *gdbtk_readline PARAMS ((char *)); static void gdbtk_init PARAMS ((char *)); static void tk_command_loop PARAMS ((void)); @@ -329,14 +329,13 @@ gdbtk_warning (warning, args) } static void -gdbtk_ignorable_warning (warning, args) +gdbtk_ignorable_warning (warning) const char *warning; - va_list args; { char buf[200], *merge[2]; char *command; - vsprintf (buf, warning, args); + sprintf (buf, warning); merge[0] = "gdbtk_tcl_ignorable_warning"; merge[1] = buf; command = Tcl_Merge (2, merge); @@ -3260,7 +3259,7 @@ gdb_loadfile (clientData, interp, objc, objv) mtime = bfd_get_mtime(exec_bfd); if (mtime && mtime < st.st_mtime) - gdbtk_ignorable_warning("Source file is more recent than executable.\n", (va_list)0); + gdbtk_ignorable_warning("Source file is more recent than executable.\n"); /* Source linenumbers don't appear to be in order, and a sort is */ @@ -3456,4 +3455,31 @@ _initialize_gdbtk () init_ui_hook = gdbtk_init; } +#ifdef __CYGWIN32__ + else + { + DWORD ft = GetFileType (GetStdHandle (STD_INPUT_HANDLE)); + void cygwin32_attach_handle_to_fd (char *, int, HANDLE, int, int); + + switch (ft) + { + case FILE_TYPE_DISK: + case FILE_TYPE_CHAR: + case FILE_TYPE_PIPE: + break; + default: + AllocConsole(); + cygwin32_attach_handle_to_fd ("/dev/conin", 0, + GetStdHandle (STD_INPUT_HANDLE), + 1, GENERIC_READ); + cygwin32_attach_handle_to_fd ("/dev/conout", 1, + GetStdHandle (STD_OUTPUT_HANDLE), + 0, GENERIC_WRITE); + cygwin32_attach_handle_to_fd ("/dev/conout", 2, + GetStdHandle (STD_ERROR_HANDLE), + 0, GENERIC_WRITE); + break; + } + } +#endif } |