This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

rename to insight


Here's a different patch to have an `insight' executable.
This patch takes the shell script approach.

I like this approach because it doesn't cost much.  A distributor
(Debian, Red Hat, whoever) can build a single gdb.  By default this
gdb will just be gdb, but if the user invokes `insight' they get the
GUI.

I dislike the other approach (relinking for insight) because it makes
it harder for packagers.

For instance, how is documentation to be handled?  Only one package
can have a given file, so the packagers must either rename the insight
documentation (but why have two identical copies of the gdb docs?) or
leave the docs out of one package (eww), or make a new package holding
only the docs (also eww).

2000-11-21  Tom Tromey  <tromey@cygnus.com>

	* insight: New file.
	* Makefile.in (install-gdbtk): Install `insight'.
	* top.c (use_windows): Default to 0.

Tom

Index: insight
===================================================================
RCS file: insight
diff -N insight
--- /dev/null	Tue May  5 13:32:27 1998
+++ insight	Tue Nov 21 15:58:01 2000
@@ -0,0 +1,23 @@
+#! /bin/sh
+
+# GUI wrapper for gdb.
+# Copyright 1986-2000 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.
+
+exec gdb -w ${1+"$@"}
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.47
diff -u -r1.47 Makefile.in
--- Makefile.in	2000/11/10 23:02:56	1.47
+++ Makefile.in	2000/11/21 23:58:04
@@ -1334,11 +1340,20 @@
 	$(SHELL) $(srcdir)/../mkinstalldirs $(datadir)/gdbtcl/help \
 		$(datadir)/gdbtcl/help/images \
 		$(datadir)/gdbtcl/help/trace ; \
+	$(SHELL) $(srcdir)/../mkinstalldirs $(bindir)
 	cd $(srcdir)/gdbtk/library ; \
 	for i in *.tcl *.ith *.itb images/*.gif images2/*.gif images/icons.txt images2/icons.txt tclIndex help/*.html  help/trace/*.html help/trace/index.toc help/images/*.gif; \
 	  do \
 		$(INSTALL_DATA) $$i $(datadir)/gdbtcl/$$i ; \
-	  done ;
+	  done
+	transformed_name=`t='$(program_transform_name)'; \
+			  echo insight | sed -e $$t` ; \
+		if test "x$$transformed_name" = x; then \
+		  transformed_name=insight ; \
+		else \
+		  true ; \
+		fi ; \
+	$(INSTALL_PROGRAM) $(srcdir)/insight $(bindir)/$$transformed_name
 
 gdbres.o: $(srcdir)/gdbtk/gdb.rc $(srcdir)/gdbtk/gdbtool.ico
 	$(WINDRES) --include $(srcdir)/gdbtk $(srcdir)/gdbtk/gdb.rc gdbres.o
Index: top.c
===================================================================
RCS file: /cvs/src/src/gdb/top.c,v
retrieving revision 1.21
diff -u -r1.21 top.c
--- top.c	2000/11/16 14:51:50	1.21
+++ top.c	2000/11/21 23:58:07
@@ -173,7 +173,7 @@
 /* If nonzero, and GDB has been configured to be able to use windows,
    attempt to open them upon startup.  */
 
-int use_windows = 1;
+int use_windows = 0;
 
 extern char lang_frame_mismatch_warn[];		/* language.c */
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]