diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index c421904c75e..67c7f822aff 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-09-19 Yao Qi + + * gdb.dwarf2/dw2-var-zero-addr.exp: Move test into new proc test. + Invoke test. Restart GDB with --readnow and invoke test again. + 2014-09-19 Yao Qi * gdb.base/break-on-linker-gcd-function.exp: Move test into new diff --git a/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp b/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp index 462a5f85c70..3ba7f872983 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp @@ -26,6 +26,19 @@ if [prepare_for_testing ${testfile}.exp ${testfile} \ return -1 } -# FAIL was: = (int *) 0x0 -# Such DIE record can be produced using: gcc -fdata-sections -Wl,-gc-sections -gdb_test "print &var" {No symbol "var" in current context\.} +proc test { } { + # FAIL was: = (int *) 0x0 + # Such DIE record can be produced using: gcc -fdata-sections -Wl,-gc-sections + gdb_test "print &var" {No symbol "var" in current context\.} +} + +test + +set saved_gdbflags $GDBFLAGS +set GDBFLAGS "$GDBFLAGS --readnow" +clean_restart ${binfile} +set GDBFLAGS $saved_gdbflags + +with_test_prefix "readnow" { + test +}