1999-02-05 James Ingham <jingham@cygnus.com>

* Makefile.in: Add GDBTK_CFLAGS - this is now used to hold
        -fwritable-strings when compiling with Tk8.1.
        * configure.in: Add GDBTK_CFLAGS, set it to -fwritable-strings for
        Tcl/Tk8.1 & greater.
        * acinclude.m4: Move the rest of the defines to find Itcl, Itk &
        Tix from aclocal.m4 to here.
        * aclocal.m4: regenerate.
        * configure: regenerate.

        * gdbtk-hooks.c (x_event): Tcl_ObjGetVar2 was removed from
        Tcl8.1.  Use Tcl_GetVar2 instead.
        * gdbtk-hooks.c (gdbtk_trace_find): Fix up call to
        Tcl_GlobalEvalObj for Tcl/Tk 8.1.
        * gdbtk-hooks.c (gdbtk_trace_start_stop): Call to Tcl_EvalObj was
        inefficient, replace with call to Tcl_GlobalEval.
        * gdbtk.c: Don't swap out the Tcl_Alloc calls in gdbtk.c.  We took
        care of that in Tcl itself for 8.1.
        * gdbtk.c: Remove const from the script string since Tcl8.1 has
        taken to scribbling sentinals into strings passed to it again...

        * gdbtk-cmds.c (wrapped_call): Change declaration of 1st arg from
        char * to PTR to eliminate warning.
        * gdbtk-cmds.c (perror_with_name_wrapper): Ditto
This commit is contained in:
Jim Ingham 1999-02-06 01:50:46 +00:00
parent 77e3189254
commit b11485dae8
9 changed files with 683 additions and 381 deletions

View file

@ -1,3 +1,29 @@
1999-02-05 James Ingham <jingham@cygnus.com>
* Makefile.in: Add GDBTK_CFLAGS - this is now used to hold
-fwritable-strings when compiling with Tk8.1.
* configure.in: Add GDBTK_CFLAGS, set it to -fwritable-strings for
Tcl/Tk8.1 & greater.
* acinclude.m4: Move the rest of the defines to find Itcl, Itk &
Tix from aclocal.m4 to here.
* aclocal.m4: regenerate.
* configure: regenerate.
* gdbtk-hooks.c (x_event): Tcl_ObjGetVar2 was removed from
Tcl8.1. Use Tcl_GetVar2 instead.
* gdbtk-hooks.c (gdbtk_trace_find): Fix up call to
Tcl_GlobalEvalObj for Tcl/Tk 8.1.
* gdbtk-hooks.c (gdbtk_trace_start_stop): Call to Tcl_EvalObj was
inefficient, replace with call to Tcl_GlobalEval.
* gdbtk.c: Don't swap out the Tcl_Alloc calls in gdbtk.c. We took
care of that in Tcl itself for 8.1.
* gdbtk.c: Remove const from the script string since Tcl8.1 has
taken to scribbling sentinals into strings passed to it again...
* gdbtk-cmds.c (wrapped_call): Change declaration of 1st arg from
char * to PTR to eliminate warning.
* gdbtk-cmds.c (perror_with_name_wrapper): Ditto
Thu Feb 4 10:35:28 1999 Keith Seitz <keiths@cygnus.com>
* gdbtk-variable.c (variable_create): Allocate enough

View file

