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

Unified Diff: gdb/testsuite/gdb.base/auxv.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/auxv.c ('k') | gdb/testsuite/gdb.base/bang.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.base/auxv.exp
diff --git a/gdb/testsuite/gdb.base/auxv.exp b/gdb/testsuite/gdb.base/auxv.exp
index 16f12c7f93d4abbad44af86296743240b3906899..ab51b2c0421b0e9e5914a6c36f7df1a3302497d1 100644
--- a/gdb/testsuite/gdb.base/auxv.exp
+++ b/gdb/testsuite/gdb.base/auxv.exp
@@ -1,7 +1,6 @@
# Test `info auxv' and related functionality.
-# Copyright (C) 1992-2000, 2004, 2007-2010, 2012 Free Software
-# Foundation, Inc.
+# Copyright (C) 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
@@ -25,11 +24,10 @@ if { ! [istarget "*-*-linux*"] && ! [istarget "*-*-solaris*"] } {
}
-set testfile "auxv"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-set corefile ${objdir}/${subdir}/${testfile}.corefile
-set gcorefile ${objdir}/${subdir}/${testfile}.gcore
+standard_testfile .c
+
+set corefile ${binfile}.corefile
+set gcorefile ${binfile}.gcore
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
{debug additional_flags=-DUSE_RLIMIT}] != ""
@@ -41,16 +39,13 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
# Use a fresh directory to confine the native core dumps.
# Make it the working directory for gdb and its child.
-set coredir "${objdir}/${subdir}/coredir.[getpid]"
+set coredir [standard_output_file coredir.[getpid]]
file mkdir $coredir
set core_works [expr [isnative] && ! [is_remote target]]
# Run GDB on the test 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"
@@ -62,7 +57,7 @@ if {$core_works} {
}
if { ![runto_main] } then {
- gdb_suppress_tests;
+ gdb_suppress_tests
}
set print_core_line [gdb_get_line_number "ABORT;"]
gdb_test "tbreak $print_core_line"
@@ -127,20 +122,7 @@ proc fetch_auxv {test} {
set live_data [fetch_auxv "info auxv on live process"]
# Now try gcore.
-set gcore_works 0
-set escapedfilename [string_to_regexp $gcorefile]
-gdb_test_multiple "gcore $gcorefile" "gcore" {
- -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
- pass "gcore"
- set gcore_works 1
- }
- -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
- unsupported "gcore"
- }
- -re "Undefined command: .*\[\r\n\]+$gdb_prompt $" {
- unsupported "gcore"
- }
-}
+set gcore_works [gdb_gcore_cmd "$gcorefile" "gcore"]
# Let the program continue and die.
gdb_test continue ".*Program received signal.*"
« no previous file with comments | « gdb/testsuite/gdb.base/auxv.c ('k') | gdb/testsuite/gdb.base/bang.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698