]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2003-08-07 Elena Zannoni <ezannoni@redhat.com>
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>
Thu, 7 Aug 2003 18:16:42 +0000 (18:16 +0000)
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>
Thu, 7 Aug 2003 18:16:42 +0000 (18:16 +0000)
       * gdb.base/completion.exp: Remove reduntant completion test
       on filename.

2003-08-07  Elena Zannoni  <ezannoni@redhat.com>

        * gdb.base/attach.exp, gdb.base/detach.exp, gdb.base/gcore.exp,
        gdb.mi/mi-basics.exp, gdb.threads/gcore-thread.exp,
        gdb.trace/save-trace.exp: Make sure that full pathnames are
        escaped correctly.

2003-08-07  Elena Zannoni  <ezannoni@redhat.com>

        * configure.in: Don't generate config.h from config.hin.
        * configure: Regenerate.
        * config.hin: Remove file.
        * gdb.mi/pthreads.c: Remove include of config.h, and other ifdefs.
        * gdb.threads/pthreads.c: Ditto.

13 files changed:
gdb/testsuite/ChangeLog
gdb/testsuite/config.hin [deleted file]
gdb/testsuite/configure
gdb/testsuite/configure.in
gdb/testsuite/gdb.base/attach.exp
gdb/testsuite/gdb.base/completion.exp
gdb/testsuite/gdb.base/detach.exp
gdb/testsuite/gdb.base/gcore.exp
gdb/testsuite/gdb.mi/mi-basics.exp
gdb/testsuite/gdb.mi/pthreads.c
gdb/testsuite/gdb.threads/gcore-thread.exp
gdb/testsuite/gdb.threads/pthreads.c
gdb/testsuite/gdb.trace/save-trace.exp

index b1896573f02c46e4eb47f5e60086c0c7a3c3e4b8..e5cb7facba613182050eb45db4b9420c98c98546 100644 (file)
@@ -1,3 +1,23 @@
+2003-08-07  Elena Zannoni  <ezannoni@redhat.com>
+
+       * gdb.base/completion.exp: Remove reduntant completion test
+       on filename.
+
+2003-08-07  Elena Zannoni  <ezannoni@redhat.com>
+
+        * gdb.base/attach.exp, gdb.base/detach.exp, gdb.base/gcore.exp,
+        gdb.mi/mi-basics.exp, gdb.threads/gcore-thread.exp,
+        gdb.trace/save-trace.exp: Make sure that full pathnames are
+        escaped correctly.
+
+2003-08-07  Elena Zannoni  <ezannoni@redhat.com>
+        
+        * configure.in: Don't generate config.h from config.hin.
+        * configure: Regenerate.
+        * config.hin: Remove file.
+        * gdb.mi/pthreads.c: Remove include of config.h, and other ifdefs.
+        * gdb.threads/pthreads.c: Ditto.
+
 2003-08-07  Daniel Jacobowitz  <drow@mvista.com>
 
        From Kei Sakamoto <sakamoto.kei@renesas.com>:
diff --git a/gdb/testsuite/config.hin b/gdb/testsuite/config.hin
deleted file mode 100644 (file)
index 1333b97..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-/* config.hin.  Generated automatically from configure.in by autoheader.  */
-
-/* Define if you have the <pthread.h> header file.  */
-#undef HAVE_PTHREAD_H
index 31e3a079f955ad4a82ff0f817fcde10f1d705937..eb505fe52cd393da3da1708ac2b594b16b1ffa91 100755 (executable)
@@ -34,6 +34,7 @@ program_suffix=NONE
 program_transform_name=s,x,x,
 silent=
 site=
+sitefile=
 srcdir=
 target=NONE
 verbose=
