* 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>
+
+ * 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
target_cpu = @gdb_target_cpu@
SHELL = @SHELL@
+EXEEXT = @EXEEXT@
SUBDIRS = @subdirs@
RPATH_ENVVAR = @RPATH_ENVVAR@
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 \
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"
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
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)
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 }
#
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" }
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" }
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 $"\
#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\\) $"\
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."
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."
# 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
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.
#