* [patch/rfc] "tui"
@ 2004-02-10 18:32 Andrew Cagney
2004-02-10 18:40 ` Daniel Jacobowitz
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Andrew Cagney @ 2004-02-10 18:32 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 252 bytes --]
Hello,
This modifies the build machinery so that the program "tui" is built.
"tui" starts up GDB's TUI (or Text User Interface). Alternative program
names include "tgdb", "gdbtui", ...
Comments? Otherwize look to commit it round 16th Feb.
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 6098 bytes --]
2004-02-10 Andrew Cagney <cagney@redhat.com>
* configure.in: Add TUI target to CONFIG_ALL, CONFIG_CLEAN,
CONFIG_INSTALL and CONFIG_UNINSTALL.
* configure: Re-generate.
* interps.h (INTERP_TUI): Define.
* Makefile.in (tui-main.o): Specify dependencies.
(install-tui, uninstall-tui, clean-tui, all-tui): New rules.
* tui/tui-main.c: New file.
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.493
diff -u -r1.493 Makefile.in
--- Makefile.in 10 Feb 2004 16:43:58 -0000 1.493
+++ Makefile.in 10 Feb 2004 18:26:32 -0000
@@ -935,6 +935,8 @@
all: gdb$(EXEEXT) $(CONFIG_ALL)
@$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do
+.PHONY: all-tui
+all-tui: tui$(EXEEXT)
installcheck:
@@ -978,6 +980,23 @@
$(INSTALL_DATA) $(srcdir)/gdb.1 \
$(DESTDIR)$(man1dir)/$$transformed_name.1
@$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
+.PHONY: install-tui
+install-tui:
+ transformed_name=`t='$(program_transform_name)'; \
+ echo tui | sed -e "$$t"` ; \
+ if test "x$$transformed_name" = x; then \
+ transformed_name=tui ; \
+ else \
+ true ; \
+ fi ; \
+ $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \
+ $(INSTALL_PROGRAM) tui$(EXEEXT) \
+ $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
+ $(SHELL) $(srcdir)/../mkinstalldirs \
+ $(DESTDIR)$(man1dir) ; \
+ $(INSTALL_DATA) $(srcdir)/gdb.1 \
+ $(DESTDIR)$(man1dir)/$$transformed_name.1
+
uninstall: force $(CONFIG_UNINSTALL)
transformed_name=`t='$(program_transform_name)'; \
@@ -990,6 +1009,17 @@
rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \
$(DESTDIR)$(man1dir)/$$transformed_name.1
@$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
+.PHONY: uninstall-tui
+uninstall-tui:
+ transformed_name=`t='$(program_transform_name)'; \
+ echo tui | sed -e $$t` ; \
+ if test "x$$transformed_name" = x; then \
+ transformed_name=tui ; \
+ else \
+ true ; \
+ fi ; \
+ rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \
+ $(DESTDIR)$(man1dir)/$$transformed_name.1
# We do this by grepping through sources. If that turns out to be too slow,
# maybe we could just require every .o file to have an initialization routine
@@ -1084,6 +1114,12 @@
-o gdb$(EXEEXT) gdb.o libgdb.a \
$(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
+tui$(EXEEXT): tui-main.o libgdb.a $(ADD_DEPS) $(CDEPS) $(TDEPLIBS)
+ rm -f tui$(EXEEXT)
+ $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
+ -o tui$(EXEEXT) tui-main.o libgdb.a \
+ $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
+
nlm: force
rootme=`pwd`; export rootme; $(MAKE) $(TARGET_FLAGS_TO_PASS) DO=all DODIRS=nlm subdir_do
@@ -1148,6 +1184,9 @@
rm -f init.c version.c
rm -f gdb$(EXEEXT) core make.log
rm -f gdb[0-9]$(EXEEXT)
+.PHONY: clean-tui
+clean-tui:
+ rm -f tui$(EXEEXT)
# This used to depend on c-exp.tab.c m2-exp.tab.c TAGS
# I believe this is wrong; the makefile standards for distclean just
@@ -2842,6 +2881,9 @@
$(tui_wingeneral_h) $(tui_stack_h) $(tui_regs_h) $(tui_win_h) \
$(tui_winsource_h) $(tui_disasm_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-layout.c
+tui-main.o: $(srcdir)/tui/tui-main.c $(defs_h) $(main_h) $(gdb_string_h) \
+ $(interps_h)
+ $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-main.c
tui-out.o: $(srcdir)/tui/tui-out.c $(defs_h) $(ui_out_h) $(tui_h) \
$(gdb_string_h) $(gdb_assert_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-out.c
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.144
diff -u -r1.144 configure.in
--- configure.in 8 Feb 2004 17:53:08 -0000 1.144
+++ configure.in 10 Feb 2004 18:26:32 -0000
@@ -150,6 +150,10 @@
CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
+ CONFIG_ALL="${CONFIG_ALL} all-tui"
+ CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
+ CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
+ CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
need_curses=yes
fi
fi
Index: interps.h
===================================================================
RCS file: /cvs/src/src/gdb/interps.h,v
retrieving revision 1.5
diff -u -r1.5 interps.h
--- interps.h 7 Aug 2003 17:47:41 -0000 1.5
+++ interps.h 10 Feb 2004 18:26:32 -0000
@@ -71,5 +71,6 @@
#define INTERP_MI2 "mi2"
#define INTERP_MI3 "mi3"
#define INTERP_MI "mi"
+#define INTERP_TUI "tui"
#endif
Index: tui/tui-main.c
===================================================================
RCS file: tui/tui-main.c
diff -N tui/tui-main.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ tui/tui-main.c 10 Feb 2004 18:26:32 -0000
@@ -0,0 +1,37 @@
+/* Main function for TUI gdb.
+
+ Copyright 2002, 2004 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include "defs.h"
+#include "main.h"
+#include "gdb_string.h"
+#include "interps.h"
+
+int
+main (int argc, char **argv)
+{
+ struct captured_main_args args;
+ memset (&args, 0, sizeof args);
+ args.argc = argc;
+ args.argv = argv;
+ args.use_windows = 0;
+ args.interpreter_p = INTERP_TUI;
+ return gdb_main (&args);
+}
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [patch/rfc] "tui" 2004-02-10 18:32 [patch/rfc] "tui" Andrew Cagney @ 2004-02-10 18:40 ` Daniel Jacobowitz 2004-02-10 19:53 ` Kevin Buettner 2004-02-10 19:11 ` Eli Zaretskii 2004-02-18 18:53 ` Andrew Cagney 2 siblings, 1 reply; 11+ messages in thread From: Daniel Jacobowitz @ 2004-02-10 18:40 UTC (permalink / raw) To: gdb-patches On Tue, Feb 10, 2004 at 01:32:13PM -0500, Andrew Cagney wrote: > Hello, > > This modifies the build machinery so that the program "tui" is built. > "tui" starts up GDB's TUI (or Text User Interface). Alternative program > names include "tgdb", "gdbtui", ... > > Comments? Otherwize look to commit it round 16th Feb. Any of those names sound great to me. I think that one with "gdb" in it would be clearer; unlike Insight, the TUI does not have a separate life from GDB. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch/rfc] "tui" 2004-02-10 18:40 ` Daniel Jacobowitz @ 2004-02-10 19:53 ` Kevin Buettner 2004-02-11 13:11 ` Bob Rossi 0 siblings, 1 reply; 11+ messages in thread From: Kevin Buettner @ 2004-02-10 19:53 UTC (permalink / raw) To: gdb-patches On Tue, 10 Feb 2004 13:40:10 -0500 Daniel Jacobowitz <drow@mvista.com> wrote: > On Tue, Feb 10, 2004 at 01:32:13PM -0500, Andrew Cagney wrote: > > > > This modifies the build machinery so that the program "tui" is built. > > "tui" starts up GDB's TUI (or Text User Interface). Alternative program > > names include "tgdb", "gdbtui", ... > > > > Comments? Otherwize look to commit it round 16th Feb. > > Any of those names sound great to me. I think that one with "gdb" in it > would be clearer; unlike Insight, the TUI does not have a separate life > from GDB. I too would prefer one of the names with "gdb" in it somewhere. Kevin ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch/rfc] "tui" 2004-02-10 19:53 ` Kevin Buettner @ 2004-02-11 13:11 ` Bob Rossi 2004-02-11 14:47 ` Andrew Cagney 0 siblings, 1 reply; 11+ messages in thread From: Bob Rossi @ 2004-02-11 13:11 UTC (permalink / raw) To: Kevin Buettner; +Cc: gdb-patches On Tue, Feb 10, 2004 at 12:53:26PM -0700, Kevin Buettner wrote: > On Tue, 10 Feb 2004 13:40:10 -0500 > Daniel Jacobowitz <drow@mvista.com> wrote: > > > On Tue, Feb 10, 2004 at 01:32:13PM -0500, Andrew Cagney wrote: > > > > > > This modifies the build machinery so that the program "tui" is built. > > > "tui" starts up GDB's TUI (or Text User Interface). Alternative program > > > names include "tgdb", "gdbtui", ... > > > > > > Comments? Otherwize look to commit it round 16th Feb. > > > > Any of those names sound great to me. I think that one with "gdb" in it > > would be clearer; unlike Insight, the TUI does not have a separate life > > from GDB. > > I too would prefer one of the names with "gdb" in it somewhere. I would also, I actually like the name gdbtui. It is clear that it is GDB, and it is clear that it is the text user interface. Bob Rossi ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch/rfc] "tui" 2004-02-11 13:11 ` Bob Rossi @ 2004-02-11 14:47 ` Andrew Cagney 2004-02-11 15:00 ` Bob Rossi 2004-02-12 4:34 ` Christopher Faylor 0 siblings, 2 replies; 11+ messages in thread From: Andrew Cagney @ 2004-02-11 14:47 UTC (permalink / raw) To: Bob Rossi; +Cc: Kevin Buettner, gdb-patches > On Tue, Feb 10, 2004 at 12:53:26PM -0700, Kevin Buettner wrote: > >> On Tue, 10 Feb 2004 13:40:10 -0500 >> Daniel Jacobowitz <drow@mvista.com> wrote: >> > >> > On Tue, Feb 10, 2004 at 01:32:13PM -0500, Andrew Cagney wrote: > >> > > >> > > This modifies the build machinery so that the program "tui" is built. >> > > "tui" starts up GDB's TUI (or Text User Interface). Alternative program >> > > names include "tgdb", "gdbtui", ... >> > > >> > > Comments? Otherwize look to commit it round 16th Feb. > >> > >> > Any of those names sound great to me. I think that one with "gdb" in it >> > would be clearer; unlike Insight, the TUI does not have a separate life >> > from GDB. > >> >> I too would prefer one of the names with "gdb" in it somewhere. > > > I would also, I actually like the name gdbtui. It is clear that it is > GDB, and it is clear that it is the text user interface. Then: tui<tab> or tg<tab> wouldn't work. Speaking of which, if that tcl/tk code ever integrated into GDB's code base (assuming it's first contributed), it to will need a name: tclgdb, tkgdb, and even gdbtk come to mind (ah, the ultimate irony). Andrew ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch/rfc] "tui" 2004-02-11 14:47 ` Andrew Cagney @ 2004-02-11 15:00 ` Bob Rossi 2004-02-12 4:34 ` Christopher Faylor 1 sibling, 0 replies; 11+ messages in thread From: Bob Rossi @ 2004-02-11 15:00 UTC (permalink / raw) To: Andrew Cagney; +Cc: Kevin Buettner, gdb-patches On Wed, Feb 11, 2004 at 09:47:34AM -0500, Andrew Cagney wrote: > >On Tue, Feb 10, 2004 at 12:53:26PM -0700, Kevin Buettner wrote: > > > >>On Tue, 10 Feb 2004 13:40:10 -0500 > >>Daniel Jacobowitz <drow@mvista.com> wrote: > >> > > > >>> On Tue, Feb 10, 2004 at 01:32:13PM -0500, Andrew Cagney wrote: > > > >>> > > >>> > This modifies the build machinery so that the program "tui" is built. > >>> > "tui" starts up GDB's TUI (or Text User Interface). Alternative > >>program > > names include "tgdb", "gdbtui", ... > >>> > > >>> > Comments? Otherwize look to commit it round 16th Feb. > > > >>> > >>> Any of those names sound great to me. I think that one with "gdb" in it > >>> would be clearer; unlike Insight, the TUI does not have a separate life > >>> from GDB. > > > >> > >>I too would prefer one of the names with "gdb" in it somewhere. > > > > > >I would also, I actually like the name gdbtui. It is clear that it is > >GDB, and it is clear that it is the text user interface. > > Then: > tui<tab> > or > tg<tab> > wouldn't work. > > Speaking of which, if that tcl/tk code ever integrated into GDB's code > base (assuming it's first contributed), it to will need a name: tclgdb, > tkgdb, and even gdbtk come to mind (ah, the ultimate irony). Well thats pretty funny, I thought the uninformed user would type gd<tab> and see gdb,gdbtui. That would be some pretty nice eye candy for those that didn't know that the tui was on there system. I like the idea of thinking that everything begins with gdb, to keep the names uniformed and easy to find. If the convention was gdbX, they would certainly be easy to find. For example gdb, gdbtui gdbtk Also, putting the name on the end gives the feel that the tui is part of GDB, and not just another front end. For example, it seems that most developers that write front ends add the abbreviation up front. A little proof would be, xxgdb tgdb kgdb cgdb I am sure there are others ... In all, I think the extension on the end would be a little proof that the exe is part of GNU GDB. Also, it would be easy to find with gd<tab>. Either way, I'll be interested to see what it ends up being. Bob Rossi ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch/rfc] "tui" 2004-02-11 14:47 ` Andrew Cagney 2004-02-11 15:00 ` Bob Rossi @ 2004-02-12 4:34 ` Christopher Faylor 1 sibling, 0 replies; 11+ messages in thread From: Christopher Faylor @ 2004-02-12 4:34 UTC (permalink / raw) To: gdb-patches On Wed, Feb 11, 2004 at 09:47:34AM -0500, Andrew Cagney wrote: >Speaking of which, if that tcl/tk code ever integrated into GDB's code >base (assuming it's first contributed), it to will need a name: tclgdb, >tkgdb, and even gdbtk come to mind (ah, the ultimate irony). If you are going to call it tclgdb or gdbtk then gdb itself should be renamed to cgdb or maybe c-gdb, or gdb-c. And, I suppose, it should also be gdb-c-tui or c-gdb-tui, etc. When the c++ port finally materializes then we can have c++-gdb or gdb-c++. Or, maybe we don't have to mention what the code is written in or for and call it gdbgui or gdbw. Or, hey, gdb could pop up an "insight" window when the DISPLAY environment variable was set! Yeah, that's the ticket. cgf ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch/rfc] "tui" 2004-02-10 18:32 [patch/rfc] "tui" Andrew Cagney 2004-02-10 18:40 ` Daniel Jacobowitz @ 2004-02-10 19:11 ` Eli Zaretskii 2004-02-10 20:47 ` Andrew Cagney 2004-02-18 18:53 ` Andrew Cagney 2 siblings, 1 reply; 11+ messages in thread From: Eli Zaretskii @ 2004-02-10 19:11 UTC (permalink / raw) To: Andrew Cagney; +Cc: gdb-patches > Date: Tue, 10 Feb 2004 13:32:13 -0500 > From: Andrew Cagney <cagney@gnu.org> > > This modifies the build machinery so that the program "tui" is built. > "tui" starts up GDB's TUI (or Text User Interface). Alternative program > names include "tgdb", "gdbtui", ... > > Comments? Otherwize look to commit it round 16th Feb. We need to document the new program in gdb.texinfo. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch/rfc] "tui" 2004-02-10 19:11 ` Eli Zaretskii @ 2004-02-10 20:47 ` Andrew Cagney 2004-02-11 6:27 ` Eli Zaretskii 0 siblings, 1 reply; 11+ messages in thread From: Andrew Cagney @ 2004-02-10 20:47 UTC (permalink / raw) To: Eli Zaretskii; +Cc: gdb-patches > Date: Tue, 10 Feb 2004 13:32:13 -0500 >> From: Andrew Cagney <cagney@gnu.org> >> >> This modifies the build machinery so that the program "tui" is built. >> "tui" starts up GDB's TUI (or Text User Interface). Alternative program >> names include "tgdb", "gdbtui", ... >> >> Comments? Otherwize look to commit it round 16th Feb. > > > We need to document the new program in gdb.texinfo. Suggestion as to where? My guess is as a rewording of the opening paragraph of "GDB Text User Interface": http://sources.redhat.com/gdb/current/onlinedocs/gdb_23.html#SEC208 > The GDB Text User Interface, TUI in short, is a terminal interface which uses the curses library to show the source file, the assembly output, the program registers and GDB commands in separate text windows. The TUI is available only when GDB is configured with the --enable-tui configure option (see section B.3 configure options). Which is about to become out-of-date. Andrew ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch/rfc] "tui" 2004-02-10 20:47 ` Andrew Cagney @ 2004-02-11 6:27 ` Eli Zaretskii 0 siblings, 0 replies; 11+ messages in thread From: Eli Zaretskii @ 2004-02-11 6:27 UTC (permalink / raw) To: Andrew Cagney; +Cc: gdb-patches > Date: Tue, 10 Feb 2004 15:47:50 -0500 > From: Andrew Cagney <cagney@gnu.org> > > > > We need to document the new program in gdb.texinfo. > > Suggestion as to where? My guess is as a rewording of the opening > paragraph of "GDB Text User Interface": There too, but IMHO it's too obscure a place to describe a major issue like program invocation. I'd say mention it in "Invoking GDB", then under the description of the "-tui" option in "Mode Options" (and add a "@pindex tui" [or whatever we eventually decide to call the program] in the latter place), in addition to "GDB Text User Interface". > Which is about to become out-of-date. Indeed. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch/rfc] "tui" 2004-02-10 18:32 [patch/rfc] "tui" Andrew Cagney 2004-02-10 18:40 ` Daniel Jacobowitz 2004-02-10 19:11 ` Eli Zaretskii @ 2004-02-18 18:53 ` Andrew Cagney 2 siblings, 0 replies; 11+ messages in thread From: Andrew Cagney @ 2004-02-18 18:53 UTC (permalink / raw) To: gdb-patches [-- Attachment #1: Type: text/plain, Size: 737 bytes --] > Hello, > > This modifies the build machinery so that the program "tui" is built. "tui" starts up GDB's TUI (or Text User Interface). Alternative program names include "tgdb", "gdbtui", ... > > Comments? Otherwize look to commit it round 16th Feb. Here's the revised version, with the name "gdbtui", that I've committed. This just leaves doco ... Andrew > 2004-02-10 Andrew Cagney <cagney@redhat.com> > > * configure.in: Add TUI target to CONFIG_ALL, CONFIG_CLEAN, > CONFIG_INSTALL and CONFIG_UNINSTALL. > * configure: Re-generate. > * interps.h (INTERP_TUI): Define. > * Makefile.in (tui-main.o): Specify dependencies. > (install-tui, uninstall-tui, clean-tui, all-tui): New rules. > * tui/tui-main.c: New file. > [-- Attachment #2: diffs --] [-- Type: text/plain, Size: 7736 bytes --] 2004-02-18 Andrew Cagney <cagney@redhat.com> * configure.in: Add a TUI target to CONFIG_ALL, CONFIG_CLEAN, CONFIG_INSTALL and CONFIG_UNINSTALL. * configure: Re-generate. * interps.h (INTERP_TUI): Define. * Makefile.in: Update dependencies. (TUI): New macro. (tui-main.o): Specify dependencies. (install-tui, uninstall-tui, clean-tui, all-tui): New rules. * tui/tui-main.c: New file. Index: Makefile.in =================================================================== RCS file: /cvs/src/src/gdb/Makefile.in,v retrieving revision 1.507 diff -u -r1.507 Makefile.in --- Makefile.in 18 Feb 2004 04:17:34 -0000 1.507 +++ Makefile.in 18 Feb 2004 18:49:07 -0000 @@ -179,6 +179,10 @@ # # TUI sub directory definitions # + +# Name of the TUI program +TUI=gdbtui + SUBDIR_TUI_OBS = \ tui-command.o \ tui-data.o \ @@ -638,8 +642,8 @@ cp_support_h = cp-support.h $(symtab_h) dcache_h = dcache.h defs_h = defs.h $(config_h) $(ansidecl_h) $(gdb_locale_h) $(gdb_signals_h) \ - $(libiberty_h) $(bfd_h) $(ui_file_h) $(xm_h) $(nm_h) \ - $(tm_h) $(fopen_same_h) $(gdbarch_h) + $(libiberty_h) $(bfd_h) $(ui_file_h) $(xm_h) $(nm_h) $(tm_h) \ + $(fopen_same_h) $(gdbarch_h) dictionary_h = dictionary.h disasm_h = disasm.h doublest_h = doublest.h $(floatformat_h) @@ -932,6 +936,8 @@ all: gdb$(EXEEXT) $(CONFIG_ALL) @$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do +.PHONY: all-tui +all-tui: $(TUI)$(EXEEXT) installcheck: @@ -975,6 +981,23 @@ $(INSTALL_DATA) $(srcdir)/gdb.1 \ $(DESTDIR)$(man1dir)/$$transformed_name.1 @$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do +.PHONY: install-tui +install-tui: + transformed_name=`t='$(program_transform_name)'; \ + echo $(TUI) | sed -e "$$t"` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=$(TUI) ; \ + else \ + true ; \ + fi ; \ + $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \ + $(INSTALL_PROGRAM) $(TUI)$(EXEEXT) \ + $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(man1dir) ; \ + $(INSTALL_DATA) $(srcdir)/gdb.1 \ + $(DESTDIR)$(man1dir)/$$transformed_name.1 + uninstall: force $(CONFIG_UNINSTALL) transformed_name=`t='$(program_transform_name)'; \ @@ -987,6 +1010,17 @@ rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \ $(DESTDIR)$(man1dir)/$$transformed_name.1 @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do +.PHONY: uninstall-tui +uninstall-tui: + transformed_name=`t='$(program_transform_name)'; \ + echo $(TUI) | sed -e $$t` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=$(TUI) ; \ + else \ + true ; \ + fi ; \ + rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \ + $(DESTDIR)$(man1dir)/$$transformed_name.1 # We do this by grepping through sources. If that turns out to be too slow, # maybe we could just require every .o file to have an initialization routine @@ -1081,6 +1115,12 @@ -o gdb$(EXEEXT) gdb.o libgdb.a \ $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) +$(TUI)$(EXEEXT): tui-main.o libgdb.a $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) + rm -f $(TUI)$(EXEEXT) + $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ + -o $(TUI)$(EXEEXT) tui-main.o libgdb.a \ + $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) + nlm: force rootme=`pwd`; export rootme; $(MAKE) $(TARGET_FLAGS_TO_PASS) DO=all DODIRS=nlm subdir_do @@ -1145,6 +1185,9 @@ rm -f init.c version.c rm -f gdb$(EXEEXT) core make.log rm -f gdb[0-9]$(EXEEXT) +.PHONY: clean-tui +clean-tui: + rm -f $(TUI)$(EXEEXT) # This used to depend on c-exp.c m2-exp.c TAGS # I believe this is wrong; the makefile standards for distclean just @@ -2179,11 +2222,11 @@ s390-nat.o: s390-nat.c $(defs_h) $(tm_h) $(regcache_h) $(inferior_h) \ $(s390_tdep_h) s390-tdep.o: s390-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) $(inferior_h) \ - $(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) \ - $(objfiles_h) $(tm_h) $(__bfd_bfd_h) $(floatformat_h) $(regcache_h) \ - $(trad_frame_h) $(frame_base_h) $(frame_unwind_h) \ - $(reggroups_h) $(regset_h) $(value_h) $(gdb_assert_h) $(dis_asm_h) \ - $(solib_svr4_h) $(s390_tdep_h) + $(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(objfiles_h) \ + $(tm_h) $(__bfd_bfd_h) $(floatformat_h) $(regcache_h) \ + $(trad_frame_h) $(frame_base_h) $(frame_unwind_h) $(reggroups_h) \ + $(regset_h) $(value_h) $(gdb_assert_h) $(dis_asm_h) $(solib_svr4_h) \ + $(s390_tdep_h) scm-exp.o: scm-exp.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ $(parser_defs_h) $(language_h) $(value_h) $(c_lang_h) $(scm_lang_h) \ $(scm_tags_h) @@ -2764,6 +2807,9 @@ $(tui_wingeneral_h) $(tui_stack_h) $(tui_regs_h) $(tui_win_h) \ $(tui_winsource_h) $(tui_disasm_h) $(gdb_string_h) $(gdb_curses_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-layout.c +tui-main.o: $(srcdir)/tui/tui-main.c $(defs_h) $(main_h) $(gdb_string_h) \ + $(interps_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-main.c tui-out.o: $(srcdir)/tui/tui-out.c $(defs_h) $(ui_out_h) $(tui_h) \ $(gdb_string_h) $(gdb_assert_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-out.c Index: configure.in =================================================================== RCS file: /cvs/src/src/gdb/configure.in,v retrieving revision 1.146 diff -u -r1.146 configure.in --- configure.in 16 Feb 2004 19:33:42 -0000 1.146 +++ configure.in 18 Feb 2004 18:49:21 -0000 @@ -163,6 +163,10 @@ CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)" ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" + CONFIG_ALL="${CONFIG_ALL} all-tui" + CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui" + CONFIG_INSTALL="${CONFIG_INSTALL} install-tui" + CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui" fi fi fi Index: interps.h =================================================================== RCS file: /cvs/src/src/gdb/interps.h,v retrieving revision 1.5 diff -u -r1.5 interps.h --- interps.h 7 Aug 2003 17:47:41 -0000 1.5 +++ interps.h 18 Feb 2004 18:49:23 -0000 @@ -71,5 +71,6 @@ #define INTERP_MI2 "mi2" #define INTERP_MI3 "mi3" #define INTERP_MI "mi" +#define INTERP_TUI "tui" #endif Index: tui/tui-main.c =================================================================== RCS file: tui/tui-main.c diff -N tui/tui-main.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ tui/tui-main.c 18 Feb 2004 18:49:29 -0000 @@ -0,0 +1,37 @@ +/* Main function for TUI gdb. + + Copyright 2002, 2004 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "main.h" +#include "gdb_string.h" +#include "interps.h" + +int +main (int argc, char **argv) +{ + struct captured_main_args args; + memset (&args, 0, sizeof args); + args.argc = argc; + args.argv = argv; + args.use_windows = 0; + args.interpreter_p = INTERP_TUI; + return gdb_main (&args); +} ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2004-02-18 18:53 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-02-10 18:32 [patch/rfc] "tui" Andrew Cagney 2004-02-10 18:40 ` Daniel Jacobowitz 2004-02-10 19:53 ` Kevin Buettner 2004-02-11 13:11 ` Bob Rossi 2004-02-11 14:47 ` Andrew Cagney 2004-02-11 15:00 ` Bob Rossi 2004-02-12 4:34 ` Christopher Faylor 2004-02-10 19:11 ` Eli Zaretskii 2004-02-10 20:47 ` Andrew Cagney 2004-02-11 6:27 ` Eli Zaretskii 2004-02-18 18:53 ` Andrew Cagney
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox