Fix a crash in jit.c
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / bigcore.exp
index ac3c5fb745e2ee2028d9a8ee9a5ee55ccd5a9656..93a6faf62e10a49ae5100f5c67fa0fe4d998f390 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1992-2013 Free Software Foundation, Inc.
+# Copyright 1992-2018 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
 # mechanism that would let it efficiently access a remote corefile.
 
 if ![isnative] then {
-    untested "Remote system"
+    untested "remote system"
     return
 }
 
@@ -31,26 +31,18 @@ if ![isnative] then {
 # I/O bandwith.
 
 if { [istarget "*-*-*bsd*"]
-     || [istarget "*-*-hpux*"]
      || [istarget "*-*-solaris*"] 
      || [istarget "*-*-darwin*"] 
      || [istarget "*-*-cygwin*"] } {
-    untested "Kernel lacks sparse corefile support (PR gdb/1551)"
-    return
-}
-
-# This testcase causes too much stress (in terms of memory usage)
-# on certain systems...
-if { [istarget "*-*-*irix*"] } {
-    untested "Testcase too stressful for this system"
+    untested "kernel lacks sparse corefile support (PR gdb/1551)"
     return
 }
 
 standard_testfile .c
-set corefile ${binfile}.corefile
+set corefile [standard_output_file ${binfile}.corefile]
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested bigcore.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -60,8 +52,15 @@ clean_restart ${binfile}
 gdb_test_no_output "set print sevenbit-strings"
 gdb_test_no_output "set width 0"
 
-if { ![runto_main] } then {
-    gdb_suppress_tests
+# Get the core into the output directory.
+if {![is_remote host]} {
+    gdb_test "cd [file dirname $corefile]" "Working directory .*" \
+       "cd to test directory"
+}
+
+if ![runto_main] then {
+    fail "can't run to main"
+    return 0
 }
 set print_core_line [gdb_get_line_number "Dump core"]
 gdb_test "tbreak $print_core_line"
@@ -139,7 +138,7 @@ set timeout $oldtimeout
 # Find the corefile
 set file ""
 foreach pat [list core.${inferior_pid} ${testfile}.core core] {
-    set names [glob -nocomplain $pat]
+    set names [glob -nocomplain [standard_output_file $pat]]
     if {[llength $names] == 1} {
        set file [lindex $names 0]
        remote_exec build "mv $file $corefile"
@@ -148,7 +147,7 @@ foreach pat [list core.${inferior_pid} ${testfile}.core core] {
 }
 
 if { $file == "" } {
-    untested "Can't generate a core file"
+    untested "can't generate a core file"
     return 0
 }
 
@@ -188,7 +187,9 @@ if {! $core_ok} {
 # Now load up that core file
 
 set test "load corefile"
-gdb_test_multiple "core $corefile" "$test" {
+# We use [file tail] because gdb is still "cd"d to the
+# output directory.
+gdb_test_multiple "core [file tail $corefile]" "$test" {
     -re "A program is being debugged already.  Kill it. .y or n. " {
        send_gdb "y\n"
        exp_continue
This page took 0.03334 seconds and 4 git commands to generate.