From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11239 invoked by alias); 26 Aug 2002 18:29:59 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 11227 invoked from network); 26 Aug 2002 18:29:58 -0000 Received: from unknown (HELO tomago.toronto.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 26 Aug 2002 18:29:58 -0000 Received: (from graces@localhost) by tomago.toronto.redhat.com (8.11.6/8.11.6) id g7QITvb25155 for gdb-patches@sources.redhat.com; Mon, 26 Aug 2002 14:29:57 -0400 Date: Mon, 26 Aug 2002 11:36:00 -0000 From: Grace Sainsbury To: gdb-patches@sources.redhat.com Subject: [rfa] rename insight to insight Message-ID: <20020826142957.A24152@tomago.toronto.redhat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="17pEHd4RhPHOinZp" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i X-SW-Source: 2002-08/txt/msg00854.txt.bz2 --17pEHd4RhPHOinZp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 481 I changed the Makefile to make two independent executables (if gdbtk is available); gdb and insight, where gdb opens in the terminal and insight starts insight. ok? grace 2002-08-26 Grace Sainsbury * top.c: Set use_windows to default to zero. * main.c: Move main function to insight.c, gdb.c * insight.c: New File. * gdb.c: New File. * Makefile.in: Add rules for gdb.o, insight.o and insight. Change all, install and clean rules to include insight. --17pEHd4RhPHOinZp Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch Content-length: 9580 Index: Makefile.in =================================================================== RCS file: /cvs/src/src/gdb/Makefile.in,v retrieving revision 1.249 diff -u -r1.249 Makefile.in --- Makefile.in 25 Aug 2002 21:43:05 -0000 1.249 +++ Makefile.in 26 Aug 2002 18:25:23 -0000 @@ -868,7 +868,7 @@ .c.o: $(CC) -c $(INTERNAL_CFLAGS) $< -all: gdb$(EXEEXT) $(CONFIG_ALL) +all: insight$(EXEEXT) gdb$(EXEEXT) $(CONFIG_ALL) @$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do installcheck: @@ -898,28 +898,46 @@ # install-only is intended to address that need. install: all install-only install-only: $(CONFIG_INSTALL) - transformed_name=`t='$(program_transform_name)'; \ + $(srcdir)/../mkinstalldirs $(bindir) ; \ + transformed_name_gdb=`t='$(program_transform_name)'; \ echo gdb | sed -e $$t` ; \ - if test "x$$transformed_name" = x; then \ - transformed_name=gdb ; \ + if test "x$$transformed_name_gdb" = x; then \ + transformed_name_gdb=gdb ; \ + else \ + true ; \ + fi ; \ + if test -d "${srcdir}/gdbtk" ; then \ + transformed_name_insight=`t='$(program_transform_name)'; \ + echo insight | sed -e $$t` ; \ + if test "x$$transformed_name_insight" = x; then \ + transformed_name_insight=insight ; \ else \ true ; \ fi ; \ - $(srcdir)/../mkinstalldirs $(bindir) ; \ - $(INSTALL_PROGRAM) gdb$(EXEEXT) $(bindir)/$$transformed_name$(EXEEXT) ; \ - $(srcdir)/../mkinstalldirs $(man1dir) ; \ - $(INSTALL_DATA) $(srcdir)/gdb.1 $(man1dir)/$$transformed_name.1 + $(INSTALL_PROGRAM) insight$(EXEEXT) $(bindir)/$$transformed_name_insight$(EXEEXT) ; \ + fi; \ + $(INSTALL_PROGRAM) gdb$(EXEEXT) $(bindir)/$$transformed_name_gdb$(EXEEXT) ; \ + $(srcdir)/../mkinstalldirs $(man1dir) ; \ + $(INSTALL_DATA) $(srcdir)/gdb.1 $(man1dir)/$$transformed_name.1 @$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do uninstall: force $(CONFIG_UNINSTALL) - transformed_name=`t='$(program_transform_name)'; \ + transformed_name_gdb=`t='$(program_transform_name)'; \ echo gdb | sed -e $$t` ; \ - if test "x$$transformed_name" = x; then \ + if test "x$$transformed_name_gdb" = x; then \ transformed_name=gdb ; \ else \ true ; \ fi ; \ - rm -f $(bindir)/$$transformed_name$(EXEEXT) $(man1dir)/$$transformed_name.1 + rm -f $(bindir)/$$transformed_name_gdb$(EXEEXT) $(man1dir)/$$transformed_name.1 + transformed_name_insight=`t='$(program_transform_name)'; \ + echo insight | sed -e $$t` ; \ + if test "x$$transformed_name_insight" = x; then \ + transformed_name_insight=insight ; \ + else \ + true ; \ + fi ; \ + rm -f $(bindir)/$$transformed_name_insight$(EXEEXT) $(man1dir)/$$transformed_name.1 rm -rf $(GDBTK_LIBRARY) @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do @@ -1008,12 +1026,22 @@ init.o: init.c $(defs_h) $(call_cmds_h) # Removing the old gdb first works better if it is running, at least on SunOS. -gdb$(EXEEXT): main.o libgdb.a $(CONFIG_OBS) $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) +gdb$(EXEEXT): gdb.o main.o libgdb.a $(CONFIG_OBS) $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) rm -f gdb$(EXEEXT) $(HLDENV) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) -o gdb$(EXEEXT) \ - main.o libgdb.a $(CONFIG_OBS) $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS)\ + gdb.o libgdb.a main.o $(CONFIG_OBS) $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS)\ $(LOADLIBES) +# Removing the old gdb first works better if it is running, at least on SunOS. +# Only make the insight executable if gdbtk is available. +insight$(EXEEXT): insight.o main.o libgdb.a $(CONFIG_OBS) $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) + rm -f insight$(EXEEXT) + if [ -d "${srcdir}/gdbtk" ] ; then \ + $(HLDENV) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) -o insight$(EXEEXT) \ + insight.o libgdb.a main.o $(CONFIG_OBS) $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS)\ + $(LOADLIBES) ; \ + fi ; + nlm: force rootme=`pwd`; export rootme; $(MAKE) $(TARGET_FLAGS_TO_PASS) DO=all DODIRS=nlm subdir_do @@ -1106,6 +1134,7 @@ rm -f init.c version.c rm -f gdb$(EXEEXT) core make.log rm -f gdb[0-9]$(EXEEXT) + rm -f insight$(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 @@ -1724,6 +1753,8 @@ $(language_h) $(gdb_string_h) $(readline_headers) $(remote_h) \ $(linespec_h) $(regcache_h) $(completer_h) +gdb.o: gdb.c main.o $(defs_h) + gdbarch.o: gdbarch.c $(defs_h) $(arch_utils_h) $(gdbcmd_h) $(inferior_h) \ $(gdb_string_h) $(symtab_h) $(frame_h) $(inferior_h) $(breakpoint_h) \ $(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(gdbthread_h) \ @@ -1753,7 +1784,7 @@ gnu-v3-abi.o: gnu-v3-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(demangle_h) \ $(gdb_assert_h) $(gdb_string_h) - + h8300-tdep.o: h8300-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(dis_asm_h) \ $(gdbcmd_h) $(gdbtypes_h) $(gdbcore_h) $(gdb_string_h) $(value_h) \ $(regcache_h) @@ -1854,6 +1885,8 @@ inftarg.o: inftarg.c $(gdb_wait_h) $(defs_h) $(gdbcore_h) $(inferior_h) \ $(target_h) $(terminal_h) $(command_h) + +insight.o: insight.c main.o $(defs_h) irix4-nat.o: irix4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h) irix5-nat.o: irix5-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \ Index: gdb.c =================================================================== RCS file: gdb.c diff -N gdb.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gdb.c 26 Aug 2002 18:25:23 -0000 @@ -0,0 +1,41 @@ +/* Main function for CLI gdb. + Copyright 2002 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" + +/* from main.c */ +extern int captured_main (void *); + +struct captured_main_args + { + int argc; + char **argv; + }; + +int +main (int argc, char **argv) +{ + struct captured_main_args args; + args.argc = argc; + args.argv = argv; + use_windows = 0; + catch_errors (captured_main, &args, "", RETURN_MASK_ALL); + return 0; +} Index: insight.c =================================================================== RCS file: insight.c diff -N insight.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ insight.c 26 Aug 2002 18:25:23 -0000 @@ -0,0 +1,41 @@ +/* Main function for gdb with insight. + Copyright 2002 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" + +/* from main.c */ +extern int captured_main (void *); + +struct captured_main_args + { + int argc; + char **argv; + }; + +int +main (int argc, char **argv) +{ + struct captured_main_args args; + args.argc = argc; + args.argv = argv; + use_windows = 1; + catch_errors (captured_main, &args, "", RETURN_MASK_ALL); + return 0; +} Index: main.c =================================================================== RCS file: /cvs/src/src/gdb/main.c,v retrieving revision 1.18 diff -u -r1.18 main.c --- main.c 25 Jun 2002 05:35:16 -0000 1.18 +++ main.c 26 Aug 2002 18:25:23 -0000 @@ -114,7 +114,7 @@ char **argv; }; -static int +int captured_main (void *data) { struct captured_main_args *context = data; @@ -734,15 +734,15 @@ /* No exit -- exit is through quit_command. */ } -int -main (int argc, char **argv) -{ - struct captured_main_args args; - args.argc = argc; - args.argv = argv; - catch_errors (captured_main, &args, "", RETURN_MASK_ALL); - return 0; -} +/* int */ +/* main (int argc, char **argv) */ +/* { */ +/* struct captured_main_args args; */ +/* args.argc = argc; */ +/* args.argv = argv; */ +/* catch_errors (captured_main, &args, "", RETURN_MASK_ALL); */ +/* return 0; */ +/* } */ /* Don't use *_filtered for printing help. We don't want to prompt Index: top.c =================================================================== RCS file: /cvs/src/src/gdb/top.c,v retrieving revision 1.66 diff -u -r1.66 top.c --- top.c 18 Aug 2002 12:39:03 -0000 1.66 +++ top.c 26 Aug 2002 18:25:24 -0000 @@ -82,7 +82,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 */ --17pEHd4RhPHOinZp--