Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Unified Diff: gdb/testsuite/gdb.base/bigcore.exp

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.base/bigcore.c ('k') | gdb/testsuite/gdb.base/bitfields.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.base/bigcore.exp
diff --git a/gdb/testsuite/gdb.base/bigcore.exp b/gdb/testsuite/gdb.base/bigcore.exp
index 2e05da5dd7e6ec935838cc028a5a4a3e2d1126b7..8464195969566254a0110bced896a9a33a11082c 100644
--- a/gdb/testsuite/gdb.base/bigcore.exp
+++ b/gdb/testsuite/gdb.base/bigcore.exp
@@ -1,5 +1,4 @@
-# Copyright 1992-2000, 2004-2005, 2007-2012 Free Software Foundation,
-# Inc.
+# Copyright 1992-2013 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
@@ -47,10 +46,8 @@ if { [istarget "*-*-*irix*"] } {
return
}
-set testfile "bigcore"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-set corefile ${objdir}/${subdir}/${testfile}.corefile
+standard_testfile .c
+set corefile [standard_output_file ${binfile}.corefile]
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
untested bigcore.exp
@@ -59,15 +56,18 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
# Run GDB on the bigcore program up-to where it will dump core.
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
gdb_test_no_output "set print sevenbit-strings"
gdb_test_no_output "set width 0"
+# 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 {
- gdb_suppress_tests;
+ gdb_suppress_tests
}
set print_core_line [gdb_get_line_number "Dump core"]
gdb_test "tbreak $print_core_line"
@@ -104,7 +104,7 @@ proc extract_heap { dir } {
fail "$test (timeout)"
}
}
- return $heap;
+ return $heap
}
set next_heap [extract_heap next]
set prev_heap [extract_heap prev]
@@ -145,7 +145,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"
@@ -194,7 +194,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
« no previous file with comments | « gdb/testsuite/gdb.base/bigcore.c ('k') | gdb/testsuite/gdb.base/bitfields.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698