summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Molenda <jsm@bugshack.cygnus.com>2000-02-07 00:19:45 +0000
committerJason Molenda <jsm@bugshack.cygnus.com>2000-02-07 00:19:45 +0000
commitd288e640360c5e3ada4043e84dcce666b697a6a4 (patch)
tree43de4cbaa8f2f7abdfeaa3967450869a1ebbbc5f
parent4a0a51e37f1d7dd770d0306310c82c3aaeb8baa7 (diff)
downloadgdb-d288e640360c5e3ada4043e84dcce666b697a6a4.tar.gz
import insight-2000-02-04 snapshot (2nd try)
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/ChangeLog-997
-rw-r--r--gdb/MAINTAINERS2
-rw-r--r--gdb/Makefile.in111
-rwxr-xr-xgdb/configure997
-rw-r--r--gdb/configure.in162
-rw-r--r--gdb/doc/ChangeLog4
-rw-r--r--gdb/doc/Makefile.in13
-rw-r--r--gdb/main.c39
-rw-r--r--gdb/testsuite/ChangeLog91
-rwxr-xr-xgdb/testsuite/configure36
-rw-r--r--gdb/testsuite/configure.in32
-rw-r--r--gdb/testsuite/lib/gdb.exp101
-rw-r--r--gdb/v850ice.c29
14 files changed, 1629 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c2c53f21290..4d68fd71b92 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -22,6 +22,11 @@ Fri Feb 4 22:42:36 2000 Andrew Cagney <cagney@b1.cygnus.com>
* Makefile.in (INIT_FILES): Append CONFIG_INITS
* configure.in (CONFIG_INIT): Initialize.
+ (links): Link srcdir/gdbtk/library to gdbtcl2.
+ * gdbtcl2: Moved to gdbtk/library.
+ ChangeLog-gdbtk, gdbtk-cmds.c, gdbtk-hooks.c, gdbtk-variable.c,
+ gdbtk-varobj.c, gdbtk-wrapper.c, gdbtk-wrapper.h, gdbtk.c,
+ gdbtk.h: Moved to gdbtk/generic.
2000-02-03 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
diff --git a/gdb/ChangeLog-99 b/gdb/ChangeLog-99
index 2fc778b652a..b82a88d5521 100644
--- a/gdb/ChangeLog-99
+++ b/gdb/ChangeLog-99
@@ -3209,6 +3209,9 @@ Sat Sep 18 07:13:03 1999 Jeffrey A Law (law@cygnus.com)
1999-09-17 Fernando Nasser <fnasser@totem.to.cygnus.com>
* Makefile.in: Add entries for varobj.[cho] and wrapper.[cho].
+ gdbtk-varobj.[co]. gdbtk-varobj.o is not yet on the COMMON_OBS
+ list because it conflicts with the older gdbtk-variable.o which
+ is still the default.
1999-09-17 Fernando Nasser <fnasser@totem.to.cygnus.com>
@@ -3368,6 +3371,8 @@ Tue Sep 14 14:34:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
* defs.h (continuation): Make this a typedef.
+ * Makefile.in (gdbtk.o, gdbtk-cmds.o): Depend on $(top_h).
+
* Makefile.in (i386-linux-nat.o): Depend on symfile.h, not
$(symfile_h); the latter has no definition.
@@ -3411,6 +3416,8 @@ Tue Sep 14 14:34:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
__dld_break, which contains the permanent breakpoint, when interesting
things happen. Tell GDB that the breakpoint in __dld_break is
permanent.
+ * gdbtk-cmds.c (gdb_get_breakpoint_info): Report a permanent
+ breakpoint as enabled.
* infrun.c (SKIP_PERMANENT_BREAKPOINT): Provide default definition.
(default_skip_permanent_breakpoint): New function.
(resume): If we're trying to resume at a permanent breakpoint, use
diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS
index ef02b907400..7da82dd9124 100644
--- a/gdb/MAINTAINERS
+++ b/gdb/MAINTAINERS
@@ -20,6 +20,8 @@ x86 linux native Jim Blandy jimb@cygnus.com
Scheme support Jim Blandy jimb@cygnus.com
svr4 shlibs (solib.c) Jim Blandy jimb@cygnus.com
arm target Jim Ingham jingham@cygnus.com
+gdbtk (c & tcl) Jim Ingham jingham@cygnus.com
+libgui (w/foundry, sn) Jim Ingham jingham@cygnus.com
hurd native Mark Kettenis kettenis@wins.va.nl
hpux, hp pa native Jeff Law law@cygnus.com
m32r target Michael Snyder msnyder@cygnus.com
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 775067c760e..034cafa69d8 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -158,6 +158,47 @@ SIM =
WIN32LIBS = @WIN32LIBS@
+# Where is the TCL library? Typically in ../tcl.
+LIB_INSTALL_DIR = $(libdir)
+# This variable is needed when doing dynamic linking.
+LIB_RUNTIME_DIR = $(libdir)
+TCL = @TCL_LD_SEARCH_FLAGS@ @TCL_BUILD_LIB_SPEC@
+TCL_CFLAGS = @TCLHDIR@
+TCL_DEPS =
+GDBTKLIBS = @GDBTKLIBS@
+# Extra flags that the GDBTK files need:
+GDBTK_CFLAGS = @GDBTK_CFLAGS@
+
+# Where is the TK library? Typically in ../tk.
+TK = @TK_BUILD_LIB_SPEC@
+TK_CFLAGS = @TKHDIR@ @TK_BUILD_INCLUDES@
+TK_DEPS =
+
+# Where is Itcl? Typically in ../itcl/itcl.
+ITCL_CFLAGS = @ITCLHDIR@
+ITCL = @ITCLLIB@
+ITCL_DEPS = @ITCL_DEPS@
+
+# Where is Itk? Typically in ../itcl/itk.
+ITK_CFLAGS = @ITKHDIR@
+ITK = @ITKLIB@
+ITK_DEPS = @ITK_DEPS@
+
+# Where is Tix? Typically in ../tix.
+TIX_CFLAGS = @TIXHDIR@
+TIX = @TIXLIB@
+TIX_DEPS = @TIX_DEPS@
+
+X11_CFLAGS = @TK_XINCLUDES@
+X11_LDFLAGS =
+X11_LIBS =
+
+WIN32LDAPP = @WIN32LDAPP@
+
+ENABLE_GDBTK= @ENABLE_GDBTK@
+LIBGUI = @LIBGUI@
+GUI_CFLAGS_X = @GUI_CFLAGS_X@
+IDE_CFLAGS=$(GUI_CFLAGS_X) $(IDE_CFLAGS_X)
ENABLE_CFLAGS= @ENABLE_CFLAGS@
@@ -390,6 +431,7 @@ SFILES = ax-general.c ax-gdb.c bcache.c blockframe.c breakpoint.c \
kod.c kod-cisco.c \
ui-out.c cli-out.c \
varobj.c wrapper.c \
+ gdbtk-varobj.c \
jv-exp.y jv-lang.c jv-valprint.c jv-typeprint.c \
m2-exp.y m2-lang.c m2-typeprint.c m2-valprint.c main.c maint.c \
mem-break.c minsyms.c mipsread.c nlmread.c objfiles.c parse.c \
@@ -609,6 +651,18 @@ install-only:
fi ; \
$(INSTALL_PROGRAM) gdb$(EXEEXT) $(bindir)/$$transformed_name$(EXEEXT) ; \
$(INSTALL_DATA) $(srcdir)/gdb.1 $(man1dir)/$$transformed_name.1
+ $(SHELL) $(srcdir)/../mkinstalldirs $(datadir)/gdbtcl ; \
+ $(SHELL) $(srcdir)/../mkinstalldirs \
+ $(datadir)/gdbtcl/images \
+ $(datadir)/gdbtcl/images2 ; \
+ $(SHELL) $(srcdir)/../mkinstalldirs $(datadir)/gdbtcl/help \
+ $(datadir)/gdbtcl/help/images \
+ $(datadir)/gdbtcl/help/trace ; \
+ 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 ;
@$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
uninstall: force
@@ -620,6 +674,7 @@ uninstall: force
true ; \
fi ; \
rm -f $(bindir)/$$transformed_name$(EXEEXT) $(man1dir)/$$transformed_name.1
+ rm -rf $(datadir)/gdbtcl
@$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
# We do this by grepping through sources. If that turns out to be too slow,
@@ -1170,6 +1225,62 @@ findvar.o: findvar.c $(defs_h) $(gdbcore_h) $(inferior_h) target.h \
fork-child.o: fork-child.c $(wait_h) $(defs_h) $(gdbcore_h) \
$(inferior_h) target.h terminal.h gdbthread.h gdb_string.h
+gdbres.o: $(srcdir)/gdbtk/gdb.rc $(srcdir)/gdbtk/gdbtool.ico
+ $(WINDRES) --include $(srcdir)/gdbtk $(srcdir)/gdbtk/gdb.rc gdbres.o
+
+gdbtk.o: $(srcdir)/gdbtk/generic/gdbtk.c \
+ $(srcdir)/gdbtk/generic/gdbtk.h $(defs_h) \
+ $(symtab_h) $(inferior_h) $(command_h) \
+ $(bfd_h) symfile.h objfiles.h target.h gdb_string.h $(tracepoint_h) \
+ $(top_h)
+ $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
+ $(ITK_CFLAGS) $(TIX_CFLAGS) \
+ $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
+ $(srcdir)/gdbtk/generic/gdbtk.c -DGDBTK_LIBRARY=\"$(datadir)/gdbtcl\"
+
+gdbtk-cmds.o: $(srcdir)/gdbtk/generic/gdbtk-cmds.c \
+ $(srcdir)/gdbtk/generic/gdbtk.h \
+ $(defs_h) $(symtab_h) $(inferior_h) \
+ $(command_h) $(bfd_h) $(top_h) symfile.h objfiles.h target.h \
+ gdb_string.h $(tracepoint_h) $(frame_h) source.h
+ $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
+ $(TIX_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \
+ $(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-cmds.c \
+ -DGDBTK_LIBRARY=\"$(datadir)/gdbtcl\"
+
+gdbtk-hooks.o: $(srcdir)/gdbtk/generic/gdbtk-hooks.c \
+ $(srcdir)/gdbtk/generic/gdbtk.h $(defs_h) \
+ $(symtab_h) $(inferior_h) $(command_h) \
+ $(bfd_h) symfile.h objfiles.h target.h gdb_string.h $(tracepoint_h)
+ $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) $(TIX_CFLAGS) \
+ $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
+ $(srcdir)/gdbtk/generic/gdbtk-hooks.c -DGDBTK_LIBRARY=\"$(datadir)/gdbtcl\"
+
+gdbtk-variable.o: $(srcdir)/gdbtk/generic/gdbtk-variable.c \
+ $(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-wrapper.h
+ $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) $(TIX_CFLAGS) \
+ $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
+ $(srcdir)/gdbtk/generic/gdbtk-variable.c
+
+gdbtk-varobj.o: $(srcdir)/gdbtk/generic/gdbtk-varobj.c \
+ $(srcdir)/gdbtk/generic/gdbtk.h \
+ $(defs_h) $(value_h) varobj.h
+ $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) $(TIX_CFLAGS) \
+ $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
+ $(srcdir)/gdbtk/generic/gdbtk-varobj.c
+
+gdbtk-wrapper.o: $(srcdir)/gdbtk/generic/gdbtk-wrapper.c \
+ $(srcdir)/gdbtk/generic/gdbtk-wrapper.h
+ $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(GDBTK_CFLAGS)\
+ $(srcdir)/gdbtk/generic/gdbtk-wrapper.c
+
+v850ice.o: v850ice.c $(defs_h) $(symtab_h) $(inferior_h) $(command_h) \
+ $(frame_h) $(breakpoint_h) $(gdbcore_h) $(value_h) symfile.h \
+ gdb_string.h target.h objfiles.h
+ $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) $(TIX_CFLAGS) \
+ $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
+ $(srcdir)/v850ice.c
+
tracepoint.o: tracepoint.c $(defs_h) $(symtab_h) $(frame_h) $(tracepoint_h) \
$(gdbtypes_h) $(expression_h) $(gdbcmd_h) $(value_h) target.h \
language.h gdb_string.h $(readline_headers) $(remote_h)
diff --git a/gdb/configure b/gdb/configure
index 441911a096e..a53879c6529 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -5554,6 +5554,10 @@ if test x$gdb_cv_os_cygwin = xyes; then
fi
+LIBGUI="../libgui/src/libgui.a"
+GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
+
+
# Check whether --with-cpu or --without-cpu was given.
if test "${with_cpu+set}" = set; then
@@ -5596,6 +5600,968 @@ fi
+ENABLE_GDBTK=
+
+# Check whether --enable-gdbtk or --disable-gdbtk was given.
+if test "${enable_gdbtk+set}" = set; then
+ enableval="$enable_gdbtk"
+ case "${enableval}" in
+ yes)
+ case "$host" in
+ *go32*)
+ echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
+ enable_gdbtk=no ;;
+ *windows*)
+ echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
+ enable_gdbtk=no ;;
+ *)
+ enable_gdbtk=yes ;;
+ esac ;;
+ no)
+ enable_gdbtk=no ;;
+ *)
+ { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
+esac
+else
+
+# Default is on for everything but go32 and Cygwin
+case "$host" in
+ *go32* | *windows*)
+ ;;
+ *)
+ enable_gdbtk=yes ;;
+ esac
+
+fi
+
+
+WIN32LDAPP=
+
+
+
+configdir="unix"
+
+GDBTKLIBS=
+if test "${enable_gdbtk}" = "yes"; then
+
+
+#
+# Ok, lets find the tcl configuration
+# First, look for one uninstalled.
+# the alternative search directory is invoked by --with-tclconfig
+#
+
+if test x"${no_tcl}" = x ; then
+ # we reset no_tcl in case something fails here
+ no_tcl=true
+ # Check whether --with-tclconfig or --without-tclconfig was given.
+if test "${with_tclconfig+set}" = set; then
+ withval="$with_tclconfig"
+ with_tclconfig=${withval}
+fi
+
+ echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
+echo "configure:5791: checking for Tcl configuration" >&5
+ if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+
+ # First check to see if --with-tclconfig was specified.
+ if test x"${with_tclconfig}" != x ; then
+ if test -f "${with_tclconfig}/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
+ else
+ { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
+ fi
+ fi
+
+ # then check for a private Tcl installation
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in \
+ ../tcl \
+ `ls -dr ../tcl[7-9]* 2>/dev/null` \
+ ../../tcl \
+ `ls -dr ../../tcl[7-9]* 2>/dev/null` \
+ ../../../tcl \
+ `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
+ if test -f "$i/${configdir}/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few common install locations
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
+ if test -f "$i/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few other private locations
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in \
+ ${srcdir}/../tcl \
+ `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
+ if test -f "$i/${configdir}/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
+ break
+ fi
+ done
+ fi
+
+fi
+
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ TCLCONFIG="# no Tcl configs found"
+ echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
+ else
+ no_tcl=
+ TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
+ echo "$ac_t""found $TCLCONFIG" 1>&6
+ fi
+fi
+
+ if test -z "${no_tcl}"; then
+
+ . $TCLCONFIG
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Ok, lets find the tk configuration
+# First, look for one uninstalled.
+# the alternative search directory is invoked by --with-tkconfig
+#
+
+if test x"${no_tk}" = x ; then
+ # we reset no_tk in case something fails here
+ no_tk=true
+ # Check whether --with-tkconfig or --without-tkconfig was given.
+if test "${with_tkconfig+set}" = set; then
+ withval="$with_tkconfig"
+ with_tkconfig=${withval}
+fi
+
+ echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
+echo "configure:5899: checking for Tk configuration" >&5
+ if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+
+ # First check to see if --with-tkconfig was specified.
+ if test x"${with_tkconfig}" != x ; then
+ if test -f "${with_tkconfig}/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
+ else
+ { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
+ fi
+ fi
+
+ # then check for a private Tk library
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ for i in \
+ ../tk \
+ `ls -dr ../tk[4-9]* 2>/dev/null` \
+ ../../tk \
+ `ls -dr ../../tk[4-9]* 2>/dev/null` \
+ ../../../tk \
+ `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
+ if test -f "$i/${configdir}/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few common install locations
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
+ if test -f "$i/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few other private locations
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ for i in \
+ ${srcdir}/../tk \
+ `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
+ if test -f "$i/${configdir}/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
+ break
+ fi
+ done
+ fi
+
+fi
+
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ TKCONFIG="# no Tk configs found"
+ echo "configure: warning: Can't find Tk configuration definitions" 1>&2
+ else
+ no_tk=
+ TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
+ echo "$ac_t""found $TKCONFIG" 1>&6
+ fi
+fi
+
+
+
+ # If $no_tk is nonempty, then we can't do Tk, and there is no
+ # point to doing Tcl.
+ if test -z "${no_tk}"; then
+
+ if test -f "$TKCONFIG" ; then
+ . $TKCONFIG
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Ok, lets find the tcl source trees so we can use the headers
+# Warning: transition of version 9 to 10 will break this algorithm
+# because 10 sorts before 9. We also look for just tcl. We have to
+# be careful that we don't match stuff like tclX by accident.
+# the alternative search directory is involked by --with-tclinclude
+#
+
+no_tcl=true
+echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
+echo "configure:5995: checking for Tcl private headers. dir=${configdir}" >&5
+# Check whether --with-tclinclude or --without-tclinclude was given.
+if test "${with_tclinclude+set}" = set; then
+ withval="$with_tclinclude"
+ with_tclinclude=${withval}
+fi
+
+if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+# first check to see if --with-tclinclude was specified
+if test x"${with_tclinclude}" != x ; then
+ if test -f ${with_tclinclude}/tclInt.h ; then
+ ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
+ elif test -f ${with_tclinclude}/generic/tclInt.h ; then
+ ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
+ else
+ { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
+ fi
+fi
+
+# next check if it came with Tcl configuration file
+if test x"${ac_cv_c_tclconfig}" = x ; then
+ if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
+ ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
+ fi
+fi
+
+# next check in private source directory
+#
+# since ls returns lowest version numbers first, reverse its output
+if test x"${ac_cv_c_tclh}" = x ; then
+ for i in \
+ ${srcdir}/../tcl \
+ `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
+ ${srcdir}/../../tcl \
+ `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
+ ${srcdir}/../../../tcl \
+ `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
+ if test -f $i/generic/tclInt.h ; then
+ ac_cv_c_tclh=`(cd $i/generic; pwd)`
+ break
+ fi
+ done
+fi
+# finally check in a few common install locations
+#
+# since ls returns lowest version numbers first, reverse its output
+if test x"${ac_cv_c_tclh}" = x ; then
+ for i in \
+ `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
+ `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
+ /usr/local/src/tcl \
+ /usr/local/lib/tcl \
+ ${prefix}/include ; do
+ if test -f $i/generic/tclInt.h ; then
+ ac_cv_c_tclh=`(cd $i/generic; pwd)`
+ break
+ fi
+ done
+fi
+# see if one is installed
+if test x"${ac_cv_c_tclh}" = x ; then
+ ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
+echo "configure:6061: checking for tclInt.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 6066 "configure"
+#include "confdefs.h"
+#include <tclInt.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_cv_c_tclh=installed
+else
+ echo "$ac_t""no" 1>&6
+ac_cv_c_tclh=""
+fi
+
+fi
+
+fi
+
+if test x"${ac_cv_c_tclh}" = x ; then
+ TCLHDIR="# no Tcl private headers found"
+ { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
+fi
+if test x"${ac_cv_c_tclh}" != x ; then
+ no_tcl=""
+ if test x"${ac_cv_c_tclh}" = x"installed" ; then
+ echo "$ac_t""is installed" 1>&6
+ TCLHDIR=""
+ else
+ echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
+ # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
+ TCLHDIR="-I${ac_cv_c_tclh}"
+ fi
+fi
+
+
+
+
+#
+# Ok, lets find the tk source trees so we can use the headers
+# If the directory (presumably symlink) named "tk" exists, use that one
+# in preference to any others. Same logic is used when choosing library
+# and again with Tcl. The search order is the best place to look first, then in
+# decreasing significance. The loop breaks if the trigger file is found.
+# Note the gross little conversion here of srcdir by cd'ing to the found
+# directory. This converts the path from a relative to an absolute, so
+# recursive cache variables for the path will work right. We check all
+# the possible paths in one loop rather than many seperate loops to speed
+# things up.
+# the alternative search directory is involked by --with-tkinclude
+#
+no_tk=true
+echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
+echo "configure:6131: checking for Tk private headers" >&5
+# Check whether --with-tkinclude or --without-tkinclude was given.
+if test "${with_tkinclude+set}" = set; then
+ withval="$with_tkinclude"
+ with_tkinclude=${withval}
+fi
+
+if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+# first check to see if --with-tkinclude was specified
+if test x"${with_tkinclude}" != x ; then
+ if test -f ${with_tkinclude}/tk.h ; then
+ ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
+ elif test -f ${with_tkinclude}/generic/tk.h ; then
+ ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
+ else
+ { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
+ fi
+fi
+
+# next check if it came with Tk configuration file
+if test x"${ac_cv_c_tkconfig}" = x ; then
+ if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
+ ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
+ fi
+fi
+
+# next check in private source directory
+#
+# since ls returns lowest version numbers first, reverse its output
+if test x"${ac_cv_c_tkh}" = x ; then
+ for i in \
+ ${srcdir}/../tk \
+ `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
+ ${srcdir}/../../tk \
+ `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
+ ${srcdir}/../../../tk \
+ `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
+ if test -f $i/generic/tk.h ; then
+ ac_cv_c_tkh=`(cd $i/generic; pwd)`
+ break
+ fi
+ done
+fi
+# finally check in a few common install locations
+#
+# since ls returns lowest version numbers first, reverse its output
+if test x"${ac_cv_c_tkh}" = x ; then
+ for i in \
+ `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
+ `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
+ /usr/local/src/tk \
+ /usr/local/lib/tk \
+ ${prefix}/include ; do
+ if test -f $i/generic/tk.h ; then
+ ac_cv_c_tkh=`(cd $i/generic; pwd)`
+ break
+ fi
+ done
+fi
+# see if one is installed
+if test x"${ac_cv_c_tkh}" = x ; then
+ ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for tk.h""... $ac_c" 1>&6
+echo "configure:6197: checking for tk.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 6202 "configure"
+#include "confdefs.h"
+#include <tk.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_cv_c_tkh=installed
+else
+ echo "$ac_t""no" 1>&6
+ac_cv_c_tkh=""
+fi
+
+fi
+
+fi
+
+if test x"${ac_cv_c_tkh}" != x ; then
+ no_tk=""
+ if test x"${ac_cv_c_tkh}" = x"installed" ; then
+ echo "$ac_t""is installed" 1>&6
+ TKHDIR=""
+ else
+ echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
+ # this hack is cause the TKHDIR won't print if there is a "-I" in it.
+ TKHDIR="-I${ac_cv_c_tkh}"
+ fi
+else
+ TKHDIR="# no Tk directory found"
+ echo "configure: warning: Can't find Tk private headers" 1>&2
+ no_tk=true
+fi
+
+
+
+
+echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
+echo "configure:6253: checking for Itcl private headers. srcdir=${srcdir}" >&5
+if test x"${ac_cv_c_itclh}" = x ; then
+ for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
+ if test -f $i/generic/itcl.h ; then
+ ac_cv_c_itclh=`(cd $i/generic; pwd)`
+ break
+ fi
+ done
+fi
+if test x"${ac_cv_c_itclh}" = x ; then
+ ITCLHDIR="# no Itcl private headers found"
+ { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
+fi
+if test x"${ac_cv_c_itclh}" != x ; then
+ ITCLHDIR="-I${ac_cv_c_itclh}"
+fi
+# should always be here
+# ITCLLIB="../itcl/itcl/unix/libitcl.a"
+
+#AC_SUBST(ITCLLIB)
+
+
+echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
+echo "configure:6276: checking for Itk private headers. srcdir=${srcdir}" >&5
+if test x"${ac_cv_c_itkh}" = x ; then
+ for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
+ if test -f $i/generic/itk.h ; then
+ ac_cv_c_itkh=`(cd $i/generic; pwd)`
+ break
+ fi
+ done
+fi
+if test x"${ac_cv_c_itkh}" = x ; then
+ ITKHDIR="# no Itk private headers found"
+ { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
+fi
+if test x"${ac_cv_c_itkh}" != x ; then
+ ITKHDIR="-I${ac_cv_c_itkh}"
+fi
+# should always be here
+# ITKLIB="../itcl/itk/unix/libitk.a"
+
+#AC_SUBST(ITKLIB)
+
+
+echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6
+echo "configure:6299: checking for Tix private headers. srcdir=${srcdir}" >&5
+if test x"${ac_cv_c_tixh}" = x ; then
+ for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
+ if test -f $i/generic/tix.h ; then
+ ac_cv_c_tixh=`(cd $i/generic; pwd)`
+ break
+ fi
+ done
+fi
+if test x"${ac_cv_c_tixh}" = x ; then
+ TIXHDIR="# no Tix private headers found"
+ { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; }
+fi
+if test x"${ac_cv_c_tixh}" != x ; then
+ TIXHDIR="-I${ac_cv_c_tixh}"
+fi
+
+
+
+ # now look for Itcl library stuff
+
+
+#
+# Ok, lets find the itcl configuration
+# First, look for one uninstalled.
+# the alternative search directory is invoked by --with-itclconfig
+#
+
+if test x"${no_itcl}" = x ; then
+ # we reset no_itcl in case something fails here
+ no_itcl=true
+ # Check whether --with-itclconfig or --without-itclconfig was given.
+if test "${with_itclconfig+set}" = set; then
+ withval="$with_itclconfig"
+ with_itclconfig=${withval}
+fi
+
+ echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
+echo "configure:6337: checking for Itcl configuration" >&5
+ if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+
+ # First check to see if --with-itclconfig was specified.
+ if test x"${with_itclconfig}" != x ; then
+ if test -f "${with_itclconfig}/itclConfig.sh" ; then
+ ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
+ else
+ { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
+ fi
+ fi
+
+ # then check for a private Itcl library
+ if test x"${ac_cv_c_itclconfig}" = x ; then
+ for i in \
+ ../itcl/itcl \
+ `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
+ ../../itcl \
+ `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
+ ../../../itcl \
+ `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
+ if test -f "$i/itclConfig.sh" ; then
+ ac_cv_c_itclconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few common install locations
+ if test x"${ac_cv_c_itclconfig}" = x ; then
+ for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
+ if test -f "$i/itclConfig.sh" ; then
+ ac_cv_c_itclconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few other private locations
+ if test x"${ac_cv_c_itclconfig}" = x ; then
+ for i in \
+ ${srcdir}/../itcl/itcl \
+ `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
+ if test -f "$i/itclConfig.sh" ; then
+ ac_cv_c_itclconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+
+fi
+
+ if test x"${ac_cv_c_itclconfig}" = x ; then
+ ITCLCONFIG="# no Itcl configs found"
+ echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
+ else
+ no_itcl=
+ ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
+ echo "$ac_t""found $ITCLCONFIG" 1>&6
+ fi
+fi
+
+ if test -z "${no_itcl}"; then
+
+ if test -f "$ITCLCONFIG" ; then
+ . $ITCLCONFIG
+ fi
+
+
+
+
+
+
+
+
+
+
+
+ case "${host}" in
+ *-*-cygwin*)
+ itcldir=../itcl/itcl/win/
+ ;;
+ *)
+ itcldir=../itcl/itcl/unix/
+ ;;
+ esac
+
+
+ ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
+ ITCL_DEPS="${itcldir}${ITCL_LIB_FILE}"
+ fi
+
+
+ # now look for Itk library stuff
+
+#
+# Ok, lets find the itk configuration
+# First, look for one uninstalled.
+# the alternative search directory is invoked by --with-itkconfig
+#
+
+if test x"${no_itk}" = x ; then
+ # we reset no_itk in case something fails here
+ no_itk=true
+ # Check whether --with-itkconfig or --without-itkconfig was given.
+if test "${with_itkconfig+set}" = set; then
+ withval="$with_itkconfig"
+ with_itkconfig=${withval}
+fi
+
+ echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
+echo "configure:6449: checking for Itk configuration" >&5
+ if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+
+ # First check to see if --with-itkconfig was specified.
+ if test x"${with_itkconfig}" != x ; then
+ if test -f "${with_itkconfig}/itkConfig.sh" ; then
+ ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
+ else
+ { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
+ fi
+ fi
+
+ # then check for a private Itk library
+ if test x"${ac_cv_c_itkconfig}" = x ; then
+ for i in \
+ ../itcl/itk \
+ `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
+ ../../itk \
+ `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
+ ../../../itk \
+ `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
+ if test -f "$i/itkConfig.sh" ; then
+ ac_cv_c_itkconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few common install locations
+ if test x"${ac_cv_c_itkconfig}" = x ; then
+ for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
+ if test -f "$i/itkConfig.sh" ; then
+ ac_cv_c_itkconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few other private locations
+ if test x"${ac_cv_c_itkconfig}" = x ; then
+ for i in \
+ ${srcdir}/../itcl/itk \
+ `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
+ if test -f "$i/itkConfig.sh" ; then
+ ac_cv_c_itkconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+
+fi
+
+ if test x"${ac_cv_c_itkconfig}" = x ; then
+ ITKCONFIG="# no Itk configs found"
+ echo "configure: warning: Can't find Itk configuration definitions" 1>&2
+ else
+ no_itk=
+ ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
+ echo "$ac_t""found $ITKCONFIG" 1>&6
+ fi
+fi
+
+
+ if test -z "${no_itcl}"; then
+
+ if test -f "$ITKCONFIG" ; then
+ . $ITKCONFIG
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+ case "${host}" in
+ *-*-cygwin*)
+ itkdir=../itcl/itk/win/
+ ;;
+ *)
+ itkdir=../itcl/itk/unix/
+ ;;
+ esac
+
+ ITKLIB="${ITK_BUILD_LIB_SPEC}"
+ ITK_DEPS="${itkdir}${ITK_LIB_FILE}"
+ fi
+
+ # now look for Tix library stuff
+
+#
+# Ok, lets find the tix configuration
+# First, look for one uninstalled.
+# the alternative search directory is invoked by --with-itkconfig
+#
+
+if test x"${no_tix}" = x ; then
+ # we reset no_tix in case something fails here
+ no_tix=true
+ # Check whether --with-tixconfig or --without-tixconfig was given.
+if test "${with_tixconfig+set}" = set; then
+ withval="$with_tixconfig"
+ with_tixconfig=${withval}
+fi
+
+ echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6
+echo "configure:6561: checking for Tix configuration" >&5
+ if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+
+ # First check to see if --with-tixconfig was specified.
+ if test x"${with_tixconfig}" != x ; then
+ if test -f "${with_tixconfig}/tixConfig.sh" ; then
+ ac_cv_c_tixconfig=`(cd ${with_tixconfig}; pwd)`
+ else
+ { echo "configure: error: ${with_tixconfig} directory doesn't contain tixConfig.sh" 1>&2; exit 1; }
+ fi
+ fi
+
+ # then check for a private Tix library
+ if test x"${ac_cv_c_tixconfig}" = x ; then
+ for i in \
+ ../tix \
+ `ls -dr ../tix 2>/dev/null` \
+ ../../tix \
+ `ls -dr ../../tix 2>/dev/null` \
+ ../../../tix \
+ `ls -dr ../../../tix 2>/dev/null` ; do
+ echo "**** Looking at $i - with ${configdir}"
+ if test -f "$i/tixConfig.sh" ; then
+ ac_cv_c_tixconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few common install locations
+ if test x"${ac_cv_c_tixconfig}" = x ; then
+ for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
+ echo "**** Looking at $i"
+ if test -f "$i/tixConfig.sh" ; then
+ ac_cv_c_tixconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few other private locations
+ echo "**** Other private locations"
+ if test x"${ac_cv_c_tixconfig}" = x ; then
+ for i in \
+ ${srcdir}/../tix \
+ `ls -dr ${srcdir}/../tix 2>/dev/null` ; do
+ echo "**** Looking at $i - with ${configdir}"
+ if test -f "$i/${configdir}/tixConfig.sh" ; then
+ ac_cv_c_tixconfig=`(cd $i/${configdir}; pwd)`
+ break
+ fi
+ done
+ fi
+
+fi
+
+ if test x"${ac_cv_c_tixconfig}" = x ; then
+ TIXCONFIG="# no Tix configs found"
+ echo "configure: warning: Can't find Tix configuration definitions" 1>&2
+ else
+ no_tix=
+ TIXCONFIG=${ac_cv_c_tixconfig}/tixConfig.sh
+ echo "$ac_t""found $TIXCONFIG" 1>&6
+ fi
+fi
+
+
+ if test -z "${no_tix}"; then
+
+ if test -f "$TIXCONFIG" ; then
+ . $TIXCONFIG
+ fi
+
+
+
+
+
+
+
+
+ TIXLIB="${TIX_BUILD_LIB_SPEC}"
+ TIX_DEPS="${TIX_BUILD_LOCATION}/${TIX_LIB_FILE}"
+ fi
+
+ ENABLE_GDBTK=1
+ ENABLE_CFLAGS="$ENABLE_CFLAGS -DGDBTK"
+ # Tcl/Tk 8.1 require -fwritable strings. I don't
+ # know whether 8.2 will or not, but I bet it will.
+ # I don't have to worry about 7.x since we don't support it.
+ GDBTK_CFLAGS=""
+ if test "$GCC" = "yes"; then
+ if test "$TCL_VERSION" != "8.0" ; then
+ GDBTK_CFLAGS="-fwritable-strings"
+ fi
+ fi
+
+ # Include some libraries that Tcl and Tk want.
+ TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
+ CONFIG_DEPS='$(LIBGUI) $(ITCL_DEPS) $(ITK_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)'
+ # Yes, the ordering seems wrong here. But it isn't.
+ # TK_LIBS is the list of libraries that need to be linked
+ # after Tcl/Tk. Note that this isn't put into LIBS. If it
+ # were in LIBS then any link tests after this point would
+ # try to include things like `$(LIBGUI)', which wouldn't work.
+ GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
+ CONFIG_SRCS="${CONFIG_SRCS} gdbtk/generic/gdbtk.c gdbtk/generic/gdbtk-cmds.c gdbtk/generic/gdbtk-hooks.c gdbtk/generic/gdbtk-variable.c gdbtk/generic/gdbtk-wrapper.c"
+ CONFIG_OBS="${CONFIG_OBS} gdbtk.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-variable.o gdbtk-wrapper.o"
+ CONFIG_INITS="${CONFIG_INITS} gdbtk/generic/gdbtk.c gdbtk/generic/gdbtk-cmds.c gdbtk/generic/gdbtk-hooks.c gdbtk/generic/gdbtk-variable.c gdbtk/generic/gdbtk-wrapper.c"
+
+ if test x$gdb_cv_os_cygwin = xyes; then
+ WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
+ WIN32LDAPP="-Wl,--subsystem,console"
+ CONFIG_OBS="${CONFIG_OBS} gdbres.o"
+ fi
+ fi
+ fi
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
# If we find X, set shell vars x_includes and x_libraries to the
# paths, otherwise set no_x=yes.
@@ -6022,6 +6988,37 @@ else
files="${files} config/nm-empty.h"
links="${links} nm.h"
fi
+echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+echo "configure:7159: checking whether ln -s works" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+ rm -f conftestdata
+ ac_cv_prog_LN_S="ln -s"
+else
+ ac_cv_prog_LN_S=ln
+fi
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Make it possible to use the GUI without doing a full install
+if test "${enable_gdbtk}" = "yes" ; then
+ if test "$LN_S" = "ln -s" -a ! -f gdbtcl ; then
+ echo linking $srcdir/gdbtk/library to gdbtcl
+ $LN_S $srcdir/gdbtk/library gdbtcl
+ else
+ echo Warning: Unable to link $srcdir/gdbtk/library to gdbtcl. You will need to do a
+ echo " " make install before you are able to run the GUI.
+ fi
+fi
diff --git a/gdb/configure.in b/gdb/configure.in
index e85f6367a84..8c5ba2fbe95 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -500,6 +500,10 @@ if test x$gdb_cv_os_cygwin = xyes; then
fi
AC_SUBST(WIN32LIBS)
+LIBGUI="../libgui/src/libgui.a"
+GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
+AC_SUBST(LIBGUI)
+AC_SUBST(GUI_CFLAGS_X)
AC_ARG_WITH(cpu,
[ --with-cpu=CPU Set the default CPU variant to debug],
@@ -536,6 +540,153 @@ AC_DEFINE_UNQUOTED(TARGET_CPU_DEFAULT, "${with_cpu}")
],)
+ENABLE_GDBTK=
+
+AC_ARG_ENABLE(gdbtk,
+[ --enable-gdbtk Enable GDBTK GUI front end],
+[case "${enableval}" in
+ yes)
+ case "$host" in
+ *go32*)
+ AC_MSG_WARN([GDB does not support GDBtk on host ${host}. GDBtk will be disabled.])
+ enable_gdbtk=no ;;
+ *windows*)
+ AC_MSG_WARN([GDB does not support GDBtk on host ${host}. GDBtk will be disabled.])
+ enable_gdbtk=no ;;
+ *)
+ enable_gdbtk=yes ;;
+ esac ;;
+ no)
+ enable_gdbtk=no ;;
+ *)
+ AC_MSG_ERROR(bad value ${enableval} given for gdbtk option) ;;
+esac],
+[
+# Default is on for everything but go32 and Cygwin
+case "$host" in
+ *go32* | *windows*)
+ ;;
+ *)
+ enable_gdbtk=yes ;;
+ esac
+])
+
+WIN32LDAPP=
+AC_SUBST(WIN32LIBS)
+AC_SUBST(WIN32LDAPP)
+
+configdir="unix"
+
+GDBTKLIBS=
+if test "${enable_gdbtk}" = "yes"; then
+
+ CY_AC_PATH_TCLCONFIG
+ if test -z "${no_tcl}"; then
+ CY_AC_LOAD_TCLCONFIG
+ CY_AC_PATH_TKCONFIG
+
+ # If $no_tk is nonempty, then we can't do Tk, and there is no
+ # point to doing Tcl.
+ if test -z "${no_tk}"; then
+ CY_AC_LOAD_TKCONFIG
+ CY_AC_PATH_TCLH
+ CY_AC_PATH_TKH
+ CY_AC_PATH_ITCLH
+ CY_AC_PATH_ITKH
+ CY_AC_PATH_TIXH
+
+ # now look for Itcl library stuff
+
+ CY_AC_PATH_ITCLCONFIG
+ if test -z "${no_itcl}"; then
+ CY_AC_LOAD_ITCLCONFIG
+ case "${host}" in
+ *-*-cygwin*)
+ itcldir=../itcl/itcl/win/
+ ;;
+ *)
+ itcldir=../itcl/itcl/unix/
+ ;;
+ esac
+
+
+ ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
+ ITCL_DEPS="${itcldir}${ITCL_LIB_FILE}"
+ fi
+
+
+ # now look for Itk library stuff
+ CY_AC_PATH_ITKCONFIG
+ if test -z "${no_itcl}"; then
+ CY_AC_LOAD_ITKCONFIG
+
+ case "${host}" in
+ *-*-cygwin*)
+ itkdir=../itcl/itk/win/
+ ;;
+ *)
+ itkdir=../itcl/itk/unix/
+ ;;
+ esac
+
+ ITKLIB="${ITK_BUILD_LIB_SPEC}"
+ ITK_DEPS="${itkdir}${ITK_LIB_FILE}"
+ fi
+
+ # now look for Tix library stuff
+ CY_AC_PATH_TIXCONFIG
+ if test -z "${no_tix}"; then
+ CY_AC_LOAD_TIXCONFIG
+ TIXLIB="${TIX_BUILD_LIB_SPEC}"
+ TIX_DEPS="${TIX_BUILD_LOCATION}/${TIX_LIB_FILE}"
+ fi
+
+ ENABLE_GDBTK=1
+ ENABLE_CFLAGS="$ENABLE_CFLAGS -DGDBTK"
+ # Tcl/Tk 8.1 require -fwritable strings. I don't
+ # know whether 8.2 will or not, but I bet it will.
+ # I don't have to worry about 7.x since we don't support it.
+ GDBTK_CFLAGS=""
+ if test "$GCC" = "yes"; then
+ if test "$TCL_VERSION" != "8.0" ; then
+ GDBTK_CFLAGS="-fwritable-strings"
+ fi
+ fi
+
+ # Include some libraries that Tcl and Tk want.
+ TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
+ CONFIG_DEPS='$(LIBGUI) $(ITCL_DEPS) $(ITK_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)'
+ # Yes, the ordering seems wrong here. But it isn't.
+ # TK_LIBS is the list of libraries that need to be linked
+ # after Tcl/Tk. Note that this isn't put into LIBS. If it
+ # were in LIBS then any link tests after this point would
+ # try to include things like `$(LIBGUI)', which wouldn't work.
+ GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
+ CONFIG_SRCS="${CONFIG_SRCS} gdbtk/generic/gdbtk.c gdbtk/generic/gdbtk-cmds.c gdbtk/generic/gdbtk-hooks.c gdbtk/generic/gdbtk-variable.c gdbtk/generic/gdbtk-wrapper.c"
+ CONFIG_OBS="${CONFIG_OBS} gdbtk.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-variable.o gdbtk-wrapper.o"
+ CONFIG_INITS="${CONFIG_INITS} gdbtk/generic/gdbtk.c gdbtk/generic/gdbtk-cmds.c gdbtk/generic/gdbtk-hooks.c gdbtk/generic/gdbtk-variable.c gdbtk/generic/gdbtk-wrapper.c"
+
+ if test x$gdb_cv_os_cygwin = xyes; then
+ WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
+ WIN32LDAPP="-Wl,--subsystem,console"
+ CONFIG_OBS="${CONFIG_OBS} gdbres.o"
+ fi
+ fi
+ fi
+fi
+
+AC_SUBST(ENABLE_GDBTK)
+AC_SUBST(X_CFLAGS)
+AC_SUBST(X_LDFLAGS)
+AC_SUBST(X_LIBS)
+AC_SUBST(ITCLLIB)
+AC_SUBST(ITCL_DEPS)
+AC_SUBST(ITKLIB)
+AC_SUBST(ITK_DEPS)
+AC_SUBST(TIXLIB)
+AC_SUBST(TIX_DEPS)
+AC_SUBST(GDBTKLIBS)
+AC_SUBST(GDBTK_CFLAGS)
AC_PATH_X
@@ -721,6 +872,17 @@ else
files="${files} config/nm-empty.h"
links="${links} nm.h"
fi
+AC_PROG_LN_S
+# Make it possible to use the GUI without doing a full install
+if test "${enable_gdbtk}" = "yes" ; then
+ if test "$LN_S" = "ln -s" -a ! -f gdbtcl ; then
+ echo linking $srcdir/gdbtk/library to gdbtcl
+ $LN_S $srcdir/gdbtk/library gdbtcl
+ else
+ echo Warning: Unable to link $srcdir/gdbtk/library to gdbtcl. You will need to do a
+ echo " " make install before you are able to run the GUI.
+ fi
+fi
AC_LINK_FILES($files, $links)
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index d6aedaa57f1..e2422d58255 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -646,6 +646,10 @@ Tue Jan 17 14:09:03 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
* remote.texi: Update documentation of set/show mipsfpu.
+Fri Jan 6 17:17:28 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * gdbgui.texinfo: New file, manual for GUI (gdbtk) users.
+ * Makefile.in (gdbgui.dvi, gdbgui.info): New actions.
Sun Sep 4 16:47:21 1994 Stan Shebs (shebs@andros.cygnus.com)
diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
index 9cbacbb29bb..1280ed7be0f 100644
--- a/gdb/doc/Makefile.in
+++ b/gdb/doc/Makefile.in
@@ -318,6 +318,19 @@ gdb.mm: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texinfo
gdb_toc.html: ${SFILES_DOC}
$(MAKEHTML) $(MAKEHTMLFLAGS) -I ${READLINE_DIR} -I $(srcdir) $(srcdir)/gdb.texinfo
+# GDB GUI MANUAL: TeX dvi file
+gdbgui.dvi : gdbgui.texinfo ${SFILES_DOC}
+ $(SET_TEXINPUTS) $(TEX) gdbgui.texinfo
+ $(TEXINDEX) gdbgui.??
+ $(SET_TEXINPUTS) $(TEX) gdbgui.texinfo
+ rm -f gdbgui.aux gdbgui.cp* gdbgui.fn* gdbgui.ky* \
+ gdbgui.log gdbgui.pg* gdbgui.toc gdbgui.tp* gdbgui.vr*
+
+# GDB GUI MANUAL: info file
+gdb-gui: gdbgui.info
+
+gdbgui.info: gdbgui.texinfo ${SFILES_DOC}
+ $(MAKEINFO) -o gdbgui.info $(srcdir)/gdbgui.texinfo
# GDB INTERNALS MANUAL: TeX dvi file
gdbint.dvi : gdbint.texinfo
diff --git a/gdb/main.c b/gdb/main.c
index 6c9baa34c21..eb058bb1a27 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -255,6 +255,11 @@ captured_main (void *data)
{"command", required_argument, 0, 'x'},
{"version", no_argument, &print_version, 1},
{"x", required_argument, 0, 'x'},
+#ifdef GDBTK
+ {"tclcommand", required_argument, 0, 'z'},
+ {"enable-external-editor", no_argument, 0, 'y'},
+ {"editor-command", required_argument, 0, 'w'},
+#endif
{"ui", required_argument, 0, 'i'},
{"interpreter", required_argument, 0, 'i'},
{"i", required_argument, 0, 'i'},
@@ -334,6 +339,40 @@ captured_main (void *data)
cmdsize * sizeof (*cmdarg));
}
break;
+#ifdef GDBTK
+ case 'z':
+ {
+ extern int gdbtk_test PARAMS ((char *));
+ if (!gdbtk_test (optarg))
+ {
+ fprintf_unfiltered (gdb_stderr, "%s: unable to load tclcommand file \"%s\"",
+ argv[0], optarg);
+ exit (1);
+ }
+ break;
+ }
+ case 'y':
+ {
+ /*
+ * This enables the edit/button in the main window, even
+ * when IDE_ENABLED is set to false. In this case you must
+ * use --tclcommand to specify a tcl/script to be called,
+ * Tcl/Variable to store the edit/command is:
+ * external_editor
+ */
+ enable_external_editor = 1;
+ break;
+ }
+ case 'w':
+ {
+ /*
+ * if editor command is enabled, both flags are set
+ */
+ enable_external_editor = 1;
+ external_editor_command = xstrdup (optarg);
+ break;
+ }
+#endif /* GDBTK */
case 'd':
dirarg[ndir++] = optarg;
if (ndir >= dirsize)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index cfc2c906886..a48ff61c539 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -991,6 +991,80 @@ Fri Mar 12 18:06:21 1999 Stan Shebs <shebs@andros.cygnus.com>
commands. They're not germane to this test, and they don't work
that way on remote targets.
+1999-03-03 James Ingham <jingham@cygnus.com>
+
+ * browser.test: Fixed up to match the new function browser.
+ This is not done yet...
+
+ * srcwin.test: Check for errors when the bbox is called for a text
+ item that is not on screen (so bbox is ""). Return something more
+ useful.
+
+1999-03-01 James Ingham <jingham@cygnus.com>
+
+ * Changelog entries merged over from gdb development branch.
+
+ 1999-01-12 Martin Hunt <hunt@cygnus.com>
+
+ * gdb.gdbtk/srcwin.test: Add a bunch of tests for the source
+ window filename and function comboboxes. Add in stack tests.
+
+ 1999-01-11 Martin Hunt <hunt@cygnus.com>
+
+ * gdb.gdbtk/srcwin.test: New file. Source Window tests.
+ * gdb.gdbtk/srcwin.exp: New file. Source Window tests.
+
+ Wed Jan 6 09:22:52 1999 Keith Seitz <keiths@cygnus.com>
+
+ * gdb.gdbtk/c_variable.test (c_variable-1.9): Add new
+ test to check for creation of a variable that is really a type.
+ (c_variable-7.81): Use "output" instead of "print" to get PC.
+ Include missing bits of test.
+
+ * gdb.gdbtk/cpp_variable.test (cpp_variable-1.6): Default format
+ is now "natural", not "hexadecimal"
+ (cpp_variable-2.22): Ditto.
+ (cpp_variable-2.24): Force format to hex before getting value.
+
+ * gdb.gdbtk/cpp_variable.exp: Supply missing arg to gdbtk_analyze_results.
+
+ Tue Jan 5 12:40:52 1999 Keith Seitz <keiths@cygnus.com>
+
+ * gdb.gdbtk/c_variable.c, c_variable.test, c_variable.exp: New C
+ language tests for variable object interface.
+
+ * gdb.gdbtk/cpp_variable.h, cpp_variable.cc, cpp_variable.test,
+ cpp_variable.exp: New C++ language tests for variable object
+ interface.
+
+ * gdb.gdbtk/Makefile.in (EXECUTABLES): Add c_variable and cpp_variable.
+
+ Tue Jan 5 12:33:47 1999 Keith Seitz <keiths@cygnus.com>
+
+ * lib/gdb.exp (gdbtk_analyze_results): Generic function
+ for outputting results of test run.
+
+ * gdb.gdbtk/defs (gdbtk_test): Handle xpass and xfail.
+ (gdbtk_test_error): New proc which handles error aborts.
+
+ * gdb.gdbtk/console.exp: Use gdbtk_analyze_results.
+ Check if we have a valid DISPLAY before running.
+ * gdb.gdbtk/browser.exp: Ditto.
+
+ 1998-12-07 Martin M. Hunt <hunt@cygnus.com>
+
+ * lib/gdb.exp (gdbtk_start): Fix path for itcl library.
+ * gdb.gdbtk/browser.test: Change "manage open" to ManagedWin::open.
+ * gdb.gdbtk/console.test: Same.
+ * gdb.gdbtk/*: Update from devo.
+
+ Fri Jul 24 14:57:19 1998 Keith Seitz <keiths@cygnus.com>
+
+ * gdb.gdbtk/Makefile.in: Add new example program "stack".
+ * gdb.gdbtk/browser.test,browser.exp: Add browser window
+ tests.
+ * gdb.gdbtk/stack1.c,stack2.c: Test case for browser window.
+
1999-02-25 Felix Lee <flee@cygnus.com>
* lib/gdb.exp (debug_format): initialize
@@ -1519,6 +1593,23 @@ Thurs Jul 9 11:08:31 1998 Dawn Perchik <dawn@cygnus.com>
* gdb.base/commands.exp: Break up infrun_breakpoint_command_test
into two parts to get around a synchronization problem in expect.
+Sun Jun 28 22:34:34 1998 Martin M. Hunt <hunt@cygnus.com>
+
+ * gdb.gdbtk/simple.c (main): Make main return an
+ int so compiler will stop complaining.
+
+Fri Jun 26 14:27:13 1998 Keith Seitz <keiths@cygnus.com>
+
+ * lib/gdb.exp (gdbtk_start): Add startup for gdbtk.
+
+ * configure.in: Add options for gdbtk testsuite.
+
+ * configure: Regenerate.
+
+ * gdb.gdbtk: New directory to hold gdbtk tests.
+
+ * gdb.gdbtk/console.{exp, test}: New console window tests.
+
Fri Jun 26 14:52:47 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
diff --git a/gdb/testsuite/configure b/gdb/testsuite/configure
index 19ddd895ac2..a64d42ee0e8 100755
--- a/gdb/testsuite/configure
+++ b/gdb/testsuite/configure
@@ -709,6 +709,42 @@ if test "${shared}" = "true"; then
fi
# End stuff to support --enable-shared
+# Start stuff to support --enable-gdbtk
+# Check whether --enable-gdbtk or --disable-gdbtk was given.
+if test "${enable_gdbtk+set}" = set; then
+ enableval="$enable_gdbtk"
+ case "${enableval}" in
+ yes)
+ case "$host" in
+ *go32*)
+ enable_gdbtk=no ;;
+ *windows*)
+ enable_gdbtk=no ;;
+ *)
+ enable_gdbtk=yes ;;
+ esac ;;
+ no)
+ enable_gdbtk=no ;;
+ *)
+ { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
+esac
+else
+
+# Default is on for everything but go32 and windows
+case "$host" in
+ *go32* | *windows*)
+ ;;
+ *)
+ enable_gdbtk=yes ;;
+ esac
+
+fi
+
+
+if test "${enable_gdbtk}" = "yes"; then
+ configdirs="${configdirs} gdb.gdbtk"
+fi
+# End stuff to support --enable-shared
# configure the subdirectories too
subdirs="$configdirs"
diff --git a/gdb/testsuite/configure.in b/gdb/testsuite/configure.in
index 96e9de727ca..b69c05120dd 100644
--- a/gdb/testsuite/configure.in
+++ b/gdb/testsuite/configure.in
@@ -71,6 +71,38 @@ if test "${shared}" = "true"; then
fi
AC_SUBST(RPATH_ENVVAR)
# End stuff to support --enable-shared
+# Start stuff to support --enable-gdbtk
+AC_ARG_ENABLE(gdbtk,
+[ --enable-gdbtk ],
+[case "${enableval}" in
+ yes)
+ case "$host" in
+ *go32*)
+ enable_gdbtk=no ;;
+ *windows*)
+ enable_gdbtk=no ;;
+ *)
+ enable_gdbtk=yes ;;
+ esac ;;
+ no)
+ enable_gdbtk=no ;;
+ *)
+ AC_MSG_ERROR(bad value ${enableval} given for gdbtk option) ;;
+esac],
+[
+# Default is on for everything but go32 and windows
+case "$host" in
+ *go32* | *windows*)
+ ;;
+ *)
+ enable_gdbtk=yes ;;
+ esac
+])
+
+if test "${enable_gdbtk}" = "yes"; then
+ configdirs="${configdirs} gdb.gdbtk"
+fi
+# End stuff to support --enable-shared
# configure the subdirectories too
AC_CONFIG_SUBDIRS($configdirs)
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 2ef42bf3db9..94cd40a0917 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -1584,3 +1584,104 @@ proc rerun_to_main {} {
}
}
+# From dejagnu:
+# srcdir = testsuite src dir (e.g., devo/gdb/testsuite)
+# objdir = testsuite obj dir (e.g., gdb/testsuite)
+# subdir = subdir of testsuite (e.g., gdb.gdbtk)
+#
+# To gdbtk:
+# env(DEFS)=the "defs" files (e.g., devo/gdb/testsuite/gdb.gdbtk/defs)
+# env(SRCDIR)=directory containing the test code (e.g., *.test)
+# env(OBJDIR)=directory which contains any executables
+# (e.g., gdb/testsuite/gdb.gdbtk)
+proc gdbtk_start {test} {
+ global verbose
+ global GDB
+ global GDBFLAGS
+ global env srcdir subdir objdir
+
+ gdb_stop_suppressing_tests;
+
+ verbose "Starting $GDB -nx -q --tclcommand=$test"
+
+ set real_test [which $test]
+ if {$real_test == 0} {
+ perror "$test is not found"
+ exit 1
+ }
+
+ if {![is_remote host]} {
+ if { [which $GDB] == 0 } {
+ perror "$GDB does not exist."
+ exit 1
+ }
+ }
+
+ set wd [pwd]
+ cd [file join $srcdir .. gdbtcl2]
+ set env(GDBTK_LIBRARY) [pwd]
+ cd [file join $srcdir .. .. tcl library]
+ set env(TCL_LIBRARY) [pwd]
+ cd [file join $srcdir .. .. tk library]
+ set env(TK_LIBRARY) [pwd]
+ cd [file join $srcdir .. .. tix library]
+ set env(TIX_LIBRARY) [pwd]
+ cd [file join $srcdir .. .. itcl itcl library]
+ set env(ITCL_LIBRARY) [pwd]
+ cd [file join .. $srcdir .. .. libgui library]
+ set env(CYGNUS_GUI_LIBRARY) [pwd]
+ cd $wd
+ cd [file join $srcdir $subdir]
+ set env(DEFS) [file join [pwd] defs]
+ cd $wd
+ cd [file join $objdir $subdir]
+ set env(OBJDIR) [pwd]
+ cd $wd
+ cd $srcdir
+ set env(SRCDIR) [pwd]
+ cd $wd
+ set env(GDBTK_VERBOSE) 1
+ set env(GDBTK_LOGFILE) [file join $objdir gdb.log]
+ set env(GDBTK_TEST_RUNNING) 1
+ set err [catch {exec $GDB -nx -q --tclcommand=$test} res]
+ if { $err } {
+ perror "Execing $GDB failed: $res"
+ exit 1;
+ }
+ return $res
+}
+
+# gdbtk tests call this function to print out the results of the
+# tests. The argument is a proper list of lists of the form:
+# {status name description msg}. All of these things typically
+# come from the testsuite harness.
+proc gdbtk_analyze_results {results} {
+ foreach test $results {
+ set status [lindex $test 0]
+ set name [lindex $test 1]
+ set description [lindex $test 2]
+ set msg [lindex $test 3]
+
+ switch $status {
+ PASS {
+ pass "$description ($name)"
+ }
+
+ FAIL {
+ fail "$description ($name)"
+ }
+
+ ERROR {
+ perror "$name"
+ }
+
+ XFAIL {
+ xfail "$description ($name)"
+ }
+
+ XPASS {
+ xpass "$description ($name)"
+ }
+ }
+ }
+}
diff --git a/gdb/v850ice.c b/gdb/v850ice.c
index 4e187c0bea2..dba9514db6d 100644
--- a/gdb/v850ice.c
+++ b/gdb/v850ice.c
@@ -31,6 +31,7 @@
#include "value.h"
#include "command.h"
+#include <tcl.h>
#include <windows.h>
#include <winuser.h> /* for WM_USER */
@@ -119,6 +120,8 @@ static int ice_nexti PARAMS ((char *));
static void togdb_force_update PARAMS ((void));
+static void view_source PARAMS ((CORE_ADDR));
+
static void do_gdb (char *, char *, void (*func) PARAMS ((char *, int)), int);
@@ -131,6 +134,7 @@ long (__stdcall * RegisterClient) PARAMS ((HWND));
long (__stdcall * UnregisterClient) PARAMS ((void));
+extern Tcl_Interp *gdbtk_interp;
/* Globals local to this file only */
static int ice_open = 0; /* Is ICE open? */
@@ -256,6 +260,7 @@ v850ice_wndproc (hwnd, message, wParam, lParam)
MessageBox (0, "Address resolution\nNot implemented", "GDB", MB_OK);
break;
case WM_SOURCE:
+ view_source ((CORE_ADDR) lParam);
break;
case WM_STATE_CHANGE:
switch (wParam)
@@ -837,7 +842,12 @@ ice_cont (c)
printf_filtered ("continue (ice)\n");
ReplyMessage ((LRESULT) 1);
+ if (gdbtk_interp == NULL)
+ {
continue_command (NULL, 1);
+ }
+ else
+ Tcl_Eval (gdbtk_interp, "gdb_immediate continue");
return 1;
}
@@ -855,7 +865,12 @@ do_gdb (cmd, str, func, count)
{
printf_unfiltered (str);
+ if (gdbtk_interp == NULL)
+ {
func (NULL, 0);
+ }
+ else
+ Tcl_Eval (gdbtk_interp, cmd);
}
}
@@ -896,8 +911,22 @@ v850ice_command (arg, from_tty)
static void
togdb_force_update (void)
{
+ if (gdbtk_interp != NULL)
+ Tcl_Eval (gdbtk_interp, "gdbtk_update");
}
+static void
+view_source (addr)
+ CORE_ADDR addr;
+{
+ char c[256];
+
+ if (gdbtk_interp != NULL)
+ {
+ sprintf (c, "catch {set src [lindex [ManagedWin::find SrcWin] 0]\n$src location BROWSE [gdb_loc *0x%x]}", addr);
+ Tcl_Eval (gdbtk_interp, c);
+ }
+}
/* Define the target subroutine names */