@@ -148,6 +149,7 @@ Configuration:
   --help                  print this message
   --no-create             do not create output files
   --quiet, --silent       do not print \`checking...' messages
+  --site-file=FILE        use FILE as the site file
   --version               print the version of autoconf that created configure
 Directory and file names:
   --prefix=PREFIX         install architecture-independent files in PREFIX
@@ -318,6 +320,11 @@ EOF
   -site=* | --site=* | --sit=*)
     site="$ac_optarg" ;;
 
+  -site-file | --site-file | --site-fil | --site-fi | --site-f)
+    ac_prev=sitefile ;;
+  -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+    sitefile="$ac_optarg" ;;
+
   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
     ac_prev=srcdir ;;
   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -483,12 +490,16 @@ fi
 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
 
 # Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+if test -z "$sitefile"; then
+  if test -z "$CONFIG_SITE"; then
+    if test "x$prefix" != xNONE; then
+      CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+    else
+      CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+    fi
   fi
+else
+  CONFIG_SITE="$sitefile"
 fi
 for ac_site_file in $CONFIG_SITE; do
   if test -r "$ac_site_file"; then
@@ -528,7 +539,6 @@ fi
 
 
 
-
 ac_aux_dir=
 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
   if test -f $ac_dir/install-sh; then
@@ -549,7 +559,7 @@ ac_config_sub=$ac_aux_dir/config.sub
 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:553: checking build system type" >&5
+echo "configure:563: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -573,7 +583,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:577: checking host system type" >&5
+echo "configure:587: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -594,7 +604,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:598: checking target system type" >&5
+echo "configure:608: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -709,7 +719,7 @@ fi
 
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:713: checking how to run the C preprocessor" >&5
+echo "configure:723: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -724,13 +734,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 728 "configure"
+#line 738 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:744: \"$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
   :
@@ -741,13 +751,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 745 "configure"
+#line 755 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:761: \"$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
   :
@@ -758,13 +768,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 762 "configure"
+#line 772 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:778: \"$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
   :
@@ -792,17 +802,17 @@ for ac_hdr in pthread.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:796: checking for $ac_hdr" >&5
+echo "configure:806: 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
-#line 801 "configure"
+#line 811 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:816: \"$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*
@@ -830,12 +840,12 @@ done
 
 
 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:834: checking for Cygwin environment" >&5
+echo "configure:844: 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 839 "configure"
+#line 849 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -846,7 +856,7 @@ int main() {
 return __CYGWIN__;
 ; return 0; }
 EOF
-if { (eval echo configure:850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cygwin=yes
 else
@@ -863,19 +873,19 @@ 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:867: checking for mingw32 environment" >&5
+echo "configure:877: 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 872 "configure"
+#line 882 "configure"
 #include "confdefs.h"
 
 int main() {
 return __MINGW32__;
 ; return 0; }
 EOF
-if { (eval echo configure:879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mingw32=yes
 else
@@ -894,7 +904,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
 
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:898: checking for executable suffix" >&5
+echo "configure:908: checking for executable suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -904,10 +914,10 @@ else
   rm -f conftest*
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
-      *.c | *.o | *.obj) ;;
+      *.c | *.o | *.obj | *.ilk | *.pdb) ;;
       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
       esac
     done
@@ -990,7 +1000,19 @@ fi
 
 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
 
-DEFS=-DHAVE_CONFIG_H
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[    `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
 
 # Without the "./", some shells look in PATH for config.status.
 : ${CONFIG_STATUS=./config.status}