@ -80,7 +80,7 @@ CC=@CC@
srcdir = @srcdir@
VPATH = @srcdir@
BISON=@YACC@
YACC=@YACC@
YLWRAP = $(srcdir)/../ylwrap
@ -155,6 +155,8 @@ 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@
@ -918,7 +920,7 @@ version.c: Makefile
# Makefile.in, but that was a pretty big annoyance.
c-exp.tab.o: c-exp.tab.c
c-exp.tab.c: c-exp.y
$(SHELL) $(YLWRAP) "$(BISON)" $(srcdir)/c-exp.y y.tab.c c-exp.tmp -- $(YFLAGS)
$(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/c-exp.y y.tab.c c-exp.tmp -- $(YFLAGS)
-sed -e '/extern.*malloc/d' \
-e '/extern.*realloc/d' \
-e '/extern.*free/d' \
@ -933,7 +935,7 @@ c-exp.tab.c: c-exp.y
# start-sanitize-java
jv-exp.tab.o: jv-exp.tab.c
jv-exp.tab.c: jv-exp.y
$(SHELL) $(YLWRAP) "$(BISON)" $(srcdir)/jv-exp.y y.tab.c jv-exp.tmp -- $(YFLAGS)
$(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/jv-exp.y y.tab.c jv-exp.tmp -- $(YFLAGS)
-sed -e '/extern.*malloc/d' \
-e '/extern.*realloc/d' \
-e '/extern.*free/d' \
@ -948,7 +950,7 @@ jv-exp.tab.c: jv-exp.y
# end-sanitize-java
f-exp.tab.o: f-exp.tab.c
f-exp.tab.c: f-exp.y c-exp.tab.c
$(SHELL) $(YLWRAP) "$(BISON)" $(srcdir)/f-exp.y y.tab.c f-exp.tmp -- $(YFLAGS)
$(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/f-exp.y y.tab.c f-exp.tmp -- $(YFLAGS)
-sed -e '/extern.*malloc/d' \
-e '/extern.*realloc/d' \
-e '/extern.*free/d' \
@ -966,7 +968,7 @@ f-exp.tab.c: f-exp.y c-exp.tab.c
# else.
m2-exp.tab.o: m2-exp.tab.c
m2-exp.tab.c: m2-exp.y
$(SHELL) $(YLWRAP) "$(BISON)" $(srcdir)/m2-exp.y y.tab.c m2-exp.tmp -- $(YFLAGS)
$(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/m2-exp.y y.tab.c m2-exp.tmp -- $(YFLAGS)
-sed -e '/extern.*malloc/d' \
-e '/extern.*realloc/d' \
-e '/extern.*free/d' \
@ -1210,35 +1212,35 @@ gdbtk.o: gdbtk.c 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) \
$(ITK_CFLAGS) $(TIX_CFLAGS) \
$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \
$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
$(srcdir)/gdbtk.c -DGDBTK_LIBRARY=\"$(datadir)/gdbtcl\"
gdbtk-cmds.o: gdbtk-cmds.c 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) \
$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
$(srcdir)/gdbtk-cmds.c -DGDBTK_LIBRARY=\"$(datadir)/gdbtcl\"
gdbtk-hooks.o: gdbtk-hooks.c 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) \
$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
$(srcdir)/gdbtk-hooks.c -DGDBTK_LIBRARY=\"$(datadir)/gdbtcl\"
gdbtk-variable.o: gdbtk-variable.c gdbtk.h gdbtk-wrapper.h
$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) $(TIX_CFLAGS) \
$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \
$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
$(srcdir)/gdbtk-variable.c
gdbtk-wrapper.o: gdbtk-wrapper.c gdbtk-wrapper.h
$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) \
$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(GDBTK_CFLAGS)\
$(srcdir)/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) \
$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
$(srcdir)/v850ice.c
# end-sanitize-gdbtk

View file

