Updated for Tcl 7.5a2 and Tk 4.1a2

This commit is contained in:
Tom Tromey 1996-01-24 06:27:59 +00:00
parent 5a8d8b8db7
commit 4e327047ce
9 changed files with 1917 additions and 952 deletions

View File

@ -87,14 +87,6 @@ Wed Jan 17 13:22:27 1996 Stan Shebs <shebs@andros.cygnus.com>
* remote-nindy.c (nindy_ops): Ditto.
* remote-udi.c (udi_ops): Ditto.
Tue Jan 16 11:22:58 1996 Stu Grossman (grossman@cygnus.com)
* Makefile.in (CLIBS): Add LIBS to allow libraries to be
specified on the make command line (via make LIBS=xxx).
start-sanitize-gm
* configure.in (enable-gm): magic.o -> gmagic.o.
end-sanitize-gm
Tue Jan 16 18:00:35 1996 James G. Smith <jsmith@cygnus.co.uk>
* remote-mips.c (pmon_opn, pmon_wait, pmon_makeb64, pmon_zeroset,
@ -107,6 +99,26 @@ Tue Jan 16 18:00:35 1996 James G. Smith <jsmith@cygnus.co.uk>
(mips_enter_debug, mips_exit_debug): New functions.
(pmon_ops): New target definition structure.
Tue Jan 16 11:22:58 1996 Stu Grossman (grossman@cygnus.com)
* Makefile.in (CLIBS): Add LIBS to allow libraries to be
specified on the make command line (via make LIBS=xxx).
start-sanitize-gm
* configure.in (enable-gm): magic.o -> gmagic.o.
end-sanitize-gm
start-sanitize-gdbtk
Mon Jan 15 09:58:41 1996 Tom Tromey <tromey@creche.cygnus.com>
* gdbtk.tcl (create_expr_window): Many changes to update GUI.
(add_expr): Changes from create_expr_window.
(create_command_window): Set focus.
(delete_expr): Rewrote.
(expr_update_button): New proc.
(add_expr): Put bindings on FocusIn, FocusOut.
Don't allow .file_popup to be torn off.
end-sanitize-gdbtk
Fri Jan 12 21:41:58 1996 Jeffrey A Law (law@cygnus.com)
* symtab.c (find_pc_symtab): Don't lose if OBJF_REORDERED
@ -132,6 +144,30 @@ Fri Jan 12 13:11:42 1996 Stan Shebs <shebs@andros.cygnus.com>
* remote.c (remotetimeout): New GDB variable, use to set the
remote timeout for reading.
start-sanitize-gdbtk
Fri Jan 12 09:36:17 1996 Tom Tromey <tromey@creche.cygnus.com>
* gdbtk.tcl (gdbtk_tcl_query): Swap Yes and No buttons.
(update_listing): Use lassign. Use "see" to scroll. Don't need
screen_top, screen_bot, screen_height.
(update_assembly): Use "see" to scroll.
(textscrollproc): Removed.
(create_file_win): Don't use textscrollproc.
(asmscrollproc): Removed.
(create_asm_window): Don't use asmscrollproc.
(create_asm_win): Ditto.
(screen_height, screen_top, screen_bot): Removed.
(run_editor): New proc.
(build_framework): Use it.
(create_file_win, create_source_window): Don't use textscrollproc.
(create_breakpoints_window): Set -xscrollcommand on canvas.
(not_implemented_yet): Default button is 0.
(delete_char): Don't use tk_textBackspace.
(create_command_window): Allow Tk bindings to fire after deleting
character.
(create_command_window): Make Delete delete left, not right.
end-sanitize-gdbtk
Fri Jan 12 07:14:27 1996 Fred Fish <fnf@cirdan.cygnus.com>
* lynx-nat.c, irix4-nat.c, sparc-nat.c: Include gdbcore.h
@ -158,97 +194,21 @@ Thu Jan 11 17:21:25 1996 Per Bothner <bothner@kalessin.cygnus.com>
parameter type as the expected type when evaluating arg expressions.
* ch-lang.c (evaluate_subexp_chill): Likewise (for MULTI_SUBSCRIPT).
Wed Jan 10 11:25:37 1996 Fred Fish <fnf@cygnus.com>
start-sanitize-gdbtk
Thu Jan 11 10:08:14 1996 Tom Tromey <tromey@creche.cygnus.com>
* main.c (main): Disable window interface if --help or --version
specified.
* gdbtk.tcl (FSBox): Don't use tk_listboxSingleSelect.
Changes in sync with expect:
* configure.in (ENABLE_GDBTK): Use CY_AC_PATH_TCL and
CY_AC_PATH_TK.
* aclocal.m4: Replaced with version from expect.
* configure: Regenerated.
end-sanitize-gdbtk
* coredep.c: Renamed to core-aout.c
* core-svr4.c: Renamed to core-regset.c
* Makefile.in (ALLDEPFILES): Account for renamings.
* corelow.c (core_file_fns): Add, points to chain of structs.
(add_core_fns): New function to build chain of structs.
(get_core_registers): Modify to search core functions chain and call
appropriate fetch_core_registers function based on core file flavour.
* gdbcore.h (fetch_core_registers): Remove declaration.
(struct core_fns): Define struct for core function info.
* i386m3-nat.c: Update comment for filename change (coredep->core-aout)
* a68v-nat.c (fetch_core_registers): Remove stub, not needed now.
* alpha-nat.c (fetch_core_registers): Make static.
(alpha_core_fns, _initialize_core_alpha): New struct and func.
* core-aout.c (fetch_core_registers): Make static
(aout_core_fns, _initialize_core_aout): New struct and func.
* core-regset.c (fetch_core_registers): Make static.
(regset_core_fns, _initialize_core_regset): New struct and func.
* core-sol2.c (fetch_core_registers): Make static.
(solaris_core_fns, _initialize_core_solaris): New struct and func.
* hp300ux-nat.c (fetch_core_registers): Make static.
(hp300ux_core_fns, _initialize_core_hp300ux): New struct and func.
* i386aix-nat.c (fetch_core_registers): Make static.
(i386aix_core_fns, _initialize_core_i386aix): New struct and func.
* i386mach-nat.c (fetch_core_registers: Make static.
(i386mach_core_fns, _initialize_core_i386mach): New struct and func.
* irix4-nat.c (fetch_core_registers): Make static.
(irix4_core_fns, _initialize_core_irix4): New struct and func.
* irix5-nat.c (fetch_core_registers):
(irix5_core_fns, _initialize_core_irix5): New struct and func.
* lynx-nat.c (fetch_core_registers): Make static.
(lynx_core_fns, _initialize_core_lynx): New struct and func.
* mips-nat.c (fetch_core_registers): Make static.
(mips_core_fns, _initialize_core_mips): New struct and func.
* ns32km3-nat.c (fetch_core_registers): Remove stub.
* rs6000-nat.c (fetch_core_registers): Make static.
(rs6000_core_fns, _initialize_core_rs6000): New struct and func.
* sparc-nat.c (fetch_core_registers): Make static.
(sparc_core_fns, _initialize_core_sparc): New struct and func.
* sun3-nat.c (fetch_core_registers):
(sun3_core_fns, _initialize_core_sun3): New struct and func.
* sun386-nat.c (fetch_core_registers): Remove stub.
* ultra3-nat.c (fetch_core_registers): Make static.
(ultra3_core_fns, _initialize_core_ultra3): New struct and func.
* config/gould/pn.mh (XDEPFILES),
config/i386/fbsd.mh (NATDEPFILES),
config/i386/i386bsd.mh (NATDEPFILES),
config/i386/i386m3.mh (XDEPFILES),
config/i386/i386sco.mh (NATDEPFILES),
config/i386/i386sco4.mh (NATDEPFILES),
config/i386/i386v.mh (NATDEPFILES),
config/i386/i386v32.mh (NATDEPFILES),
config/i386/nbsd.mh (NATDEPFILES),
config/i386/ptx.mh (XDEPFILES),
config/i386/ptx4.mh (XDEPFILES),
config/i386/symmetry.mh (NATDEPFILES),
config/m68k/3b1.mh (XDEPFILES),
config/m68k/cisco.mt (TDEPFILES),
config/m68k/delta68.mh (NATDEPFILES),
config/m68k/dpx2.mh (NATDEPFILES),
config/m68k/hp300bsd.mh (NATDEPFILES),
config/m68k/hp300hpux.mh (NATDEPFILES),
config/m68k/isi.mh (XDEPFILES),
config/m68k/news.mh (NATDEPFILES),
config/m68k/news1000.mh (XDEPFILES),
config/m88k/cxux.mh (NATDEPFILES),
config/m88k/delta88.mh (NATDEPFILES),
config/mips/littlemips.mh (XDEPFILES),
config/mips/mipsm3.mh (XDEPFILES),
config/ns32k/merlin.mh (XDEPFILES),
config/ns32k/nbsd.mh (NATDEPFILES),
config/ns32k/ns32km3.mh (NATDEPFILES),
config/pa/hppabsd.mh (NATDEPFILES),
config/pa/hppahpux.mh (NATDEPFILES),
config/romp/rtbsd.mh (XDEPFILES),
config/tahoe/tahoe.mh (XDEPFILES),
config/vax/vaxbsd.mh (XDEPFILES),
config/vax/vaxult.mh (NATDEPFILES),
config/vax/vaxult2.mh (NATDEPFILES),
Account for coredep.o to core-aout.o name change.
* config/i386/i386dgux (NATDEPFILES),
config/i386/i386sol2.mh (NATDEPFILES),
config/i386/i386v4.mh (NATDEPFILES),
config/i386/linux.mh (NATDEPFILES),
config/i386/ncr3000.mh (NATDEPFILES),
config/m68k/m68kv4.mh (NATDEPFILES),
config/m88k/delta88v4.mh (NATDEPFILES),
config/mips/mipsv4.mh (NATDEPFILES),
Account for core-svr4.o to core-regset.o name change.
Wed Jan 10 16:08:49 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
* configure.in, configure: Recognize rs6000-*-aix4*.
@ -268,6 +228,47 @@ Wed Jan 10 11:25:37 1996 Fred Fish <fnf@cygnus.com>
* stabsread.c (define_symbol): If register value is too large,
tell what it is and what max is.
start-sanitize-gdbtk
Wed Jan 10 09:07:22 1996 Tom Tromey <tromey@creche.cygnus.com>
* gdbtk.tcl (gdbtk_tcl_fputs, gdbtk_tcl_fputs_error,
gdbtk_tcl_flush): Use "see", not "yview".
(gdbtk_tcl_query): Use questhead bitmap.
various: Always wrap condition of 'if' in {...}.
(add_breakpoint_frame): Set -value on radiobuttons.
(lassign): New proc.
(add_breakpoint_frame): Use lassign, not series of assignments.
(decr): Made faster.
(interactive_cmd): Use "see", not "yview".
(not_implemented_yet): Use warning bitmap.
(update_expr): Don't allow $expr to be evalled by Tcl.
(create_expr_window): Don't use "focus".
(delete_char, delete_line): Define globally.
(delete_line, delete_char, create_command_window, update_autocmd,
build_framework, create_asm_win, create_file_win): Use "see", not
"yview".
(create_copyright_window, center_window, bind_widget_after_class):
New procs.
(FSBox,create_command_window, create_autocmd_window): Binding
changes for Tk4.
(textscrollproc): Define globally.
(build_framework): tk_menuBar no longer needed. Keys Prior, Next,
Home, End, Up, and Down are all defined by Tk.
(apply_filespec): Use error bitmap in dialog.
(files_command): Don't use tk_listboxSingleSelect.
(files_command): Don't use "uniq" to remove duplicates from a
list.
(update_assembly): Use lassign.
(create_asm_win): Removed redundant bindings.
(listing_window_button_1, file_popup_menu): Use tk_popup.
(ButtonRelease-1 binding): Just remove tag from window; rest
handled by Tk.
* gdbtk.c (gdbtk_query): Use Tcl_Merge to provide quoting.
(call_wrapper): Use Tcl_Eval, not Tcl_VarEval.
(gdbtk_call_command): Ditto.
end-sanitize-gdbtk
Tue Jan 9 09:33:53 1996 Jeffrey A Law (law@cygnus.com)
* hpread.c (hpread_build_psymtabs): Finish Jan 4th

View File

@ -146,7 +146,6 @@ ENABLE_CLIBS= @ENABLE_CLIBS@
ENABLE_OBS= @ENABLE_OBS@
# All the includes used for CFLAGS and for lint.
# -I. for config files.
# -I$(srcdir) for gdb internal headers and possibly for gnu-regex.h also.
# -I$(srcdir)/config for more generic config files.
@ -361,7 +360,6 @@ SFILES = blockframe.c breakpoint.c buildsym.c callback.c c-exp.y c-lang.c \
typeprint.c utils.c valarith.c valops.c \
valprint.c values.c serial.c ser-unix.c mdebugread.c os9kread.c
# All source files that lint should look at
LINTFILES = $(SFILES) $(YYFILES) init.c
# "system" headers. Using these in dependencies is a rather personal

View File

@ -23,8 +23,7 @@ Building and installing
Building GDBtk is very straightforward. The main difference is that you will
need to use the `--enable-gdbtk' option when you run configure in the top level
directory. You will also need to install Tcl version 7.3 (or 7.4), and Tk 3.6.
[We haven't ported to Tk 4.0 yet.]
directory. You will also need to install Tcl version 7.5a2, and Tk 4.1a2.
You will also need to have X11 (R4/R5/R6) installed (this is a prerequisite to
installing Tk).
@ -307,6 +306,7 @@ generic problems
window. I.E. "argc" works, as does "*(argv+argc)" but not "argv[argc]".
Solution: None
[ I believe this problem is fixed, but I have not tested it ]
o The Breakpoint window does not get automatically updated and changes
made in the window are not reflected back in the results from "info br".

706
gdb/aclocal.m4 vendored
View File

@ -1,147 +1,605 @@
AC_DEFUN(CYGNUS_PATH_TK, [
dnl This file is duplicated in four places:
dnl * gdb/aclocal.m4
dnl * gdb/testsuite/aclocal.m4
dnl * expect/aclocal.m4
dnl * dejagnu/aclocal.m4
dnl Consider modifying all copies in parallel.
dnl written by Rob Savoye <rob@cygnus.com> for Cygnus Support
dnl CYGNUS LOCAL: This gets the right posix flag for gcc
AC_DEFUN(CY_AC_TCL_LYNX_POSIX,
[AC_REQUIRE([AC_PROG_CC])AC_REQUIRE([AC_PROG_CPP])
AC_MSG_CHECKING([to see if this is LynxOS])
AC_CACHE_VAL(ac_cv_os_lynx,
[AC_EGREP_CPP(yes,
[/*
* The old Lynx "cc" only defines "Lynx", but the newer one uses "__Lynx__"
*/
#if defined(__Lynx__) || defined(Lynx)
yes
#endif
], ac_cv_os_lynx=yes, ac_cv_os_lynx=no)])
#
if test "$ac_cv_os_lynx" = "yes" ; then
AC_MSG_RESULT(yes)
AC_DEFINE(LYNX)
AC_MSG_CHECKING([whether -mposix or -X is available])
AC_CACHE_VAL(ac_cv_c_posix_flag,
[AC_TRY_COMPILE(,[
/*
* This flag varies depending on how old the compiler is.
* -X is for the old "cc" and "gcc" (based on 1.42).
* -mposix is for the new gcc (at least 2.5.8).
*/
#if defined(__GNUC__) && __GNUC__ >= 2
choke me
#endif
], ac_cv_c_posix_flag=" -mposix", ac_cv_c_posix_flag=" -X")])
CC="$CC $ac_cv_c_posix_flag"
AC_MSG_RESULT($ac_cv_c_posix_flag)
else
AC_MSG_RESULT(no)
fi
])
#
# Sometimes the native compiler is a bogus stub for gcc or /usr/ucb/cc. This
# makes configure think it's cross compiling. If --target wasn't used, then
# we can't configure, so something is wrong.
AC_DEFUN(CY_AC_C_CROSS,
[# If we cannot run a trivial program, we must be cross compiling.
AC_MSG_CHECKING(whether cross-compiling)
AC_CACHE_VAL(ac_cv_c_cross,[
AC_TRY_RUN([
main(){return(0);}],
ac_cv_c_cross=no, ac_cv_c_cross=yes, ac_cv_c_cross=yes)
])
if test x"${target}" = x"${host}" -a x"${ac_cv_c_cross}" = x"yes"; then
dnl this hack is cause the message is so long we don't call AC_MSG_ERROR
echo "configure: error: You need to specify --target to cross compile," 1>&2;
echo " or the native compiler is broken" 1>&2;
exit 1;
else
cross_compiling=$ac_cv_c_cross
AC_MSG_RESULT($ac_cv_c_cross)
fi
])
AC_DEFUN(CY_AC_PATH_TCLH, [
#
# 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
AC_MSG_CHECKING(for Tcl private headers)
AC_ARG_WITH(tclinclude, [ --with-tclinclude directory where tcl private headers are], with_tclinclude=${withval})
AC_CACHE_VAL(ac_cv_c_tclh,[
# 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)`
else
AC_MSG_ERROR([${with_tclinclude} directory doesn't contain private headers])
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[[0-9]]* 2>/dev/null` \
${srcdir}/../../tcl \
`ls -dr ${srcdir}/../../tcl[[0-9]]* 2>/dev/null` \
${srcdir}/../../../tcl \
`ls -dr ${srcdir}/../../../tcl[[0-9]]* 2>/dev/null ` ; do
if test -f $i/tclInt.h ; then
ac_cv_c_tclh=`(cd $i; pwd)`
break
fi
# Tcl 7.5 and greater puts headers in subdirectory.
if test -f $i/generic/tclInt.h ; then
ac_cv_c_tclh=`(cd $i; pwd)`/generic
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[[0-9]]* 2>/dev/null` \
`ls -dr /usr/local/lib/tcl[[0-9]]* 2>/dev/null` \
/usr/local/src/tcl \
/usr/local/lib/tcl \
${prefix}/include ; do
if test -f $i/tclInt.h ; then
ac_cv_c_tclh=`(cd $i; pwd)`
break
fi
done
fi
# see if one is installed
if test x"${ac_cv_c_tclh}" = x ; then
AC_HEADER_CHECK(tclInt.h, ac_cv_c_tclh=installed, ac_cv_c_tclh="")
fi
])
if test x"${ac_cv_c_tclh}" = x ; then
TCLHDIR="# no Tcl private headers found"
AC_MSG_ERROR([Can't find Tcl private headers])
fi
if test x"${ac_cv_c_tclh}" != x ; then
no_tcl=""
if test x"${ac_cv_c_tkh}" = x"installed" ; then
AC_MSG_RESULT([is installed])
TCLHDIR=""
else
AC_MSG_RESULT([found in ${ac_cv_c_tclh}])
# this hack is cause the TCLHDIR won't print if there is a "-I" in it.
TCLHDIR="-I${ac_cv_c_tclh}"
fi
fi
AC_MSG_CHECKING([Tcl version])
rm -rf tclmajor tclminor
orig_includes="$CPPFLAGS"
if test x"${TCLHDIR}" != x ; then
CPPFLAGS="$CPPFLAGS $TCLHDIR"
fi
AC_TRY_RUN([
#include <stdio.h>
#include "tcl.h"
main() {
FILE *maj = fopen("tclmajor","w");
FILE *min = fopen("tclminor","w");
fprintf(maj,"%d",TCL_MAJOR_VERSION);
fprintf(min,"%d",TCL_MINOR_VERSION);
fclose(maj);
fclose(min);
return 0;
}],
tclmajor=`cat tclmajor`
tclminor=`cat tclminor`
tclversion=$tclmajor.$tclminor
AC_MSG_RESULT($tclversion)
rm -f tclmajor tclminor
,
AC_MSG_RESULT([can't happen])
,
AC_MSG_ERROR([can't be cross compiled])
)
CPPFLAGS="${orig_includes}"
AC_PROVIDE([$0])
AC_SUBST(TCLHDIR)
])
AC_DEFUN(CY_AC_PATH_TCLLIB, [
#
# Ok, lets find the tcl library
# First, look for one uninstalled.
# the alternative search directory is invoked by --with-tcllib
#
if test $tclmajor -ge 7 -a $tclminor -ge 4 ; then
installedtcllibroot=tcl$tclversion
else
installedtcllibroot=tcl
fi
if test x"${no_tcl}" = x ; then
# we reset no_tcl incase something fails here
no_tcl=true
AC_ARG_WITH(tcllib, [ --with-tcllib directory where the tcl library is],
with_tcllib=${withval})
AC_MSG_CHECKING([for Tcl library])
AC_CACHE_VAL(ac_cv_c_tcllib,[
# First check to see if --with-tcllib was specified.
# This requires checking for both the installed and uninstalled name-styles
# since we have no idea if it's installed or not.
if test x"${with_tcllib}" != x ; then
if test -f "${with_tcllib}/lib$installedtcllibroot.so" ; then
ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/lib$installedtcllibroot.so
elif test -f "${with_tcllib}/libtcl.so" ; then
ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/libtcl.so
# then look for a freshly built statically linked library
# if Makefile exists we assume its configured and libtcl will be built first.
elif test -f "${with_tcllib}/lib$installedtcllibroot.a" ; then
ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/lib$installedtcllibroot.a
elif test -f "${with_tcllib}/libtcl.a" ; then
ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/libtcl.a
else
AC_MSG_ERROR([${with_tcllib} directory doesn't contain libraries])
fi
fi
# then check for a private Tcl library
# Since these are uninstalled, use the simple lib name root.
if test x"${ac_cv_c_tcllib}" = x ; then
for i in \
../tcl \
`ls -dr ../tcl[[0-9]]* 2>/dev/null` \
../../tcl \
`ls -dr ../../tcl[[0-9]]* 2>/dev/null` \
../../../tcl \
`ls -dr ../../../tcl[[0-9]]* 2>/dev/null` ; do
# Tcl 7.5 and greater puts library in subdir. Look there first.
if test -f "$i/unix/libtcl.so" ; then
ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.so
break
elif test -f "$i/unix/libtcl.a" -o -f "$i/unix/Makefile"; then
ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.a
break
# look for a freshly built dynamically linked library
elif test -f "$i/libtcl.so" ; then
ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.so
break
# then look for a freshly built statically linked library
# if Makefile exists we assume its configured and libtcl will be
# built first.
elif test -f "$i/libtcl.a" -o -f "$i/Makefile" ; then
ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.a
break
fi
done
fi
# check in a few common install locations
if test x"${ac_cv_c_tcllib}" = x ; then
for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
# first look for a freshly built dynamically linked library
if test -f "$i/lib$installedtcllibroot.so" ; then
ac_cv_c_tcllib=`(cd $i; pwd)`/lib$installedtcllibroot.so
break
# then look for a freshly built statically linked library
# if Makefile exists we assume its configured and libtcl will be built first.
elif test -f "$i/lib$installedtcllibroot.a" -o -f "$i/Makefile" ; then
ac_cv_c_tcllib=`(cd $i; pwd)`/lib$installedtcllibroot.a
break
fi
done
fi
# check in a few other private locations
if test x"${ac_cv_c_tcllib}" = x ; then
for i in \
${srcdir}/../tcl \
`ls -dr ${srcdir}/../tcl[[0-9]]* 2>/dev/null` ; do
# Tcl 7.5 and greater puts library in subdir. Look there first.
if test -f "$i/unix/libtcl.so" ; then
ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.so
break
elif test -f "$i/unix/libtcl.a" -o -f "$i/unix/Makefile"; then
ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.a
break
# look for a freshly built dynamically linked library
elif test -f "$i/libtcl.so" ; then
ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.so
break
# then look for a freshly built statically linked library
# if Makefile exists we assume its configured and libtcl will be
# built first.
elif test -f "$i/libtcl.a" -o -f "$i/Makefile" ; then
ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.a
break
fi
done
fi
# see if one is conveniently installed with the compiler
if test x"${ac_cv_c_tcllib}" = x ; then
orig_libs="$LIBS"
LIBS="$LIBS -l$installedtcllibroot -lm"
AC_TRY_RUN([
Tcl_AppInit()
{ exit(0); }], ac_cv_c_tcllib="-l$installedtcllibroot", ac_cv_c_tcllib=""
, ac_cv_c_tclib="-l$installedtcllibroot")
LIBS="${orig_libs}"
fi
])
if test x"${ac_cv_c_tcllib}" = x ; then
TCLLIB="# no Tcl library found"
AC_MSG_WARN(Can't find Tcl library)
else
TCLLIB=${ac_cv_c_tcllib}
AC_MSG_RESULT(found $TCLLIB)
no_tcl=
fi
fi
AC_PROVIDE([$0])
AC_SUBST(TCLLIB)
])
AC_DEFUN(CY_AC_PATH_TKH, [
#
# 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.
# 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 invoked by --with-tkinclude
#
AC_CHECKING(for Tk source directory)
TKHDIR=""
for i in `ls -d ${srcdir}/../tk* 2>/dev/null` ${srcdir}/../tk ; do
if test -f $i/tk.h ; then
TKHDIR="-I$i"
fi
done
# if we can't find it, see if one is installed
if test x"$TKHDIR" = x ; then
installed=0
if test -f $prefix/include/tk.h; then
installed=1 TKHDIR="-I$prefix/include"
AC_MSG_CHECKING(for Tk private headers)
AC_ARG_WITH(tkinclude, [ --with-tkinclude directory where the tk private headers are],
with_tkinclude=${withval})
no_tk=true
AC_CACHE_VAL(ac_cv_c_tkh,[
# 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)`
else
AC_HEADER_CHECK(tk.h, installed=1)
fi
if test $installed -eq 0 ; then
TKHDIR="# no Tk directory found"
AC_MSG_WARN(Can't find Tk directory)
AC_MSG_ERROR([${with_tkinclude} directory doesn't contain private headers])
fi
fi
if test x"$TKHDIR" != x ; then
AC_MSG_RESULT(Setting TKHDIR to be $i)
# next check in private source directory
#
# since ls returns lowest version numbers first, reverse the entire list
# and search for the worst fit, overwriting it with better fits as we find them
if test x"${ac_cv_c_tkh}" = x ; then
for i in \
${srcdir}/../tk \
`ls -dr ${srcdir}/../tk[[0-9]]* 2>/dev/null` \
${srcdir}/../../tk \
`ls -dr ${srcdir}/../../tk[[0-9]]* 2>/dev/null` \
${srcdir}/../../../tk \
`ls -dr ${srcdir}/../../../tk[[0-9]]* 2>/dev/null ` ; do
if test -f $i/tk.h ; then
ac_cv_c_tkh=`(cd $i; pwd)`
break
fi
# Tk 4.1 and greater puts this in a subdir.
if test -f $i/generic/tk.h; then
ac_cv_c_tkh=`(cd $i; pwd)`/generic
fi
done
fi
# finally check in a few common install locations
#
# since ls returns lowest version numbers first, reverse the entire list
# and search for the worst fit, overwriting it with better fits as we find them
if test x"${ac_cv_c_tkh}" = x ; then
for i in \
`ls -dr /usr/local/src/tk[[0-9]]* 2>/dev/null` \
`ls -dr /usr/local/lib/tk[[0-9]]* 2>/dev/null` \
/usr/local/src/tk \
/usr/local/lib/tk \
${prefix}/include ; do
if test -f $i/tk.h ; then
ac_cv_c_tkh=`(cd $i; pwd)`
break
fi
done
fi
# see if one is installed
if test x"${ac_cv_c_tkh}" = x ; then
AC_HEADER_CHECK(tk.h, ac_cv_c_tkh=installed)
fi
])
if test x"${ac_cv_c_tkh}" != x ; then
no_tk=""
if test x"${ac_cv_c_tkh}" = x"installed" ; then
AC_MSG_RESULT([is installed])
TKHDIR=""
else
AC_MSG_RESULT([found in $ac_cv_c_tkh])
# 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"
AC_MSG_WARN([Can't find Tk private headers])
no_tk=true
fi
# if Tk is installed, extract the major/minor version
if test x"${no_tk}" = x ; then
AC_MSG_CHECKING([Tk version])
rm -rf tkmajor tkminor
orig_includes="$CPPFLAGS"
if test x"${TCLHDIR}" != x ; then
CPPFLAGS="$CPPFLAGS $TCLHDIR"
fi
if test x"${TKHDIR}" != x ; then
CPPFLAGS="$CPPFLAGS $TKHDIR"
fi
if test x"${x_includes}" != x -a x"${x_includes}" != xNONE ; then
CPPFLAGS="$CPPFLAGS -I$x_includes"
fi
AC_TRY_RUN([
#include <stdio.h>
#include "tk.h"
main() {
FILE *maj = fopen("tkmajor","w");
FILE *min = fopen("tkminor","w");
fprintf(maj,"%d",TK_MAJOR_VERSION);
fprintf(min,"%d",TK_MINOR_VERSION);
fclose(maj);
fclose(min);
return 0;
}],
tkmajor=`cat tkmajor`
tkminor=`cat tkminor`
tkversion=$tkmajor.$tkminor
AC_MSG_RESULT($tkversion)
rm -f tkmajor tkminor
,
AC_MSG_ERROR([
cannot compile a simple X program - suspect your xmkmf is
misconfigured and is incorrectly reporting the location of your X
include or libraries - report this to your system admin]) ,
AC_MSG_ERROR([can't be cross compiled])
)
CPPFLAGS="${orig_includes}"
fi
AC_PROVIDE([$0])
AC_SUBST(TKHDIR)
])
AC_DEFUN(CY_AC_PATH_TKLIB, [
AC_REQUIRE([CY_AC_PATH_TCL])
#
# Ok, lets find the tk library
# First, look for one uninstalled.
# First, look for the latest private (uninstalled) copy
# Notice that the destinations in backwards priority since the tests have
# no break.
# Then we look for either .a, .so, or Makefile. A Makefile is acceptable
# is it indicates the target has been configured and will (probably)
# soon be built. This allows an entire tree of Tcl software to be
# configured at once and then built.
# the alternative search directory is invoked by --with-tklib
#
TKLIB=""
AC_CHECKING(for Tk library)
for i in `ls -d ../tk* 2>/dev/null` ../tk ; do
if test -f "$i/Makefile" ; then
TKLIB=$i/libtk.a
fi
done
# If not found, look for installed version
if test x"$TKLIB" = x ; then
dnl This doesn't work because of unresolved symbols.
dnl AC_HAVE_LIBRARY(libtk.a, installed=1, installed=0)
if test -f $prefix/lib/libtk.a; then
installed=1
if test x"${no_tk}" = x ; then
# reset no_tk incase something fails here
no_tk="true"
if test $tkmajor -ge 4 ; then
installedtklibroot=tk$tkversion
else
installed=0
installedtkllibroot=tk
fi
if test $installed -eq 1 ; then
TKLIB="-ltk"
fi
fi
# If still not found, assume Tk simply hasn't been built yet
if test x"$TKLIB" = x ; then
for i in `ls -d ../tk* 2>/dev/null` ../tk ; do
if test -f "$i/tk.h" ; then
TKLIB=$i/libtk.a
AC_ARG_WITH(tklib, [ --with-tklib directory where the tk library is],
with_tklib=${withval})
AC_MSG_CHECKING([for Tk library])
AC_CACHE_VAL(ac_cv_c_tklib,[
# first check to see if --with-tklib was specified
# This requires checking for both the installed and uninstalled name-styles
# since we have no idea if it's installed or not.
if test x"${with_tklib}" != x ; then
if test -f "${with_tklib}/lib$installedtklibroot.so" ; then
ac_cv_c_tklib=`(cd ${with_tklib}; pwd)`/lib$installedtklibroot.so
no_tk=""
elif test -f "${with_tklib}/libtk.so" ; then
ac_cv_c_tklib=`(cd ${with_tklib}; pwd)`/libtk.so
no_tk=""
# then look for a freshly built statically linked library
# if Makefile exists we assume its configured and libtk will be built
elif test -f "${with_tklib}/lib$installedtklibroot.a" ; then
ac_cv_c_tklib=`(cd ${with_tklib}; pwd)`/lib$installedtklibroot.a
no_tk=""
elif test -f "${with_tklib}/libtk.a" ; then
ac_cv_c_tklib=`(cd ${with_tklib}; pwd)`/libtk.a
no_tk=""
else
AC_MSG_ERROR([${with_tklib} directory doesn't contain libraries])
fi
fi
done
fi
if test x"$TKLIB" = x ; then
# then check for a private Tk library
# Since these are uninstalled, use the simple lib name root.
if test x"${ac_cv_c_tklib}" = x ; then
for i in \
../tk \
`ls -dr ../tk[[0-9]]* 2>/dev/null` \
../../tk \
`ls -dr ../../tk[[0-9]]* 2>/dev/null` \
../../../tk \
`ls -dr ../../../tk[[0-9]]* 2>/dev/null` ; do
# Tk 4.1 and greater puts things in subdirs. Check these first.
if test -f "$i/unix/libtk.so" ; then
ac_cv_c_tklib=`(cd $i; pwd)`/unix/libtk.so
no_tk=
break
elif test -f "$i/unix/libtk.a" -o -f "$i/unix/Makefile"; then
ac_cv_c_tklib=`(cd $i; pwd)`/unix/libtk.a
no_tk=
break
# look for a freshly built dynamically linked library
elif test -f "$i/libtk.so" ; then
ac_cv_c_tklib=`(cd $i; pwd)`/libtk.so
no_tk=
break
# then look for a freshly built statically linked library
# if Makefile exists we assume its configured and libtk will be built
elif test -f "$i/libtk.a" -o -f "$i/Makefile" ; then
ac_cv_c_tklib=`(cd $i; pwd)`/libtk.a
no_tk=""
break
fi
done
fi
# finally check in a few common install locations
if test x"${ac_cv_c_tklib}" = x ; then
for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
# first look for a freshly built dynamically linked library
if test -f "$i/lib$installedtklibroot.so" ; then
ac_cv_c_tklib=`(cd $i; pwd)`/lib$installedtklibroot.so
no_tk=""
break
# then look for a freshly built statically linked library
# if Makefile exists, we assume it's configured and libtcl will be built
elif test -f "$i/lib$installedtklibroot.a" -o -f "$i/Makefile" ; then
ac_cv_c_tklib=`(cd $i; pwd)`/lib$installedtklibroot.a
no_tk=""
break
fi
done
fi
# check in a few other private locations
if test x"${ac_cv_c_tklib}" = x ; then
for i in \
${srcdir}/../tk \
`ls -dr ${srcdir}/../tk[[0-9]]* 2>/dev/null` ; do
# Tk 4.1 and greater puts things in subdirs. Check these first.
if test -f "$i/unix/libtk.so" ; then
ac_cv_c_tklib=`(cd $i; pwd)`/unix/libtk.so
no_tk=
break
elif test -f "$i/unix/libtk.a" -o -f "$i/unix/Makefile"; then
ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtk.a
no_tk=
break
# look for a freshly built dynamically linked library
elif test -f "$i/libtk.so" ; then
ac_cv_c_tklib=`(cd $i; pwd)`/libtk.so
no_tk=""
break
# then look for a freshly built statically linked library
# if Makefile exists, we assume it's configured and libtcl will be built
elif test -f "$i/libtk.a" -o -f "$i/Makefile" ; then
ac_cv_c_tklib=`(cd $i; pwd)`/libtk.a
no_tk=""
break
fi
done
fi
# see if one is conveniently installed with the compiler
if test x"${ac_cv_c_tklib}" = x ; then
AC_REQUIRE([AC_PATH_X])
orig_libs="$LIBS"
LIBS="$LIBS -l$installedtklibroot $x_libraries $ac_cv_c_tcllib -lm"
AC_TRY_RUN([
Tcl_AppInit()
{ exit(0); }], ac_cv_c_tklib="-l$installedtklibroot", ac_cv_c_tklib=""
, ac_cv_c_tklib="-l$installedtklibroot")
LIBS="${orig_libs}"
fi
])
if test x"${ac_cv_c_tklib}" = x ; then
TKLIB="# no Tk library found"
AC_MSG_WARN(Can't find Tk library)
else
AC_MSG_RESULT(setting TKLIB to be $TKLIB)
else
TKLIB=$ac_cv_c_tklib
AC_MSG_RESULT(found $TKLIB)
no_tk=
fi
fi
AC_SUBST(TKHDIR)
AC_PROVIDE([$0])
AC_SUBST(TKLIB)
])
AC_DEFUN(CYGNUS_PATH_TCL, [
#
# 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.
#
AC_CHECKING(for Tcl source directory)
TCLHDIR=""
for i in `ls -d ${srcdir}/../tcl* 2>/dev/null` ${srcdir}/../tcl ; do
if test -f $i/tclInt.h ; then
TCLHDIR="-I$i"
fi
done
# if we can't find it, see if one is installed
if test x"$TCLHDIR" = x ; then
installed=0
if test -f $prefix/include/tclInt.h; then
installed=1 TCLHDIR="-I$prefix/include"
else
AC_HEADER_CHECK(tclInt.h, installed=1)
fi
if test $installed -eq 0 ; then
TCLHDIR="# no Tcl directory found"
AC_MSG_WARN(Can't find Tcl directory)
fi
else
AC_MSG_RESULT(setting TCLHDIR to be $i)
fi
#
# Ok, lets find the tcl library
# First, look for the latest uninstalled
#
TCLLIB=""
AC_CHECKING(for Tcl library)
for i in `ls -d ../tcl* 2>/dev/null` ../tcl ; do
if test -f "$i/Makefile" ; then
TCLLIB=$i/libtcl.a
fi
done
# If not found, look for installed version
if test x"$TCLLIB" = x ; then
dnl Don't use this, since we can't use it for libtk.a.
dnl AC_HAVE_LIBRARY(libtcl.a, installed=1, installed=0)
if test -f $prefix/lib/libtcl.a; then installed=1; else installed=0; fi
if test $installed -eq 1 ; then
TCLLIB="-ltcl"
fi
fi
# If still not found, assume Tcl simply hasn't been built yet
if test x"$TCLLIB" = x ; then
for i in `ls -d ../tcl* 2>/dev/null` ../tcl ; do
if test -f "$i/tcl.h" ; then
TCLLIB=$i/libtcl.a
fi
done
fi
if test x"$TCLLIB" = x ; then
TCLLIB="# no Tcl library found"
AC_MSG_WARN(Can't find Tcl library)
else
AC_MSG_RESULT(setting TCLLIB to be $TCLLIB)
fi
AC_SUBST(TCLHDIR)
AC_SUBST(TCLLIB)
])
AC_DEFUN(CY_AC_PATH_TK, [
CY_AC_PATH_TKH
CY_AC_PATH_TKLIB
])
AC_DEFUN(CY_AC_PATH_TCL, [
CY_AC_PATH_TCLH
CY_AC_PATH_TCLLIB
])

850
gdb/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -115,8 +115,8 @@ if test "${enable_gdbtk}" = "yes"; then
AC_PATH_X
AC_PATH_XTRA
CYGNUS_PATH_TK
CYGNUS_PATH_TCL
CY_AC_PATH_TCL
CY_AC_PATH_TK
ENABLE_GDBTK=1

View File

@ -153,11 +153,16 @@ gdbtk_query (query, args)
char *query;
va_list args;
{
char buf[200];
char buf[200], *merge[2];
char *command;
long val;
vsprintf (buf, query, args);
Tcl_VarEval (interp, "gdbtk_tcl_query ", "{", buf, "}", NULL);
merge[0] = "gdbtk_tcl_query";
merge[1] = buf;
command = Tcl_Merge (2, merge);
Tcl_Eval (interp, command);
free (command);
val = atol (interp->result);
return val;
@ -277,6 +282,8 @@ breakpoint_notify(b, action)
if (b->type != bp_breakpoint)
return;
/* We ensure that ACTION contains no special Tcl characters, so we
can do this. */
sprintf (buf, "gdbtk_tcl_breakpoint %s %d", action, b->number);
v = Tcl_Eval (interp, buf);
@ -680,7 +687,7 @@ call_wrapper (clientData, interp, argc, argv)
/* In case of an error, we may need to force the GUI into idle mode because
gdbtk_call_command may have bombed out while in the command routine. */
Tcl_VarEval (interp, "gdbtk_tcl_idle", NULL);
Tcl_Eval (interp, "gdbtk_tcl_idle");
}
do_cleanups (ALL_CLEANUPS);
@ -1069,9 +1076,9 @@ gdbtk_call_command (cmdblk, arg, from_tty)
{
if (cmdblk->class == class_run)
{
Tcl_VarEval (interp, "gdbtk_tcl_busy", NULL);
Tcl_Eval (interp, "gdbtk_tcl_busy");
(*cmdblk->function.cfunc)(arg, from_tty);
Tcl_VarEval (interp, "gdbtk_tcl_idle", NULL);
Tcl_Eval (interp, "gdbtk_tcl_idle");
}
else
(*cmdblk->function.cfunc)(arg, from_tty);

File diff suppressed because it is too large Load Diff

View File

@ -15,6 +15,16 @@ Mon Jan 15 09:33:00 1996 Fred Fish <fnf@cygnus.com>
[] tests with "test" and enclose string in quotes.
* gdb.stabs/configure: Rebuild
Thu Jan 11 09:43:14 1996 Tom Tromey <tromey@creche.cygnus.com>
Changes in sync with expect:
* aclocal.m4 (CY_AC_PATH_TCLH): Handle Tcl 7.5 and greater.
(CY_AC_PATH_TCLLIB): Handle Tcl 7.5 and greater.
(CY_AC_PATH_TKH): Handle Tk 4.1 and greater.
(CY_AC_PATH_TKLIB): Handle Tk 4.1 and greater. Properly quote
argument to AC_REQUIRE.
* configure: Regenerated.
Thu Jan 4 08:17:22 1996 Fred Fish <fnf@cygnus.com>
* gdb.base/corefile.exp: When generating a core, discard any