@@ -1029,7 +1051,7 @@ ac_given_srcdir=$srcdir
 
 trap 'rm -fr `echo "Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile \
   gdb.c++/Makefile gdb.disasm/Makefile gdb.java/Makefile gdb.mi/Makefile \
-  gdb.objc/Makefile gdb.threads/Makefile gdb.trace/Makefile config.h:config.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+  gdb.objc/Makefile gdb.threads/Makefile gdb.trace/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
@@ -1177,113 +1199,6 @@ s%@top_srcdir@%$top_srcdir%g
 fi; done
 rm -f conftest.s*
 
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([  ]*\)#\([        ]*define[       ][      ]*\)'
-ac_dB='\([     ][      ]*\)[^  ]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([  ]*\)#\([        ]*\)undef\([    ][      ]*\)'
-ac_uB='\([     ]\)%\1#\2define\3'
-ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([  ]*\)#\([        ]*\)undef\([    ][      ]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
-  CONFIG_HEADERS="config.h:config.hin"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  echo creating $ac_file
-
-  rm -f conftest.frag conftest.in conftest.out
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h.  And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
-
-# This sed command replaces #undef with comments.  This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-s%^[   ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
-
-rm -f conftest.tail
-while :
-do
-  ac_lines=`grep -c . conftest.vals`
-  # grep -c gives empty output for an empty file on some AIX systems.
-  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
-  # Write a limited-size here document to conftest.frag.
-  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
-  echo 'CEOF
-  sed -f conftest.frag conftest.in > conftest.out
-  rm -f conftest.in
-  mv conftest.out conftest.in
-' >> $CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
-  rm -f conftest.vals
-  mv conftest.tail conftest.vals
-done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
-  rm -f conftest.frag conftest.h
-  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
-  cat conftest.in >> conftest.h
-  rm -f conftest.in
-  if cmp -s $ac_file conftest.h 2>/dev/null; then
-    echo "$ac_file is unchanged"
-    rm -f conftest.h
-  else
-    # Remove last slash and all that follows it.  Not all systems have dirname.
-      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-      # The file is in a subdirectory.
-      test ! -d "$ac_dir" && mkdir "$ac_dir"
-    fi
-    rm -f $ac_file
-    mv conftest.h $ac_file
-  fi
-fi; done
-
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
index f80b623cd364411bdf4adbaa62e20e0da027dc0d..14300ec0944b44ff530dc0bd99eb285cabd4edc9 100644 (file)
@@ -21,7 +21,6 @@
 
 AC_PREREQ(2.13)
 AC_INIT(gdb.base)
-AC_CONFIG_HEADER(config.h:config.hin)
 
 AC_CANONICAL_BUILD
 AC_CANONICAL_HOST
index 66e9f0ec31164b09aa127f9cd952a3a25adbea79..ea11087f8af91d4045150989ca041eb38bf06de8 100644 (file)
@@ -45,6 +45,7 @@ set srcfile  ${testfile}.c
 set srcfile2 ${testfile}2.c
 set binfile  ${objdir}/${subdir}/${testfile}
 set binfile2 ${objdir}/${subdir}/${testfile}2
+set escapedbinfile  [string_to_regexp ${objdir}/${subdir}/${testfile}]
 set cleanupfile ${objdir}/${subdir}/${testfile}.awk
 
 #execute_anywhere "rm -f ${binfile} ${binfile2}"
