| Index: gdb/testsuite/gdb.base/eval-avoid-side-effects.exp
|
| diff --git a/gdb/testsuite/gdb.base/pr10179.exp b/gdb/testsuite/gdb.base/eval-avoid-side-effects.exp
|
| similarity index 50%
|
| copy from gdb/testsuite/gdb.base/pr10179.exp
|
| copy to gdb/testsuite/gdb.base/eval-avoid-side-effects.exp
|
| index bfdb98bdccdbd166559b788cc9394be962d37633..da1e36f22c41fa1d43d8faf105fbd7bcb48bd15c 100644
|
| --- a/gdb/testsuite/gdb.base/pr10179.exp
|
| +++ b/gdb/testsuite/gdb.base/eval-avoid-side-effects.exp
|
| @@ -1,4 +1,4 @@
|
| -# Copyright 2010-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,26 +13,28 @@
|
| # You should have received a copy of the GNU General Public License
|
| # along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
| -set testname pr10179
|
| -set sources "pr10179-a.c pr10179-b.c"
|
| +# Tests to cover evaluate_subexp and others with EVAL_AVOID_SIDE_EFFECTS
|
| +# flag set.
|
|
|
| -if {[build_executable ${testname}.exp $testname $sources {debug}] == -1} {
|
| +standard_testfile int-type.c
|
| +
|
| +if { [prepare_for_testing ${testfile}.exp $testfile $srcfile] } {
|
| return -1
|
| }
|
|
|
| -clean_restart ${testname}
|
| -
|
| if ![runto_main] {
|
| - untested pr10179
|
| return -1
|
| }
|
|
|
| -gdb_test "rbreak foo.*" "Breakpoint \[0-9\]+\[^\\n\]*\\nint foo\[12\]\[^\\n\]*\\nBreakpoint \[0-9\]+\[^\\n\]*\\nint foo\[12\].*"
|
| +set sizeof_int [get_sizeof "int" 4]
|
|
|
| -delete_breakpoints
|
| +gdb_test_no_output "set variable x=42" "set variable x=42"
|
|
|
| -gdb_test "rbreak pr10179-a.c:foo.*" "Breakpoint \[0-9\]+\[^\\n\]*\\nint foo.*"
|
| +gdb_test "print sizeof ++x" "= ${sizeof_int}" "test sizeof side effects"
|
| +gdb_test "print x" "= 42" "sizeof has no side effects"
|
|
|
| -delete_breakpoints
|
| +gdb_test "ptype ++x" "= int" "test ptype side effects"
|
| +gdb_test "print x" "= 42" "ptype has no side effects"
|
|
|
| -gdb_test "rbreak pr10179-a.c : .*" "Breakpoint \[0-9\]+\[^\\n\]*\\nint bar1\[^\\n\]*\\nBreakpoint \[0-9\]+\[^\\n\]*\\nint foo1\[^\\n\]*\\nBreakpoint \[0-9\]+\[^\\n\]*\\nint main\[^\\n\]*.*"
|
| +gdb_test "whatis ++x" "= int" "test whatis side effects"
|
| +gdb_test "print x" "= 42" "whatis has no side effects"
|
|
|