| 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"
|
|
|