@@ -76,6 +77,7 @@ if [get_compiler_info ${binfile}] {
 proc do_attach_tests {} {
    global gdb_prompt
    global binfile
+   global escapedbinfile
    global srcfile
    global testfile
    global objdir
@@ -157,13 +159,13 @@ proc do_attach_tests {} {
       -re "Load new symbol table from.*y or n.*$" {
          send_gdb "y\n"
          gdb_expect {
-            -re "Reading symbols from $binfile\.\.\.*done.*$gdb_prompt $"\
+            -re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $"\
                             {pass "(re)set file, before attach1"}
             -re "$gdb_prompt $" {fail "(re)set file, before attach1"}
             timeout         {fail "(timeout) (re)set file, before attach1"}
          }
       }
-      -re "Reading symbols from $binfile\.\.\.*done.*$gdb_prompt $"\
+      -re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $"\
                       {pass "set file, before attach1"}
       -re "$gdb_prompt $" {fail "set file, before attach1"}
       timeout         {fail "(timeout) set file, before attach1"}
@@ -171,7 +173,7 @@ proc do_attach_tests {} {
 
    send_gdb "attach $testpid\n"
    gdb_expect {
-      -re "Attaching to program.*`?$binfile'?, process $testpid.*main.*at .*$srcfile:.*$gdb_prompt $"\
+      -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*main.*at .*$srcfile:.*$gdb_prompt $"\
                       {pass "attach1, after setting file"}
       -re "$gdb_prompt $" {fail "attach1, after setting file"}
       timeout         {fail "(timeout) attach1, after setting file"}
@@ -192,7 +194,7 @@ proc do_attach_tests {} {
    #
    send_gdb "detach\n"
    gdb_expect {
-      -re "Detaching from program: .*$binfile.*$gdb_prompt $"\
+      -re "Detaching from program: .*$escapedbinfile.*$gdb_prompt $"\
                       {pass "attach1 detach"}
       -re "$gdb_prompt $" {fail "attach1 detach"}
       timeout         {fail "(timeout) attach1 detach"}
@@ -234,7 +236,7 @@ proc do_attach_tests {} {
    #
    send_gdb "attach $testpid\n"
    gdb_expect {
-      -re "Attaching to process $testpid.*Reading symbols from $binfile.*main.*at .*$gdb_prompt $"\
+      -re "Attaching to process $testpid.*Reading symbols from $escapedbinfile.*main.*at .*$gdb_prompt $"\
                       {pass "attach2"}
       -re "$gdb_prompt $" {fail "attach2"}
       timeout         {fail "(timeout) attach2"}
@@ -335,7 +337,7 @@ proc do_attach_tests {} {
 
    send_gdb "attach $testpid\n"
    gdb_expect {
-      -re "Attaching to process $testpid.*Reading symbols from $binfile.*main.*at .*$gdb_prompt $"\
+      -re "Attaching to process $testpid.*Reading symbols from $escapedbinfile.*main.*at .*$gdb_prompt $"\
                       {pass "attach when process' a.out not in cwd"}
       -re "$gdb_prompt $" {fail "attach when process' a.out not in cwd"}
       timeout         {fail "(timeout) attach when process' a.out not in cwd"}
index 9c721b113f6601ba943f963effb12b7fb7978c92..7ad6966f148c56790456c18c7afb724ab4af572e 100644 (file)
@@ -611,7 +611,7 @@ gdb_expect  {
 }
 
 
-# The following tests used to simply try to complete `${objdir}/Make',
+# The following tests used to simply try to complete `${objdir}/file',
 # and so on.  The problem is that ${objdir} can be very long; the
 # completed filename may be more than eighty characters wide.  When
 # this happens, readline tries to manage things, producing output that
@@ -619,7 +619,7 @@ gdb_expect  {
 # recognize.
 #
 # In the case that motivated this change, the (gdb) prompt occupied
-# the leftmost six columns, and `${objdump}/' was seventy-four
+# the leftmost six columns, and `${objdir}/' was seventy-four
 # characters long --- eighty in all.  After printing the slash,
 # readline emitted a space, a carriage return, and then `Makefile'
 # (the tab character being received as input after `Make'.
@@ -631,36 +631,6 @@ gdb_expect  {
 #
 # So, we avoid long lines.  We `cd' to ${objdir} first, and then do
 # the completion relative to the current directory.
-#
-# Note that if we are building in the source tree, then there will be
-# more than one completion for ./Make, so we need to handle that also.
-# A better long term solution might be to create a temporary directory,
-# populate it with a set of known names, and use that directory to
-# test completions.
-
-gdb_test "cd ${objdir}" "Working directory ${objdir}.*" "cd to \${objdir}"
-send_gdb "file ./Make\t"
-sleep 1
-gdb_expect  {
-        -re "^file ./Make(\\\x07|)file.*$"\
-            { send_gdb "\n"
-              gdb_expect {
-                      -re "\r\nA program is being debugged already\\.  Kill it\\? \\(y or n\\) $"\
-                      { send_gdb "n\n"
-                        gdb_expect {
-                                -re "\r\nProgram not killed\\.\r\n$gdb_prompt $"\
-                                        { pass "complete 'file ./Make'"}
-                                -re ".*$gdb_prompt $" { fail "complete 'file ./Make'"}
-                                timeout           {fail "(timeout) complete 'file ./Make'"}
-                               }
-                      }
-                      -re ".*$gdb_prompt $" { fail "complete 'file ./Make'"}
-                      timeout           {fail "(timeout) complete 'file ./Make'"}
-                     }
-            }
-        -re ".*$gdb_prompt $"       { fail "complete 'file ./Make'" }
-        timeout         { fail "(timeout) complete 'file ./Make'" }
-        }
 
 # ${srcdir} may be a relative path.  We want to make sure we end up
 # in the right directory - so make sure we know where it is.
index 1556cf9cb53effda8ebd53ff4eaad01f19314f81..1f86fecfca1588d1b6f90ad73f6aff5847e2efa4 100644 (file)
@@ -40,6 +40,7 @@ if [is_remote target] then {
 set testfile "attach"
 set srcfile  ${testfile}.c
 set binfile  ${objdir}/${subdir}/${testfile}
+set escapedbinfile  [string_to_regexp ${objdir}/${subdir}/${testfile}]
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
      gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
@@ -48,12 +49,13 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
 proc do_detach_tests {} {
   global srcdir
   global binfile
+  global escapedbinfile
   global subdir
   global pass
 
   runto_main
   gdb_test "set should_exit = 1" "" "set should_exit, $pass"
-  gdb_test "detach" "Detaching from program: .*$binfile, .*" "detach, $pass"
+  gdb_test "detach" "Detaching from program: .*$escapedbinfile, .*" "detach, $pass"
 }
 
 # Start with a fresh gdb
index f8d5baac61458352646edd7736b76851c074e270..8c0ae8eb5c46c1f178dee3ff0805b7418e92c5b0 100644 (file)
@@ -104,8 +104,10 @@ set pre_corefile_local_array \
 set pre_corefile_extern_array \
        [capture_command_output "print extern_array" "$print_prefix"]
 
+set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore.test]
+
 gdb_test "gcore ${objdir}/${subdir}/gcore.test" \
-       "Saved corefile ${objdir}/${subdir}/gcore.test" \
+       "Saved corefile ${escapedfilename}" \
        "save a corefile"
 
 # Now restart gdb and load the corefile.
index 98ffe1d2acfec77909dfc971c065620475bacace..9377baf9e6c0afa209ae2c71cce436de3008ac34 100644 (file)
@@ -40,6 +40,9 @@ if [mi_gdb_start] {
 set testfile "basics"
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
+set escapedobjdir [string_to_regexp ${objdir}]
+set escapedsrcdir [string_to_regexp ${srcdir}]
+
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
      gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
 }
@@ -154,25 +157,25 @@ proc test_dir_specification {} {
     # -environment-directory 
     # -environment-directory -r
 
-#exp_internal 1
+    set envirodir [string_to_regexp ${srcdir}/${subdir}]
+
     mi_gdb_test "202-environment-directory ${srcdir}/${subdir}" \
-             "\\\^done,source-path=\"${srcdir}/${subdir}.\\\$cdir.\\\$cwd\"" \
+             "\\\^done,source-path=\"${envirodir}.\\\$cdir.\\\$cwd\"" \
              "environment-directory arg operation"
 
     mi_gdb_test "203-environment-directory" \
-             "\\\^done,source-path=\"${srcdir}/${subdir}.\\\$cdir.\\\$cwd\"" \
+             "\\\^done,source-path=\"${envirodir}.\\\$cdir.\\\$cwd\"" \
              "environment-directory empty-string operation"
 
     mi_gdb_test "204-environment-directory -r" \
              "\\\^done,source-path=\"\\\$cdir.\\\$cwd\"" \
              "environment-directory operation"
-
-#exp_internal 0
 }
 
 proc test_cwd_specification {} {
     global mi_gdb_prompt
     global objdir
+    global escapedobjdir
     global subdir
 
     # Change the working directory, then print the current working directory
@@ -185,7 +188,7 @@ proc test_cwd_specification {} {
              "environment-cd arg operation"
 
     mi_gdb_test "206-environment-pwd" \
-             "\\\^done,cwd=\"${objdir}\"" \
+             "\\\^done,cwd=\"${escapedobjdir}\"" \
              "environment-pwd operation"
 }
 
@@ -194,6 +197,8 @@ proc test_path_specification {} {
     global orig_path
     global objdir
     global srcdir
+    global escapedobjdir
+    global escapedsrcdir
 
     # Add to the path, display, then reset 
     # Tests:
@@ -202,8 +207,6 @@ proc test_path_specification {} {
     # -environment-path -r dir
     # -environment-path -r
 
-#exp_internal 1
-
     send_gdb "-environment-path\n"
     gdb_expect 20 {
        -re "\\\^done,path=\"\(.*\)\"\r\n$mi_gdb_prompt" { 
@@ -220,18 +223,17 @@ proc test_path_specification {} {
              "environment-path no-args operation"
 
     mi_gdb_test "208-environment-path $srcdir $objdir" \
-             "\\\^done,path=\"$srcdir.$objdir.$orig_path\"" \
+             "\\\^done,path=\"$escapedsrcdir.$escapedobjdir.$orig_path\"" \
              "environment-path dir1 dir2 operation"
 
     mi_gdb_test "209-environment-path -r $objdir" \
-             "\\\^done,path=\"$objdir.$orig_path\"" \
+             "\\\^done,path=\"$escapedobjdir.$orig_path\"" \
              "environment-path -r dir operation"
 
     mi_gdb_test "210-environment-path -r" \
              "\\\^done,path=\"$orig_path\"" \
              "environment-path -r operation"
 
-#exp_internal 0
 } 
 
 if [test_mi_interpreter_selection] {
index c3e17bc6ace608d406909cbba49d0fdf92ce1116..1ba5a15f9fd74df0eff7568baa1429c10c625fac 100644 (file)
@@ -1,26 +1,4 @@
 #include <stdio.h>
-
-#include "config.h"
-
-#ifndef HAVE_PTHREAD_H
-
-/* Don't even try to compile.  In fact, cause a syntax error that we can
-   look for as a compiler error message and know that we have no pthread
-   support.  In that case we can just suppress the test completely. */
-
-#error "no posix threads support"
-
-#else
-
-/* OK.  We have the right header.  If we try to compile this and fail, then
-   there is something wrong and the user should know about it so the testsuite
-   should issue an ERROR result.. */
-
-#ifdef __linux__
-#define  _MIT_POSIX_THREADS 1  /* GNU/Linux (or at least RedHat 4.0)
-                                   needs this */
-#endif
-
 #include <pthread.h>
 
 /* Under OSF 2.0 & 3.0 and HPUX 10, the second arg of pthread_create
@@ -77,4 +55,3 @@ main (int argc, char *argv[])
   return 0;
 }
 
-#endif /* ifndef HAVE_PTHREAD_H */
index 8184fa52d0bcd052b1002a8e1de23120d17fb258..5cb80bd7c79bebf7c9f7f75442285ef9b807264d 100644 (file)
@@ -103,9 +103,10 @@ delete_breakpoints
 gdb_breakpoint "thread2"
 gdb_test "continue" "Continuing.*Breakpoint.* thread2 .*" "thread 2 is running"
 
+set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore.test]
 # Drop corefile
 gdb_test "gcore ${objdir}/${subdir}/gcore.test" \
-       "Saved corefile ${objdir}/${subdir}/gcore.test" \
+       "Saved corefile ${escapedfilename}" \
        "save a corefile"
 
 # Now restart gdb and load the corefile.
index b8f126debd016ca8d3d55f0b870797f9c618a55f..fdc03242f42f830816b725ddc2184d3c82f42923 100644 (file)
@@ -1,26 +1,4 @@
 #include <stdio.h>
-
-#include "config.h"
-
-#ifndef HAVE_PTHREAD_H
-
-/* Don't even try to compile.  In fact, cause a syntax error that we can
-   look for as a compiler error message and know that we have no pthread
-   support.  In that case we can just suppress the test completely. */
-
-#error "no posix threads support"
-
-#else
-
-/* OK.  We have the right header.  If we try to compile this and fail, then
-   there is something wrong and the user should know about it so the testsuite
-   should issue an ERROR result.. */
-
-#ifdef __linux__
-#define  _MIT_POSIX_THREADS 1  /* GNU/Linux (or at least RedHat 4.0)
-                                   needs this */
-#endif
-
 #include <pthread.h>
 
 /* Under OSF 2.0 & 3.0 and HPUX 10, the second arg of pthread_create
@@ -168,4 +146,3 @@ main(argc, argv)
   exit(0);
 }
 
-#endif /* ifndef HAVE_PTHREAD_H */
index b461ad8594071f0306df7fc57ee87e7991c970d1..a5b7cf0ccde13e8a22c9cb7d21fb28f2bec7a4a0 100644 (file)
@@ -145,9 +145,10 @@ remote_file host delete savetrace.tr
 
 # 10.3 repeat with a path to the file
 
+set escapedfilename [string_to_regexp $objdir/savetrace.tr]
 remote_file host delete $objdir/savetrace.tr
 gdb_test "save-tracepoints $objdir/savetrace.tr" \
-       "Tracepoints saved to file '$objdir/savetrace.tr'." \
+       "Tracepoints saved to file '${escapedfilename}'." \
        "10.3: save tracepoint definitions, full path"
 
 gdb_delete_tracepoints