aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2014-05-06 21:47:36 +0800
committerYao Qi <yao@codesourcery.com>2014-05-07 11:07:12 +0800
commit5e45f04cf3408e662c460a23a3722fedfb03391a (patch)
tree96f951824b3f2f7fbb8c1961fa36d6706642a3b2 /gdb/testsuite
parent1144861e0849fb67a8233d5a180f8ddae5e3f8a0 (diff)
downloadgdb-5e45f04cf3408e662c460a23a3722fedfb03391a.zip
gdb-5e45f04cf3408e662c460a23a3722fedfb03391a.tar.gz
gdb-5e45f04cf3408e662c460a23a3722fedfb03391a.tar.bz2
Relax the pattern in dwzbuildid.exp
Hi, I recently see the fail in dwzbuildid.exp below on some targets, (gdb) print the_int No symbol "the_int" in current context. (gdb) FAIL: gdb.dwarf2/dwzbuildid.exp: mismatch: print the_int Looks the pattern expects to see "No symbol table is loaded", which is emitted in c-exp.y, variable: name_not_typename .... if (msymbol.minsym != NULL) write_exp_msymbol (pstate, msymbol); else if (!have_full_symbols () && !have_partial_symbols ()) error (_("No symbol table is loaded. Use the \"file\" command.")); else error (_("No symbol \"%s\" in current context."), copy_name ($1.stoken)); it is expected to have no full symbols nor partial symbols, but something brings full symbols or partial symbols in. I added "maint info symtabs" and "maint info psymtabs" in dwzbuildid.exp, and it shows symbols are from ld.so, which has debug information. Then, I reproduce the fail like this, $ make check RUNTESTFLAGS="CFLAGS_FOR_TARGET='-Wl,-rpath=${glibc_build}:${glibc_build}/math -Wl,--dynamic-linker=${glibc_build}/elf/ld.so' dwzbuildid.exp" ${glibc_build} is the glibc build tree. Debug information is not striped, so the test fail. However, if I strip debug information from libc.so, libm.so and ld.so. The test passes. This patch is to relax the pattern to match the both cases that glibc build has and has not debug information. gdb/testsuite: 2014-05-07 Yao Qi <yao@codesourcery.com> * gdb.dwarf2/dwzbuildid.exp: Match output "No symbol "the_int" in current context" too.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.dwarf2/dwzbuildid.exp2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index dbcf0ae..106ba11 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2014-05-07 Yao Qi <yao@codesourcery.com>
+
+ * gdb.dwarf2/dwzbuildid.exp: Match output "No symbol "the_int"
+ in current context" too.
+
2014-05-05 Keith Seitz <keiths@redhat.com>
* gdb.linespec/ls-dollar.exp: Add test for linespec
diff --git a/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp b/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp
index af8e5d3..7bf0d5c 100644
--- a/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp
+++ b/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp
@@ -162,7 +162,7 @@ foreach testname {ok mismatch fallback} {
if {[runto_main]} {
if {$testname == "mismatch"} {
gdb_test "print the_int" \
- "No symbol table is loaded.*"
+ "(No symbol table is loaded|No symbol \"the_int\" in current context).*"
} else {
gdb_test "print the_int" " = 99"
}