From: Jason Molenda Date: Wed, 14 Oct 1998 23:44:13 +0000 (+0000) Subject: 1998-10-14 Jason Molenda (jsm@bugshack.cygnus.com) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=879c041771ae0fcd6a58373b926c31df992af1ab;p=binutils-gdb.git 1998-10-14 Jason Molenda (jsm@bugshack.cygnus.com) * defs.h: Move _initialize_printcmd, _initialize_stack, _initialize_blockframe out of here and in to their respective .c files. * blockframe.c: Move _initialize_blockframe prototype to here. * printcmd.c: Move _initialize_printcmd prototype to here. * stack.c: Move _initialize_stack prototype to here. * source.c, symtab.h: Move _initialize_source prototype to the .c file. * values.c, value.h: Move _initialize_values prototype to the .c file. * gdbthread.h, thread.c: Move _initialize_thread prototype to the .c file. * breakpoint.c, breakpoint.h: Move _initialize_breakpoint prototype to the .c file. * abug-rom.c alpha-nat.c alpha-tdep.c annotate.c ax-gdb.c bcache.c: Standardize comments for the prototype section of these files. * configure.in: Look in libc for wctype before looking for it in libc. The last one is to fix the GNU ld (~2.9.1) + Solaris 2.6 interaction problem where an empty stub library (libw) causes a core dump when we call vasprintf (e.g. `info br') in the final linked gdb. --- diff --git a/gdb/abug-rom.c b/gdb/abug-rom.c index 8720c99d1df..cfbc834d4db 100644 --- a/gdb/abug-rom.c +++ b/gdb/abug-rom.c @@ -1,5 +1,5 @@ /* Remote debugging interface for ABug Rom monitor for GDB, the GNU debugger. - Copyright 1995, 1996 Free Software Foundation, Inc. + Copyright 1995, 1996, 1998 Free Software Foundation, Inc. Written by Rob Savoye of Cygnus Support @@ -25,6 +25,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "monitor.h" #include "serial.h" +/* Prototypes for local functions. */ + static void abug_open PARAMS ((char *args, int from_tty)); static void diff --git a/gdb/alpha-nat.c b/gdb/alpha-nat.c index 609d6873300..4f952004821 100644 --- a/gdb/alpha-nat.c +++ b/gdb/alpha-nat.c @@ -30,6 +30,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #endif #include +/* Prototypes for local functions. */ + static void fetch_osf_core_registers PARAMS ((char *, unsigned, int, CORE_ADDR)); static void fetch_elf_core_registers PARAMS ((char *, diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index fc11b447cd9..0296306edac 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -1,5 +1,5 @@ /* Target-dependent code for the ALPHA architecture, for GDB, the GNU Debugger. - Copyright 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright 1993, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. This file is part of GDB. @@ -35,7 +35,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ extern struct obstack frame_cache_obstack; -/* Forward declarations. */ +/* Prototypes for local functions. */ static alpha_extra_func_info_t push_sigtramp_desc PARAMS ((CORE_ADDR low_addr)); diff --git a/gdb/annotate.c b/gdb/annotate.c index 09d31f52353..ccb35e202b2 100644 --- a/gdb/annotate.c +++ b/gdb/annotate.c @@ -1,5 +1,5 @@ /* Annotation routines for GDB. - Copyright 1986, 1989, 1990, 1991, 1992, 1995 Free Software Foundation, Inc. + Copyright 1986, 89, 90, 91, 92, 95, 1998 Free Software Foundation, Inc. This file is part of GDB. @@ -24,7 +24,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "gdbtypes.h" #include "breakpoint.h" + +/* Prototypes for local functions. */ + static void print_value_flags PARAMS ((struct type *)); + static void breakpoint_changed PARAMS ((struct breakpoint *)); void (*annotate_starting_hook) PARAMS ((void)); diff --git a/gdb/bcache.c b/gdb/bcache.c index 377355b203c..d28515b846c 100644 --- a/gdb/bcache.c +++ b/gdb/bcache.c @@ -1,6 +1,6 @@ /* Implement a cached obstack. Written by Fred Fish (fnf@cygnus.com) - Copyright 1995 Free Software Foundation, Inc. + Copyright 1995, 1998 Free Software Foundation, Inc. This file is part of GDB. @@ -23,7 +23,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "bcache.h" #include "gdb_string.h" /* For memcpy declaration */ +/* Prototypes for local functions. */ + static unsigned int hash PARAMS ((void *, int)); + static void *lookup_cache PARAMS ((void *, int, int, struct bcache *)); /* FIXME: Incredibly simplistic hash generator. Probably way too expensive diff --git a/gdb/config.in b/gdb/config.in index 933c2874ca0..c559fb696e0 100644 --- a/gdb/config.in +++ b/gdb/config.in @@ -282,3 +282,6 @@ /* Define if you have the m library (-lm). */ #undef HAVE_LIBM + +/* Define if you have the w library (-lw). */ +#undef HAVE_LIBW diff --git a/gdb/configure b/gdb/configure index da22ec95b41..be8a2f14744 100755 --- a/gdb/configure +++ b/gdb/configure @@ -3882,14 +3882,102 @@ else fi +echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6 +echo "configure:3887: checking for wctype in -lc" >&5 +ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lc $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 +echo "configure:3925: checking for wctype in -lw" >&5 +ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lw $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + +fi + + echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 -echo "configure:3888: checking for long long support in compiler" >&5 +echo "configure:3976: checking for long long support in compiler" >&5 if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gdb_cv_c_long_long=yes else @@ -3921,7 +4009,7 @@ fi echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 -echo "configure:3925: checking for long long support in printf" >&5 +echo "configure:4013: checking for long long support in printf" >&5 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3929,7 +4017,7 @@ else gdb_cv_printf_has_long_long=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then gdb_cv_printf_has_long_long=yes else @@ -3967,19 +4055,19 @@ echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 -echo "configure:3971: checking for long double support in compiler" >&5 +echo "configure:4059: checking for long double support in compiler" >&5 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_long_double=yes else @@ -4001,7 +4089,7 @@ fi echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 -echo "configure:4005: checking for long double support in printf" >&5 +echo "configure:4093: checking for long double support in printf" >&5 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4009,7 +4097,7 @@ else gdb_cv_printf_has_long_double=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then gdb_cv_printf_has_long_double=yes else @@ -4043,7 +4131,7 @@ echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 -echo "configure:4047: checking for long double support in scanf" >&5 +echo "configure:4135: checking for long double support in scanf" >&5 if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4051,7 +4139,7 @@ else gdb_cv_scanf_has_long_double=no else cat > conftest.$ac_ext < 3.14159 && f < 3.14160); } EOF -if { (eval echo configure:4065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then gdb_cv_scanf_has_long_double=yes else @@ -4087,17 +4175,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4091: checking for $ac_hdr" >&5 +echo "configure:4179: checking for $ac_hdr" >&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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4189: \"$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* @@ -4126,12 +4214,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4130: checking for $ac_func" >&5 +echo "configure:4218: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4179,7 +4267,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:4183: checking for working mmap" >&5 +echo "configure:4271: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4187,7 +4275,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -4356,7 +4444,7 @@ if test ${build} = ${host} -a ${host} = ${target} ; then case ${host_os} in hpux*) echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 -echo "configure:4360: checking for HPUX/OSF thread support" >&5 +echo "configure:4448: checking for HPUX/OSF thread support" >&5 if test -f /usr/include/dce/cma_config.h ; then if test "$GCC" = "yes" ; then echo "$ac_t""yes" 1>&6 @@ -4375,7 +4463,7 @@ EOF ;; solaris*) echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 -echo "configure:4379: checking for Solaris thread debugging library" >&5 +echo "configure:4467: checking for Solaris thread debugging library" >&5 if test -f /usr/lib/libthread_db.so.1 ; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -4385,7 +4473,7 @@ EOF CONFIG_OBS="${CONFIG_OBS} sol-thread.o" CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:4389: checking for dlopen in -ldl" >&5 +echo "configure:4477: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4393,7 +4481,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4436,17 +4524,17 @@ fi # all symbols visible in the dynamic symbol table. hold_ldflags=$LDFLAGS echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 -echo "configure:4440: checking for the ld -export-dynamic flag" >&5 +echo "configure:4528: checking for the ld -export-dynamic flag" >&5 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* found=yes else @@ -4465,13 +4553,13 @@ rm -f conftest* # Sun randomly tweaked the prototypes in # at one point. echo $ac_n "checking if is old""... $ac_c" 1>&6 -echo "configure:4469: checking if is old" >&5 +echo "configure:4557: checking if is old" >&5 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4482,7 +4570,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gdb_cv_proc_service_is_old=no else @@ -4803,12 +4891,12 @@ fi # In the cygwin32 environment, we need some additional flags. echo $ac_n "checking for cygwin32""... $ac_c" 1>&6 -echo "configure:4807: checking for cygwin32" >&5 +echo "configure:4895: checking for cygwin32" >&5 if eval "test \"`echo '$''{'gdb_cv_os_cygwin32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 -echo "configure:4871: checking for Tcl configuration" >&5 +echo "configure:4959: 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 @@ -4975,7 +5063,7 @@ if test "${with_tkconfig+set}" = set; then fi echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 -echo "configure:4979: checking for Tk configuration" >&5 +echo "configure:5067: 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 @@ -5071,7 +5159,7 @@ fi no_tcl=true echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 -echo "configure:5075: checking for Tcl private headers. dir=${configdir}" >&5 +echo "configure:5163: 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" @@ -5137,17 +5225,17 @@ fi 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:5141: checking for tclInt.h" >&5 +echo "configure:5229: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5239: \"$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* @@ -5207,7 +5295,7 @@ fi # no_tk=true echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 -echo "configure:5211: checking for Tk private headers" >&5 +echo "configure:5299: 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" @@ -5273,17 +5361,17 @@ fi 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:5277: checking for tk.h" >&5 +echo "configure:5365: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5375: \"$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* @@ -5329,7 +5417,7 @@ fi echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 -echo "configure:5333: checking for Itcl private headers. srcdir=${srcdir}" >&5 +echo "configure:5421: 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 ; do if test -f $i/src/itcl.h ; then @@ -5352,7 +5440,7 @@ fi echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6 -echo "configure:5356: checking for Tix private headers. srcdir=${srcdir}" >&5 +echo "configure:5444: 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 @@ -5446,7 +5534,7 @@ fi # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:5450: checking for X" >&5 +echo "configure:5538: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -5508,12 +5596,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5605: \"$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* @@ -5582,14 +5670,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -5709,47 +5797,6 @@ esac fi # end-sanitize-sky -echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 -echo "configure:5714: checking for wctype in -lw" >&5 -ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lw $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -lw" -else - echo "$ac_t""no" 1>&6 -fi - - @@ -5893,7 +5940,7 @@ links="${links} nm.h" fi # start-sanitize-gdbtk echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:5897: checking whether ln -s works" >&5 +echo "configure:5944: 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 @@ -5928,19 +5975,19 @@ fi echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6 -echo "configure:5932: checking for Cygwin32 environment" >&5 +echo "configure:5979: checking for Cygwin32 environment" >&5 if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_cygwin32=yes else @@ -5957,19 +6004,19 @@ echo "$ac_t""$am_cv_cygwin32" 1>&6 CYGWIN32= test "$am_cv_cygwin32" = yes && CYGWIN32=yes echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6 -echo "configure:5961: checking for Mingw32 environment" >&5 +echo "configure:6008: checking for Mingw32 environment" >&5 if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_mingw32=yes else @@ -5988,7 +6035,7 @@ test "$am_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:5992: checking for executable suffix" >&5 +echo "configure:6039: checking for executable suffix" >&5 if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else diff --git a/gdb/configure.in b/gdb/configure.in index 4c5272d4212..71d4ed1cfd6 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -113,6 +113,13 @@ fi dnl See if host has libm. This is usually needed by simulators. AC_CHECK_LIB(m, main) +dnl Solaris puts wctype in /usr/lib/libw.a before Solaris 2.6. +dnl +dnl A bug in GNU ld 2.9.1 causes a problem if we link in -lw +dnl under Solaris 2.6 because it is some funky empty library. +dnl So only link in libw if we have to. +AC_CHECK_LIB(c, wctype,: ,AC_CHECK_LIB(w, wctype)) + dnl See if compiler supports "long long" type. AC_MSG_CHECKING(for long long support in compiler) @@ -677,9 +684,6 @@ AC_ARG_WITH(sim-funit, esac])dnl # end-sanitize-sky -dnl Solaris puts wctype in /usr/lib/libw.a -AC_CHECK_LIB(w, wctype, [LIBS="$LIBS -lw"]) - AC_SUBST(ENABLE_CFLAGS) AC_SUBST(CONFIG_OBS) diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h index c298b1d288d..1e33513bd91 100644 --- a/gdb/gdbthread.h +++ b/gdb/gdbthread.h @@ -50,6 +50,4 @@ extern void save_infrun_state PARAMS ((int, CORE_ADDR, CORE_ADDR, char *, /* Commands with a prefix of `thread'. */ extern struct cmd_list_element *thread_cmd_list; -extern void _initialize_thread PARAMS ((void)); - #endif /* GDBTHREAD_H */ diff --git a/gdb/thread.c b/gdb/thread.c index 23202dbcf5f..149109d57c0 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -58,32 +58,29 @@ struct thread_info static struct thread_info *thread_list = NULL; static int highest_thread_num; -static void -thread_command PARAMS ((char * tidstr, int from_tty)); +/* Prototypes for exported functions. */ -static void -prune_threads PARAMS ((void)); +void _initialize_thread PARAMS ((void)); -static void -switch_to_thread PARAMS ((int pid)); +/* Prototypes for local functions. */ -static struct thread_info * -find_thread_id PARAMS ((int num)); +static void thread_command PARAMS ((char * tidstr, int from_tty)); -static void -info_threads_command PARAMS ((char *, int)); +static void prune_threads PARAMS ((void)); -static void -restore_current_thread PARAMS ((int)); +static void switch_to_thread PARAMS ((int pid)); -static void -thread_apply_all_command PARAMS ((char *, int)); +static struct thread_info *find_thread_id PARAMS ((int num)); -static void -thread_apply_command PARAMS ((char *, int)); +static void info_threads_command PARAMS ((char *, int)); -static int -thread_alive PARAMS ((struct thread_info *)); +static void restore_current_thread PARAMS ((int)); + +static void thread_apply_all_command PARAMS ((char *, int)); + +static void thread_apply_command PARAMS ((char *, int)); + +static int thread_alive PARAMS ((struct thread_info *)); void init_thread_list () diff --git a/gdb/values.c b/gdb/values.c index 7b1b732538e..efa6f40a016 100644 --- a/gdb/values.c +++ b/gdb/values.c @@ -1,5 +1,5 @@ /* Low level packing and unpacking of values for GDB, the GNU Debugger. - Copyright 1986, 1987, 1989, 1991, 1993, 1994, 1995, 1996, 1997 + Copyright 1986, 87, 89, 91, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. This file is part of GDB. @@ -32,7 +32,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "scm-lang.h" #include "demangle.h" -/* Local function prototypes. */ +/* Prototypes for exported functions. */ + +void _initialize_values PARAMS ((void)); + +/* Prototypes for local functions. */ static value_ptr value_headof PARAMS ((value_ptr, struct type *, struct type *));