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.dwarf2/dw2-error.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.dwarf2/dw2-error.c ('k') | gdb/testsuite/gdb.dwarf2/dw2-filename.S » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.dwarf2/dw2-error.exp
diff --git a/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp b/gdb/testsuite/gdb.dwarf2/dw2-error.exp
similarity index 60%
copy from gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
copy to gdb/testsuite/gdb.dwarf2/dw2-error.exp
index 5b8b5edfc61f1d1c23d87ef7f3cdd7544ba54ded..d0baeea5767146283c9f348c89bd0e640fe8c84b 100644
--- a/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-error.exp
@@ -1,4 +1,4 @@
-# Copyright 2010-2012 Free Software Foundation, Inc.
+# Copyright 2012, 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
@@ -12,6 +12,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
@@ -19,12 +20,11 @@ if {![dwarf2_support]} {
return 0
}
-if { [skip_cplus_tests] } { continue }
-
standard_testfile .S
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" ${binfile} object {debug}] != "" } {
- untested ${testfile}.exp
+# We can't use prepare_for_testing here because we need to check the
+# 'file' command's output.
+if {[build_executable $testfile.exp $testfile $srcfile {nodebug}]} {
return -1
}
@@ -32,10 +32,12 @@ gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
-# Be sure to set cp-abi before ${binfile} gets loaded
-gdb_test "set cp-abi gnu-v3"
-gdb_test "show cp-abi" {The currently selected C\+\+ ABI is "gnu-v3".*}
+gdb_test_no_output "set breakpoint pending off"
-gdb_load ${binfile}
+# First test that reading symbols fails.
+gdb_test "file $binfile" \
+ "Reading symbols.*Dwarf Error: wrong version in compilation unit header .is 153, should be 2, 3, or 4.*" \
+ "file $testfile"
-gdb_test "ptype c" "type = struct C {\[\r\n \t\]*private:\[\r\n \t\]*int \\(C::\\*fp\\)\\(C \\*( const)?\\);\[\r\n \t\]*}"
+# Now check that we can still break given the minimal symbol.
+gdb_test "break main" "Breakpoint $decimal.*"
« no previous file with comments | « gdb/testsuite/gdb.dwarf2/dw2-error.c ('k') | gdb/testsuite/gdb.dwarf2/dw2-filename.S » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698