@ -4,8 +4,8 @@ dnl major rewriting for Tcl 7.5 by Don Libes <libes@nist.gov>
dnl gdb/configure.in uses BFD_NEED_DECLARATION, so get its definition.
sinclude(../bfd/acinclude.m4)
dnl CY_AC_PATH_TCLCONFIG and CY_AC_LOAD_TCLCONFIG should be invoked
dnl (in that order) before any other TCL macros. Similarly for TK.
dnl This gets the standard macros, like the TCL, TK, etc ones.
sinclude(../config/acinclude.m4)
dnl CYGNUS LOCAL: This gets the right posix flag for gcc
AC_DEFUN(CY_AC_TCL_LYNX_POSIX,
@ -552,7 +552,6 @@ if test x"${no_itcl}" = x ; then
AC_MSG_RESULT(found $ITCLCONFIG)
fi
fi
])
# Defined as a separate macro so we don't have to cache the values
@ -736,7 +735,7 @@ AC_SUBST(ITKHDIR)
# check for Tix headers.
AC_DEFUN(CY_AC_PATH_TIX, [
AC_DEFUN(CY_AC_PATH_TIXH, [
AC_MSG_CHECKING(for Tix private headers. srcdir=${srcdir})
if test x"${ac_cv_c_tixh}" = x ; then
for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
@ -755,3 +754,108 @@ if test x"${ac_cv_c_tixh}" != x ; then
fi
AC_SUBST(TIXHDIR)
])
AC_DEFUN(CY_AC_PATH_TIXCONFIG, [
#
# 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
AC_ARG_WITH(tixconfig, [ --with-tixconfig directory containing tix configuration (tixConfig.sh)],
with_tixconfig=${withval})
AC_MSG_CHECKING([for Tix configuration])
AC_CACHE_VAL(ac_cv_c_tixconfig,[
# 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
AC_MSG_ERROR([${with_tixconfig} directory doesn't contain tixConfig.sh])
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
])
if test x"${ac_cv_c_tixconfig}" = x ; then
TIXCONFIG="# no Tix configs found"
AC_MSG_WARN(Can't find Tix configuration definitions)
else
no_tix=
TIXCONFIG=${ac_cv_c_tixconfig}/tixConfig.sh
AC_MSG_RESULT(found $TIXCONFIG)
fi
fi
])
# Defined as a separate macro so we don't have to cache the values
# from PATH_TIXCONFIG (because this can also be cached).
AC_DEFUN(CY_AC_LOAD_TIXCONFIG, [
if test -f "$TIXCONFIG" ; then
. $TIXCONFIG
fi
AC_SUBST(TIX_VERSION)
dnl not actually used, don't export to save symbols
dnl AC_SUBST(TIX_MAJOR_VERSION)
dnl AC_SUBST(TIX_MINOR_VERSION)
dnl AC_SUBST(TIX_DEFS)
dnl not used, don't export to save symbols
dnl dnl AC_SUBST(TIX_LIB_FILE)
dnl not used outside of configure
dnl AC_SUBST(TIX_LIBS)
dnl not used, don't export to save symbols
dnl AC_SUBST(TIX_PREFIX)
dnl not used, don't export to save symbols
dnl AC_SUBST(TIX_EXEC_PREFIX)
dnl AC_SUBST(TIX_BUILD_INCLUDES)
AC_SUBST(TIX_BUILD_LIB_SPEC)
dnl AC_SUBST(TIX_LIB_SPEC)
])

112
gdb/aclocal.m4 vendored
View file

@ -16,8 +16,8 @@ dnl major rewriting for Tcl 7.5 by Don Libes <libes@nist.gov>
dnl gdb/configure.in uses BFD_NEED_DECLARATION, so get its definition.
sinclude(../bfd/acinclude.m4)
dnl CY_AC_PATH_TCLCONFIG and CY_AC_LOAD_TCLCONFIG should be invoked
dnl (in that order) before any other TCL macros. Similarly for TK.
dnl This gets the standard macros, like the TCL, TK, etc ones.
sinclude(../config/acinclude.m4)
dnl CYGNUS LOCAL: This gets the right posix flag for gcc
AC_DEFUN(CY_AC_TCL_LYNX_POSIX,
@ -564,7 +564,6 @@ if test x"${no_itcl}" = x ; then
AC_MSG_RESULT(found $ITCLCONFIG)
fi
fi
])
# Defined as a separate macro so we don't have to cache the values
@ -748,7 +747,7 @@ AC_SUBST(ITKHDIR)
# check for Tix headers.
AC_DEFUN(CY_AC_PATH_TIX, [
AC_DEFUN(CY_AC_PATH_TIXH, [
AC_MSG_CHECKING(for Tix private headers. srcdir=${srcdir})
if test x"${ac_cv_c_tixh}" = x ; then
for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
@ -768,6 +767,111 @@ fi
AC_SUBST(TIXHDIR)
])
AC_DEFUN(CY_AC_PATH_TIXCONFIG, [
#
# 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
AC_ARG_WITH(tixconfig, [ --with-tixconfig directory containing tix configuration (tixConfig.sh)],
with_tixconfig=${withval})
AC_MSG_CHECKING([for Tix configuration])
AC_CACHE_VAL(ac_cv_c_tixconfig,[
# 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
AC_MSG_ERROR([${with_tixconfig} directory doesn't contain tixConfig.sh])
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
])
if test x"${ac_cv_c_tixconfig}" = x ; then
TIXCONFIG="# no Tix configs found"
AC_MSG_WARN(Can't find Tix configuration definitions)
else
no_tix=
TIXCONFIG=${ac_cv_c_tixconfig}/tixConfig.sh
AC_MSG_RESULT(found $TIXCONFIG)
fi
fi
])
# Defined as a separate macro so we don't have to cache the values
# from PATH_TIXCONFIG (because this can also be cached).
AC_DEFUN(CY_AC_LOAD_TIXCONFIG, [
if test -f "$TIXCONFIG" ; then
. $TIXCONFIG
fi
AC_SUBST(TIX_VERSION)
dnl not actually used, don't export to save symbols
dnl AC_SUBST(TIX_MAJOR_VERSION)
dnl AC_SUBST(TIX_MINOR_VERSION)
dnl AC_SUBST(TIX_DEFS)
dnl not used, don't export to save symbols
dnl dnl AC_SUBST(TIX_LIB_FILE)
dnl not used outside of configure
dnl AC_SUBST(TIX_LIBS)
dnl not used, don't export to save symbols
dnl AC_SUBST(TIX_PREFIX)
dnl not used, don't export to save symbols
dnl AC_SUBST(TIX_EXEC_PREFIX)
dnl AC_SUBST(TIX_BUILD_INCLUDES)
AC_SUBST(TIX_BUILD_LIB_SPEC)
dnl AC_SUBST(TIX_LIB_SPEC)
])
# serial 1

668
gdb/configure vendored

File diff suppressed because it is too large Load diff

View file

@ -674,7 +674,7 @@ if test "${enable_gdbtk}" = "yes"; then
CY_AC_PATH_TKH
CY_AC_PATH_ITCLH
CY_AC_PATH_ITKH
CY_AC_PATH_TIX
CY_AC_PATH_TIXH
# now look for Itcl library stuff
@ -714,45 +714,29 @@ if test "${enable_gdbtk}" = "yes"; then
ITK_DEPS="${itkdir}${ITK_LIB_FILE}"
fi
# now look for tix library stuff
TIXVERSION=4.1.8.0
. ${ac_cv_c_tclconfig}/tclConfig.sh
case "${host}" in
*-*-cygwin*)
tixdir=../tix/win/tcl8.0
;;
*)
tixdir=../tix/unix/tk8.0
;;
esac
if test "${TCL_SHARED_BUILD}" = "1"; then
TIX_LIB_EXT="${TCL_SHLIB_SUFFIX}"
# Can't win them all: SunOS 4 (others?) appends a version
# number after the ".so"
case "${host}" in
*-*-sunos4*)
TIX_LIB_EXT="${TIX_LIB_EXT}.1.0" ;;
esac
else
TIX_LIB_EXT=".a"
fi
if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
TIXLIB="-L${tixdir} -ltix${TIXVERSION}"
TIX_DEPS="${tixdir}/libtix${TIXVERSION}${TIX_LIB_EXT}"
else
TIXLIB="-L${tixdir} -ltix`echo ${TIXVERSION} | tr -d .`"
TIX_DEPS="${tixdir}/libtix`echo ${TIXVERSION} | tr -d .`${TIX_LIB_EXT}"
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.
if test "${enable_ide}" = "yes"; then
TCL_LIBS='$(LIBIDETCL) $(LIBIDE) $(LIBGUI) $(IDE) $(ITCL) $(ITK) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
TCL_LIBS='$(LIBIDETCL) $(LIBIDE) $(LIBGUI) $(IDE) $(ITCL) $(ITK) $(TIXLIB) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
CONFIG_DEPS='$(LIBIDETCL) $(LIBIDE) $(LIBGUI) $(IDE_DEPS) $(ITCL_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)'
else
TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
@ -786,6 +770,7 @@ AC_SUBST(ITK_DEPS)
AC_SUBST(TIXLIB)
AC_SUBST(TIX_DEPS)
AC_SUBST(GDBTKLIBS)
AC_SUBST(GDBTK_CFLAGS)
# end-sanitize-gdbtk
AC_PATH_X

View file

@ -241,10 +241,10 @@ char * get_prompt PARAMS ((void));
static void get_register PARAMS ((int, void *));
static void get_register_name PARAMS ((int, void *));
static int map_arg_registers PARAMS ((int, Tcl_Obj *CONST [], void (*) (int, void *), void *));
static int perror_with_name_wrapper PARAMS ((char *args));
static int perror_with_name_wrapper PARAMS ((PTR args));
static void register_changed_p PARAMS ((int, void *));
void TclDebug PARAMS ((const char *fmt, ...));
static int wrapped_call (char *opaque_args);
static int wrapped_call (PTR opaque_args);
static void get_frame_name PARAMS ((Tcl_Interp *interp, Tcl_Obj *list, struct frame_info *fi));
/* Gdbtk_Init
@ -441,7 +441,7 @@ call_wrapper (clientData, interp, objc, objv)
static int
wrapped_call (opaque_args)
char *opaque_args;
PTR opaque_args;
{
struct wrapped_call_args *args = (struct wrapped_call_args *) opaque_args;
args->val = (*args->func) (args->func, args->interp, args->objc, args->objv);
@ -3550,7 +3550,7 @@ gdb_path_conv (clientData, interp, objc, objv)
static int
perror_with_name_wrapper (args)
char * args;
PTR args;
{
perror_with_name (args);
return 1;

View file

@ -398,8 +398,12 @@ x_event (signo)
int val;
if (varname == NULL)
{
#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 1
Tcl_Obj *varnamestrobj = Tcl_NewStringObj("download_cancel_ok",-1);
varname = Tcl_ObjGetVar2(gdbtk_interp,varnamestrobj,NULL,TCL_GLOBAL_ONLY);
varname = Tcl_ObjGetVar2(gdbtk_interp, varnamestrobj, NULL, TCL_GLOBAL_ONLY);
#else
varname = Tcl_GetObjVar2(gdbtk_interp, "download_cancel_ok", NULL, TCL_GLOBAL_ONLY);
#endif
}
if ((Tcl_GetIntFromObj(gdbtk_interp,varname,&val) == TCL_OK) && val)
{
@ -707,17 +711,16 @@ gdbtk_trace_find (arg, from_tty)
{
Tcl_Obj *cmdObj;
if (from_tty) {
Tcl_GlobalEval (gdbtk_interp, "debug {*** In gdbtk_trace_find, from_tty is true}");
cmdObj = Tcl_NewListObj (0, NULL);
Tcl_ListObjAppendElement (gdbtk_interp, cmdObj,
Tcl_NewStringObj ("gdbtk_tcl_trace_find_hook", -1));
Tcl_ListObjAppendElement (gdbtk_interp, cmdObj, Tcl_NewStringObj (arg, -1));
Tcl_ListObjAppendElement (gdbtk_interp, cmdObj, Tcl_NewIntObj(from_tty));
Tcl_GlobalEvalObj (gdbtk_interp, cmdObj);
} else {
Tcl_GlobalEval (gdbtk_interp, "debug {*** In gdbtk_trace_find, from_tty is false}");
}
cmdObj = Tcl_NewListObj (0, NULL);
Tcl_ListObjAppendElement (gdbtk_interp, cmdObj,
Tcl_NewStringObj ("gdbtk_tcl_trace_find_hook", -1));
Tcl_ListObjAppendElement (gdbtk_interp, cmdObj, Tcl_NewStringObj (arg, -1));
Tcl_ListObjAppendElement (gdbtk_interp, cmdObj, Tcl_NewIntObj(from_tty));
#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 1
Tcl_GlobalEvalObj (gdbtk_interp, cmdObj);
#else
Tcl_EvalObj (gdbtk_interp, cmdObj, TCL_EVAL_GLOBAL);
#endif
}
/*
@ -734,21 +737,11 @@ gdbtk_trace_start_stop (start, from_tty)
int start;
int from_tty;
{
Tcl_Obj *cmdObj;
if (from_tty) {
Tcl_GlobalEval (gdbtk_interp, "debug {*** In gdbtk_trace_start, from_tty is true}");
cmdObj = Tcl_NewListObj (0, NULL);
if (start)
Tcl_ListObjAppendElement (gdbtk_interp, cmdObj,
Tcl_NewStringObj ("gdbtk_tcl_tstart", -1));
else
Tcl_ListObjAppendElement (gdbtk_interp, cmdObj,
Tcl_NewStringObj ("gdbtk_tcl_tstop", -1));
Tcl_GlobalEvalObj (gdbtk_interp, cmdObj);
} else {
Tcl_GlobalEval (gdbtk_interp, "debug {*** In gdbtk_trace_startd, from_tty is false}");
}
if (start)
Tcl_GlobalEval (gdbtk_interp, "gdbtk_tcl_tstart");
else
Tcl_GlobalEval (gdbtk_interp, "gdbtk_tcl_tstop");
}

View file

@ -133,17 +133,20 @@ static char *gdbtk_source_filename = NULL;
/* Supply malloc calls for tcl/tk. We do not want to do this on
Windows, because Tcl_Alloc is probably in a DLL which will not call
the mmalloc routines. */
the mmalloc routines.
We also don't need to do it for Tcl/Tk8.1, since we locally changed the
allocator to use malloc & free. */
#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0
char *
Tcl_Alloc (size)
TclpAlloc (size)
unsigned int size;
{
return xmalloc (size);
}
char *
Tcl_Realloc (ptr, size)
TclpRealloc (ptr, size)
char *ptr;
unsigned int size;
{
@ -151,11 +154,12 @@ Tcl_Realloc (ptr, size)
}
void
Tcl_Free(ptr)
TclpFree(ptr)
char *ptr;
{
free (ptr);
}
#endif /* TCL_VERSION == 8.0 */
#endif /* ! _WIN32 */
@ -532,7 +536,7 @@ gdbtk_init ( argv0 )
{
#ifdef NO_TCLPRO_DEBUGGER
static const char script[] ="\
static char script[] ="\
proc gdbtk_find_main {} {\n\
global Paths GDBTK_LIBRARY\n\
rename gdbtk_find_main {}\n\
@ -541,7 +545,7 @@ proc gdbtk_find_main {} {\n\
}\n\
gdbtk_find_main";
#else
static const char script[] ="\
static char script[] ="\
proc gdbtk_find_main {} {\n\
global Paths GDBTK_LIBRARY env\n\
rename gdbtk_find_main {}\n\