From: Andrew Cagney <cagney@gnu.org>
To: gdb-patches@sources.redhat.com
Subject: [patch/rfc] "tui"
Date: Tue, 10 Feb 2004 18:32:00 -0000 [thread overview]
Message-ID: <402923AD.7060104@gnu.org> (raw)
[-- 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);
+}
next reply other threads:[~2004-02-10 18:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-10 18:32 Andrew Cagney [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=402923AD.7060104@gnu.org \
--to=cagney@gnu.org \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox