From: Tom de Vries Date: Wed, 28 Oct 2020 20:04:12 +0000 (+0100) Subject: [gdb/testsuite] Fix gdb.dwarf2/dw2-error.exp with -readnow X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f93b8760308333ef1113c213a5380719136f3f64;p=binutils-gdb.git [gdb/testsuite] Fix gdb.dwarf2/dw2-error.exp with -readnow With test-case gdb.dwarf2/dw2-error.exp and target board readnow, we get: ... FAIL: gdb.dwarf2/dw2-error.exp: break -q main ... In the normal case, after running into the dwarf error, the minimal symbols are still available, but with -readnow this is not the case. Mark the FAIL as KFAIL. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2020-10-28 Tom de Vries * gdb.dwarf2/dw2-error.exp: Mark failure break in main as known with -readnow. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 6973e9fc2fd..0c35ed14fbe 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-10-28 Tom de Vries + + * gdb.dwarf2/dw2-error.exp: Mark failure break in main as known with + -readnow. + 2020-10-28 Tom de Vries PR symtab/26772 diff --git a/gdb/testsuite/gdb.dwarf2/dw2-error.exp b/gdb/testsuite/gdb.dwarf2/dw2-error.exp index e698752212a..345cc117093 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-error.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-error.exp @@ -44,5 +44,14 @@ gdb_test "file $binfile" \ {Reading symbols.*Dwarf Error: wrong version in compilation unit header \(is 153, should be 2, 3, 4 or 5\).*} \ "file $testfile" +# We can't use proc readnow, because the PR makes it return 0. +gdb_test_multiple "maint print objfiles $binfile" "" { + -re "^maint print objfiles \[^\r\n\]*\r\n$gdb_prompt $" { + setup_kfail "gdb/26797" *-*-* + } + -re -wrap "" { + } +} + # Now check that we can still break given the minimal symbol. gdb_test "break -q main" "Breakpoint $decimal.*"