* [PATCH] print message when TUI not configured @ 2007-05-09 21:34 Bob Wilson 2007-05-09 21:36 ` Bob Wilson 0 siblings, 1 reply; 6+ messages in thread From: Bob Wilson @ 2007-05-09 21:34 UTC (permalink / raw) To: gdb-patches The TUI feature is not supported on platforms without a suitable version of the curses library, but this is not well documented. In the doc patch I've been working on, I added a comment about that. It seems like it would also be good to fail gracefully if someone tries to use the TUI when it is not configured. Here is a simple patch to print a message if someone uses the "-tui" option. It doesn't do anything about TUI commands and key bindings, but I think those are less important. OK? 2007-05-09 Bob Wilson <bob.wilson@acm.org> * main.c (captured_main): Recognize -tui option and print an error message when the TUI is not configured. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] print message when TUI not configured 2007-05-09 21:34 [PATCH] print message when TUI not configured Bob Wilson @ 2007-05-09 21:36 ` Bob Wilson 2007-05-09 21:42 ` Daniel Jacobowitz 2007-05-11 17:59 ` Eli Zaretskii 0 siblings, 2 replies; 6+ messages in thread From: Bob Wilson @ 2007-05-09 21:36 UTC (permalink / raw) To: gdb-patches [-- Attachment #1: Type: text/plain, Size: 208 bytes --] Oops. I forgot to attach the patch. Here it is: 2007-05-09 Bob Wilson <bob.wilson@acm.org> * main.c (captured_main): Recognize -tui option and print an error message when the TUI is not configured. [-- Attachment #2: gdb-tui-option.patch --] [-- Type: text/x-diff, Size: 947 bytes --] Index: main.c =================================================================== RCS file: /cvs/src/src/gdb/main.c,v retrieving revision 1.62 diff -u -r1.62 main.c --- main.c 9 Jan 2007 21:34:29 -0000 1.62 +++ main.c 9 May 2007 21:21:33 -0000 @@ -298,9 +298,7 @@ }; static struct option long_options[] = { -#if defined(TUI) {"tui", no_argument, 0, OPT_TUI}, -#endif {"xdb", no_argument, &xdb_commands, 1}, {"dbx", no_argument, &dbx_commands, 1}, {"readnow", no_argument, &readnow_symbol_files, 1}, @@ -398,8 +396,15 @@ break; case OPT_TUI: /* --tui is equivalent to -i=tui. */ +#ifdef TUI xfree (interpreter_p); interpreter_p = xstrdup (INTERP_TUI); +#else + fprintf_unfiltered (gdb_stderr, + _("%s: TUI mode is not supported\n"), + argv[0]); + exit (1); +#endif break; case OPT_WINDOWS: /* FIXME: cagney/2003-03-01: Not sure if this option is ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] print message when TUI not configured 2007-05-09 21:36 ` Bob Wilson @ 2007-05-09 21:42 ` Daniel Jacobowitz 2007-05-11 17:59 ` Eli Zaretskii 1 sibling, 0 replies; 6+ messages in thread From: Daniel Jacobowitz @ 2007-05-09 21:42 UTC (permalink / raw) To: Bob Wilson; +Cc: gdb-patches On Wed, May 09, 2007 at 02:35:58PM -0700, Bob Wilson wrote: > Oops. I forgot to attach the patch. Here it is: > > 2007-05-09 Bob Wilson <bob.wilson@acm.org> > > * main.c (captured_main): Recognize -tui option and print an error > message when the TUI is not configured. OK. -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] print message when TUI not configured 2007-05-09 21:36 ` Bob Wilson 2007-05-09 21:42 ` Daniel Jacobowitz @ 2007-05-11 17:59 ` Eli Zaretskii 2007-05-11 18:10 ` Bob Wilson 1 sibling, 1 reply; 6+ messages in thread From: Eli Zaretskii @ 2007-05-11 17:59 UTC (permalink / raw) To: Bob Wilson; +Cc: gdb-patches > Date: Wed, 09 May 2007 14:35:58 -0700 > From: Bob Wilson <bwilson@tensilica.com> > > 2007-05-09 Bob Wilson <bob.wilson@acm.org> > > * main.c (captured_main): Recognize -tui option and print an error > message when the TUI is not configured. Fine with me, but if this is accepted, I suggest an entry in NEWS. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] print message when TUI not configured 2007-05-11 17:59 ` Eli Zaretskii @ 2007-05-11 18:10 ` Bob Wilson 2007-05-11 18:29 ` Eli Zaretskii 0 siblings, 1 reply; 6+ messages in thread From: Bob Wilson @ 2007-05-11 18:10 UTC (permalink / raw) To: Eli Zaretskii; +Cc: gdb-patches [-- Attachment #1: Type: text/plain, Size: 476 bytes --] Eli Zaretskii wrote: >> Date: Wed, 09 May 2007 14:35:58 -0700 >> From: Bob Wilson <bwilson@tensilica.com> >> >> 2007-05-09 Bob Wilson <bob.wilson@acm.org> >> >> * main.c (captured_main): Recognize -tui option and print an error >> message when the TUI is not configured. > > Fine with me, but if this is accepted, I suggest an entry in NEWS. OK. How's this? 2007-05-11 Bob Wilson <bob.wilson@acm.org> * NEWS: Mention change in handling the -tui option. [-- Attachment #2: gdb-NEWS.patch --] [-- Type: text/x-diff, Size: 583 bytes --] Index: NEWS =================================================================== RCS file: /cvs/src/src/gdb/NEWS,v retrieving revision 1.224 diff -u -r1.224 NEWS --- NEWS 7 May 2007 11:49:04 -0000 1.224 +++ NEWS 11 May 2007 18:08:15 -0000 @@ -3,6 +3,10 @@ *** Changes since GDB 6.6 +* When the Text User Interface (TUI) is not configured, GDB will now +recognize the -tui command-line option and print a message that the TUI +is not supported. + * The GDB remote stub, gdbserver, now has lower overhead for high frequency signals (e.g. SIGALRM) via the QPassSignals packet. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] print message when TUI not configured 2007-05-11 18:10 ` Bob Wilson @ 2007-05-11 18:29 ` Eli Zaretskii 0 siblings, 0 replies; 6+ messages in thread From: Eli Zaretskii @ 2007-05-11 18:29 UTC (permalink / raw) To: Bob Wilson; +Cc: gdb-patches > Date: Fri, 11 May 2007 11:10:51 -0700 > From: Bob Wilson <bwilson@tensilica.com> > CC: gdb-patches@sources.redhat.com > > > Fine with me, but if this is accepted, I suggest an entry in NEWS. > > OK. How's this? > > 2007-05-11 Bob Wilson <bob.wilson@acm.org> > > * NEWS: Mention change in handling the -tui option. Fine, thanks. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-05-11 18:29 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2007-05-09 21:34 [PATCH] print message when TUI not configured Bob Wilson 2007-05-09 21:36 ` Bob Wilson 2007-05-09 21:42 ` Daniel Jacobowitz 2007-05-11 17:59 ` Eli Zaretskii 2007-05-11 18:10 ` Bob Wilson 2007-05-11 18:29 ` Eli Zaretskii
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox