aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2014-08-18 09:57:40 +0800
committerYao Qi <yao@codesourcery.com>2014-09-19 16:53:34 +0800
commit00ba3162ed1633f9b27f3fdd450e076d3a3f2e90 (patch)
treefd08cd134136d881154074639452a26a19b23805
parentc3b7b696c231416ac90fd9cb7d5ce735b3683356 (diff)
downloadgdb-00ba3162ed1633f9b27f3fdd450e076d3a3f2e90.zip
gdb-00ba3162ed1633f9b27f3fdd450e076d3a3f2e90.tar.gz
gdb-00ba3162ed1633f9b27f3fdd450e076d3a3f2e90.tar.bz2
Run dw2-var-zero-addr.exp with --readnow
This patch is to extend dw2-var-zero-add.exp to cover the case that partial symtabl is not used while full symtab is used, in order to cover the changes in patch 2/3. This patch restarts GDB with --readnow and does the same test again. gdb/testsuite: 2014-09-19 Yao Qi <yao@codesourcery.com> * gdb.dwarf2/dw2-var-zero-addr.exp: Move test into new proc test. Invoke test. Restart GDB with --readnow and invoke test again.
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp19
2 files changed, 21 insertions, 3 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index c421904..67c7f82 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2014-09-19 Yao Qi <yao@codesourcery.com>
+ * 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 <yao@codesourcery.com>
+
* gdb.base/break-on-linker-gcd-function.exp: Move test into new
proc set_breakpoint_on_gcd_function. Invoke
set_breakpoint_on_gcd_function. Restart GDB with --readnow and
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp b/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp
index 462a5f8..3ba7f87 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
+}