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

Unified Diff: gdb/testsuite/gdb.dwarf2/pieces-optimized-out.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/pieces-optimized-out.c ('k') | gdb/testsuite/gdb.dwarf2/pr10770.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp
diff --git a/gdb/testsuite/gdb.dwarf2/valop.exp b/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp
similarity index 57%
copy from gdb/testsuite/gdb.dwarf2/valop.exp
copy to gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp
index 9cd99f0cdc471557d99b64e3f5ad31a2764ae67f..4effb30db4f6df1655be6a9dde4d34ef651907fb 100644
--- a/gdb/testsuite/gdb.dwarf2/valop.exp
+++ b/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp
@@ -1,4 +1,4 @@
-# Copyright 2009-2012 Free Software Foundation, Inc.
+# Copyright 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
@@ -13,8 +13,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
-
-# Test DW_OP_stack_value and DW_OP_implicit_value.
+# Test some DWARF piece operators.
# This test can only be run on targets which support DWARF-2 and use gas.
if {![dwarf2_support]} {
@@ -26,18 +25,26 @@ if {![is_x86_like_target]} {
}
standard_testfile .S
+set csrcfile ${testfile}.c
-if {[prepare_for_testing $testfile.exp $testfile \
- [list $srcfile] [list {additional_flags=-nostdlib}]]} {
+if {[prepare_for_testing ${testfile}.exp ${testfile} $srcfile]} {
return -1
}
-if ![runto_main] {
+if ![runto foo] {
return -1
}
-gdb_test "break valop.c:19" "Breakpoint 2.*" "set breakpoint for valop"
-gdb_continue_to_breakpoint "continue to breakpoint for valop"
+# Move back up to main.
+gdb_test "up" "#1 $hex in main.*" "move up a frame"
+
+# Now take a look at the 's' structure.
+gdb_test "p s" \
+ " = {a = 5, b = <optimized out>, c = <optimized out>, d = <optimized out>}" \
+ "print s"
+gdb_test "p s.a" " = 5" "print s.a"
+gdb_test "p s.b" " = <optimized out>" "print s.b"
+gdb_test "p s.c" " = <optimized out>" "print s.c"
+gdb_test "p s.d" " = <optimized out>" "print s.d"
+gdb_test "p s.d + 1" "value has been optimized out" "print s.d + 1"
-gdb_test "print uses_stack_op" " = 24" "print uses_stack_op"
-gdb_test "print uses_lit_op" " = 2147483648" "print uses_lit_op"
« no previous file with comments | « gdb/testsuite/gdb.dwarf2/pieces-optimized-out.c ('k') | gdb/testsuite/gdb.dwarf2/pr10770.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698