diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | gdb/testsuite/Makefile.in | 2 | ||||
-rwxr-xr-x | gdb/testsuite/configure | 97 | ||||
-rw-r--r-- | gdb/testsuite/configure.in | 3 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/maint.exp | 13 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/reread.exp | 7 | ||||
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 10 |
7 files changed, 137 insertions, 6 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index ece06ba..71af354 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,16 @@ 2000-11-17 Nick Duffek <nsd@redhat.com> + * configure.in: Add AC_EXEEXT. + * configure: Regenerate. + * Makefile.in (just-check): Export EXEEXT. + * lib/gdb.exp ($EXEEXT): Import from environment. + * gdb.base/maint.exp: Expect $EXEEXT in executable name. Don't + expect "maint dump-me" on Cygwin. + * gdb.base/reread.exp ($binfile, $binfile1, $binfile2): Append + $EXEEXT. + +2000-11-17 Nick Duffek <nsd@redhat.com> + * gdb.base/break.exp: Test backtrace and finish from called function on all platforms, not just HP-UX. diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in index c3b94f7..fe7891c 100644 --- a/gdb/testsuite/Makefile.in +++ b/gdb/testsuite/Makefile.in @@ -31,6 +31,7 @@ target_canonical = @target@ target_cpu = @gdb_target_cpu@ SHELL = @SHELL@ +EXEEXT = @EXEEXT@ SUBDIRS = @subdirs@ RPATH_ENVVAR = @RPATH_ENVVAR@ @@ -125,6 +126,7 @@ just-check: rootme=`pwd`; export rootme; \ srcdir=${srcdir} ; export srcdir ; \ EXPECT=${EXPECT} ; export EXPECT ; \ + EXEEXT=${EXEEXT} ; export EXEEXT ; \ $(RPATH_ENVVAR)=$$rootme/../../expect:$$rootme/../../libstdc++:$$rootme/../../tk/unix:$$rootme/../../tcl/unix:$$rootme/../../bfd:$$rootme/../../opcodes:$$$(RPATH_ENVVAR); \ export $(RPATH_ENVVAR); \ if [ -f $${rootme}/../../expect/expect ] ; then \ diff --git a/gdb/testsuite/configure b/gdb/testsuite/configure index eaa227c..ba66f40 100755 --- a/gdb/testsuite/configure +++ b/gdb/testsuite/configure @@ -748,6 +748,102 @@ if test "${enable_gdbtk}" = "yes"; then fi # End stuff to support --enable-shared +echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 +echo "configure:753: checking for Cygwin environment" >&5 +if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 758 "configure" +#include "confdefs.h" + +int main() { + +#ifndef __CYGWIN__ +#define __CYGWIN__ __CYGWIN32__ +#endif +return __CYGWIN__; +; return 0; } +EOF +if { (eval echo configure:769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_cygwin=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_cygwin=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_cygwin" 1>&6 +CYGWIN= +test "$ac_cv_cygwin" = yes && CYGWIN=yes +echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 +echo "configure:786: checking for mingw32 environment" >&5 +if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 791 "configure" +#include "confdefs.h" + +int main() { +return __MINGW32__; +; return 0; } +EOF +if { (eval echo configure:798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_mingw32=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_mingw32=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_mingw32" 1>&6 +MINGW32= +test "$ac_cv_mingw32" = yes && MINGW32=yes + + +echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +echo "configure:817: checking for executable suffix" >&5 +if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$CYGWIN" = yes || test "$MINGW32" = yes; then + ac_cv_exeext=.exe +else + rm -f conftest* + echo 'int main () { return 0; }' > conftest.$ac_ext + ac_cv_exeext= + if { (eval echo configure:827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + for file in conftest.*; do + case $file in + *.c | *.o | *.obj | *.ilk | *.pdb) ;; + *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done + else + { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } + fi + rm -f conftest* + test x"${ac_cv_exeext}" = x && ac_cv_exeext=no +fi +fi + +EXEEXT="" +test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} +echo "$ac_t""${ac_cv_exeext}" 1>&6 +ac_exeext=$EXEEXT + + # configure the subdirectories too subdirs="$configdirs" @@ -913,6 +1009,7 @@ s%@build_cpu@%$build_cpu%g s%@build_vendor@%$build_vendor%g s%@build_os@%$build_os%g s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g +s%@EXEEXT@%$EXEEXT%g s%@subdirs@%$subdirs%g CEOF diff --git a/gdb/testsuite/configure.in b/gdb/testsuite/configure.in index c126ba7..446c8d1 100644 --- a/gdb/testsuite/configure.in +++ b/gdb/testsuite/configure.in @@ -106,6 +106,9 @@ if test "${enable_gdbtk}" = "yes"; then fi # End stuff to support --enable-shared +dnl Check for exe extension set on certain hosts (e.g. Win32) +AC_EXEEXT + # configure the subdirectories too AC_CONFIG_SUBDIRS($configdirs) diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp index 4bf00e5..2940882 100644 --- a/gdb/testsuite/gdb.base/maint.exp +++ b/gdb/testsuite/gdb.base/maint.exp @@ -198,7 +198,7 @@ set keep_looking 1 while {$keep_looking} { gdb_expect { - -re ".*Object file.*break: Objfile at $hex, bfd at $hex, \[0-9\]* minsyms\[\r\t \]+\n" { set header 1 } + -re ".*Object file.*break$EXEEXT: Objfile at $hex, bfd at $hex, \[0-9\]* minsyms\[\r\t \]+\n" { set header 1 } -re ".*Psymtabs:\[\r\t \]+\n" { set psymtabs 1 } -re ".*Symtabs:\[\r\t \]+\n" { set symtabs 1 } @@ -377,7 +377,7 @@ set timeout [expr $timeout + 300] # send_gdb "maint info sections\n" gdb_expect { - -re "Exec file:\r\n.*break., file type.*$gdb_prompt $"\ + -re "Exec file:\r\n.*break$EXEEXT., file type.*$gdb_prompt $"\ { pass "maint info sections" } -re ".*$gdb_prompt $" { fail "maint info sections" } timeout { fail "(timeout) maint info sections" } @@ -443,7 +443,7 @@ set timeout $oldtimeout send_gdb "help maint\n" gdb_expect { - -re "Commands for use by GDB maintainers\\..*Includes commands to dump specific internal GDB structures in.*a human readable form, to cause GDB to deliberately dump core,.*to test internal functions such as the C.. demangler, etc\\..*List of maintenance subcommands:.*maintenance check-symtabs.*maintenance demangle.*maintenance dump-me.*maintenance info.*maintenance internal-error.*maintenance print.*maintenance space.*maintenance time.*Type.*help maintenance.*followed by maintenance subcommand name for full documentation\\..*Command name abbreviations are allowed if unambiguous\\..*$gdb_prompt $"\ + -re "Commands for use by GDB maintainers\\..*Includes commands to dump specific internal GDB structures in.*a human readable form, to cause GDB to deliberately dump core,.*to test internal functions such as the C.. demangler, etc\\..*List of maintenance subcommands:.*maintenance check-symtabs.*maintenance demangle.*(maintenance dump-me.*)?maintenance info.*maintenance internal-error.*maintenance print.*maintenance space.*maintenance time.*Type.*help maintenance.*followed by maintenance subcommand name for full documentation\\..*Command name abbreviations are allowed if unambiguous\\..*$gdb_prompt $"\ { pass "help maint" } -re ".*$gdb_prompt $" { fail "help maint" } timeout { fail "(timeout) help maint" } @@ -482,6 +482,10 @@ gdb_expect { timeout { fail "(timeout) help maint demangle" } } +# dump-me is disabled ifdef _WIN32. +if [ishost *cygwin*] { + setup_xfail "*-*-*" +} send_gdb "help maint dump-me\n" gdb_expect { -re "Get fatal error; make debugger dump its core\\.\r\nGDB sets it's handling of SIGQUIT back to SIG_DFL and then sends\r\nitself a SIGQUIT signal\\..*$gdb_prompt $"\ @@ -608,6 +612,9 @@ gdb_expect { #set oldtimeout $timeout #set timeout [expr $timeout + 300] +if [ishost *cygwin*] { + setup_xfail "*-*-*" +} send_gdb "maint dump-me\n" gdb_expect { -re "Should GDB dump core.*\\(y or n\\) $"\ diff --git a/gdb/testsuite/gdb.base/reread.exp b/gdb/testsuite/gdb.base/reread.exp index ccdabd5..b76fc5a 100644 --- a/gdb/testsuite/gdb.base/reread.exp +++ b/gdb/testsuite/gdb.base/reread.exp @@ -30,7 +30,8 @@ set prototypes 1 set testfile1 "reread1" set srcfile1 ${testfile1}.c -set binfile1 ${objdir}/${subdir}/${testfile1} +# Cygwin needs $EXEEXT. +set binfile1 ${objdir}/${subdir}/${testfile1}$EXEEXT if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile1}" executable {debug additional_flags=-w}] != "" } { gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." @@ -40,7 +41,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile1}" executable {d set testfile2 "reread2" set srcfile2 ${testfile2}.c -set binfile2 ${objdir}/${subdir}/${testfile2} +set binfile2 ${objdir}/${subdir}/${testfile2}$EXEEXT if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable {debug additional_flags=-w}] != "" } { gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." @@ -49,7 +50,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable {d # Start with a fresh gdb. set testfile "reread" -set binfile ${objdir}/${subdir}/${testfile} +set binfile ${objdir}/${subdir}/${testfile}$EXEEXT gdb_start gdb_reinitialize_dir $srcdir/$subdir diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 594bf9e..c7990d1 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -63,6 +63,16 @@ if ![info exists gdb_prompt] then { set gdb_prompt "\[(\]gdb\[)\]" } +# Needed for some tests under Cygwin. +global EXEEXT +global env + +if ![info exists env(EXEEXT)] { + set EXEEXT "" +} else { + set EXEEXT $env(EXEEXT) +} + ### Only procedures should come after this point. # |