diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/ChangeLog-99 | 7 | ||||
-rw-r--r-- | gdb/MAINTAINERS | 2 | ||||
-rw-r--r-- | gdb/Makefile.in | 111 | ||||
-rwxr-xr-x | gdb/configure | 997 | ||||
-rw-r--r-- | gdb/configure.in | 162 | ||||
-rw-r--r-- | gdb/doc/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/doc/Makefile.in | 13 | ||||
-rw-r--r-- | gdb/doc/gdbgui.texinfo | 411 | ||||
-rw-r--r-- | gdb/main.c | 39 | ||||
-rw-r--r-- | gdb/testsuite/ChangeLog | 91 | ||||
-rwxr-xr-x | gdb/testsuite/configure | 36 | ||||
-rw-r--r-- | gdb/testsuite/configure.in | 32 | ||||
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 101 | ||||
-rw-r--r-- | gdb/v850ice.c | 29 |
15 files changed, 2040 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c2c53f2..4d68fd71 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 2fc778b..b82a88d 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 ef02b90..7da82dd 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 775067c..034cafa 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 441911a..a53879c 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 e85f636..8c5ba2f 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 d6aedaa..e2422d5 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 9cbacbb..1280ed7 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/doc/gdbgui.texinfo b/gdb/doc/gdbgui.texinfo new file mode 100644 index 0000000..6618f73 --- /dev/null +++ b/gdb/doc/gdbgui.texinfo @@ -0,0 +1,411 @@ +\input texinfo @c -*-texinfo-*- +@c Copyright 1988 1989 1990 1991 1992 1993 1994 Free Software Foundation, Inc. +@c +@c %**start of header +@c makeinfo ignores cmds prev to setfilename, so its arg cannot make use +@c of @set vars. However, you can override filename with makeinfo -o. +@setfilename gdb.info +@c +@include gdb-cfg.texi +@c +@ifset GENERIC +@settitle Using the Graphical Interface to @value{GDBN} +@end ifset +@ifclear GENERIC +@settitle Using the Graphical Interface to @value{GDBN} (@value{TARGET}) +@end ifclear +@setchapternewpage odd +@c %**end of header + +@c Since this interface is so new, there is much missing still. +@c Desired but unimplemented features are commented out. + +@iftex +@c @smallbook +@c @cropmarks +@end iftex + +@finalout +@syncodeindex ky cp + +@c readline appendices use @vindex +@syncodeindex vr cp + +@c !!set GDB manual's edition---not the same as GDB version! +@set EDITION 4.13 + +@c !!set GDB manual's revision date +@set DATE January 1995 + +@c THIS MANUAL REQUIRES TEXINFO-2 macros and info-makers to format properly. + +@ifinfo +@c This is a dir.info fragment to support semi-automated addition of +@c manuals to an info tree. zoo@cygnus.com is developing this facility. +@format +START-INFO-DIR-ENTRY +* Gdb: (gdb). The GNU debugger. +END-INFO-DIR-ENTRY +@end format +@end ifinfo +@c +@c +@ifinfo +This file documents the graphical interface to the GNU debugger @value{GDBN}. + + +This is Edition @value{EDITION}, @value{DATE}, +of @cite{Using the Graphical Interface to @value{GDBN}} +for GDB Version @value{GDBVN}. + +Copyright (C) 1994, 1995 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +@ignore +Permission is granted to process this file through TeX and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual). + +@end ignore +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided also that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this manual +into another language, under the above conditions for modified versions. +@end ifinfo + +@titlepage +@title Using the Graphical Interface to @value{GDBN} +@subtitle The GNU Source-Level Debugger +@ifclear GENERIC +@subtitle (@value{TARGET}) +@end ifclear +@sp 1 +@subtitle Edition @value{EDITION}, for @value{GDBN} version @value{GDBVN} +@subtitle @value{DATE} +@author Stanley T. Shebs +@page +@tex +{\parskip=0pt +\hfill (Send bugs and comments on @value{GDBN} to bug-gdb\@prep.ai.mit.edu.)\par +\hfill {\it Debugging with @value{GDBN}}\par +\hfill \TeX{}info \texinfoversion\par +\hfill doc\@cygnus.com\par +} +@end tex + +@vskip 0pt plus 1filll +Copyright @copyright{} 1994, 1995 Free Software Foundation, Inc. +@sp 2 + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided also that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this manual +into another language, under the above conditions for modified versions. +@end titlepage +@page + +@ifinfo +@node Top +@top Using the Graphical Interface to @value{GDBN} +@end ifinfo + +This file describes a graphical interface to @value{GDBN}, +the GNU symbolic debugger. + +@node Invocation +@chapter Starting up GUI @value{GDBN} + +If @value{GDBN} has been configured to use the graphical interface, +then you will get the interface automatically upon startup. + +When running as a Unix program and using the X11-based interface, +you must of course be using an X server and/or workstation, +and your @code{DISPLAY} environment variable must be set correctly. +If either of these is not true, then @value{GDBN} will still start up, +but will use only the traditional command interface. + +The exact layout and appearance of the windows will depend on the host +system type. For instance, GDB under Windows will display its windows +inside a larger window, while under Unix/X, each window is a separate +toplevel window. However, general behavior and layout is consistent +across all platforms; omissions or restrictions on particular platforms, +if not documented as unavoidable, should be considered bugs and +reported. + +All GDB windows have a common structure. Each window has an associated +menu bar, which may be at the top of the window or perhaps elsewhere. +Some of the menus and menu items in the menu bar are common to all GDB +windows, while others are specific to particular types of windows. +Below the menu bar is the working data area of the window. If the data +is too large to display all at once, the data area will have scroll bars +on its right and bottom sides. Below the data area are two optional +features; a status/data line, and a button box. + +@section Menus + +@subsection File Menu + +The standard file menu provides operations that affect the overall state +of GDB, mainly file operations, but other things as well. + +About GDB... + +Displays the startup window for GDB. + +File... + +Lets you set the combined executable and symbol file that GDB will use. +(Like "file".) + +Target... + +Brings up a dialog that you can use to connect GDB to a target program. +The dialog is described in more depth later. +(Like "target".) + +Edit... + +Starts up an editor to modify the source file being displayed. + +Exec File... + +Lets you set the executable file that GDB will use. +(Like "exec-file".) + +Symbol File... + +Lets you set the symbol file that GDB will use. +(Like "symbol-file".) + +Add Symbol File... + +Lets you add additional symbol files. +(Like "add-symbol-file".) + +Core File... + +Lets you set the core file that GDB will use. +(Like "core-file".) + +Shared Libraries... + +(Like "sharedlibrary".) + +Quit + +quits GDB. +(Like @samp{quit}.) + + +@c @subsection Commands Menu + +@c The commands menu consists of items that let you run and control the program being +@c debugged. +@c +@c Run +@c +@c Step +@c +@c Next +@c +@c Finish +@c +@c Stepi +@c +@c Nexti + +@subsection Windows Menu + +The windows menu allows access to all the windows available in GDB. +The first part of the menu lists all of the predefined individual windows. +If the window exists already, its item will be marked as such; +selecting the item will cause the window to be put in front if it is +obscured. If it does not exist, then it will be created. + +The second part of the menu lists additional windows that you may have +created, such as source windows or variable displays. + +Command +--- +Source +Assembly +--- +Registers +Variables +--- +Files +@c --- +@c <extra windows> + +@subsection View Menu + +All windows have a view menu, but its contents are highly specific to +window type. For instance, a source window will have a view menu item +to control the display of line numbers, but a register window will instead +have an option to choose the radix in which to display register contents. +You can find the full description of view options with each window type. + +@subsection Help Menu + +The help menu includes access to GDB's online help. + +@section Windows + +@subsection Command Window + +The command window provides access to the standard GDB command +interpreter. In nearly all cases, commands typed into this window +will behave exactly as for a non-windowing GDB. + +Note that not all changes to GDB will be reflected in this window. For instance, +if you were to type a "step" command, then click on the "step" menu item in +the source window, then go back, and type another "step" command, the command +buffer will only show two steps, when you have actually done three. GDB will +put a "..." into the command buffer when operations in other windows are done, +as a reminder that the command buffer is incomplete. + +@c Also note that as a side effect of having the interface and possibly an +@c associated scripting language built in, additional commands may be +@c available. For instance, if tcl is in GDB, the command ``tcl <tcl code>'' +@c will be available. + +The command window has no status line or button box. + +@subsection Files Window + +The files window lists all of the files that were used to build the +executable. + +Clicking on the xxx in the left margin expands/contracts the display of +included files and symbols defined by the file. + +The View menu for this window includes the following items: +Name/Full Pathname +@c Sort by Name +@c Sort by Section&Offset +@c Show All Included Files +@c Included File Indentation... + +@subsection Source Window + +A source window displays a single file of source code. + +The left margin includes an indicator for the current PC, breakpoints and potential breakpoints, +and (optionally) line numbers. + +The View menu for this window includes the following items: +Show Line Numbers +Show Breakdots +@c Jump to PC (if pc changes, scroll back so PC is centered) +@c Tab... (set tabbing) + +@section Extensions + +[description of gdbtk details] + +@c +@c GDBTK Interface Design +@c +@c This is the working document describing the design of the GDBTK +@c interface. Note that overall layout applies only to the default setup; +@c it is expected that debugger users will be able to customize extensively. +@c +@c Default Startup +@c +@c One source window, shows source as in "list main", does *not* set a +@c break at main or run or anything. No current PC indicator, only put +@c in when something runs. +@c +@c Source Window +@c +@c For native, "run" button is always the same, for cross, it's actually +@c a "target" button that pops up appropriate dialog to get connected. +@c Once remote target is active, change button to "run". +@c +@c Be able to toggle assembly interleaved between source. +@c +@c Command Window +@c +@c Is an *optional* window. +@c +@c Behavior mimics command-line GDB running in an Emacs buffer as much +@c as possible. +@c +@c Assembly Window +@c +@c Be able to toggle source interleaved between assembly. +@c +@c Target Info Window +@c +@c Contents similar to "info target". +@c +@c Should expand into process and thread info also. +@c +@c File Info Window +@c +@c Contents similar to "info files". +@c +@c Include data shown in "info sources" as well as "info files". +@c +@c Register Info Window +@c +@c Contents similar to "info registers". +@c +@c Add view option(s) for classes of registers. +@c +@c Stack Info Window +@c +@c Combines backtrace, frame, and local var displays. +@c +@c Signals Dialog +@c +@c Includes all signals whose handling may be controlled, plus +@c checkboxes for what to do with each. +@c +@c Settings Dialog(s) +@c +@c Include all variables that can be "set" and "show"n. +@c +@c General Principles +@c +@c All windows should have a menu that allows access to other windows. +@c Selection of item either brings up for first time or brings to front. +@c +@c All windows should have a "view" menu that controls formatting +@c options for that window. +@c +@c Windows should usually be scrollable. Windows that display largish +@c horizontal things should be horizontal and vertical scrollbars. +@c +@c To do standard modification, add commands or tcl code to .gdbtkinit. +@c +@c Be able to record window positions so they come up in the same way +@c the next time. Could scribble on .gdbtkinit perhaps, or else an +@c aux file that can be sourced by .gdbtkinit. + +@section How to Build + +If GDB is configured with --enable-gdbtk, then upon startup, it will +open windows. + +@node Index +@unnumbered Index + +@printindex cp + +@contents +@bye @@ -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 cfc2c90..a48ff61 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 19ddd89..a64d42e 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 96e9de7..b69c051 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 2ef42bf..94cd40a 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 4e187c0..dba9514 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 */ |