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 <tdevries@suse.de>
* gdb.dwarf2/dw2-error.exp: Mark failure break in main as known with
-readnow.
+2020-10-28 Tom de Vries <tdevries@suse.de>
+
+ * gdb.dwarf2/dw2-error.exp: Mark failure break in main as known with
+ -readnow.
+
2020-10-28 Tom de Vries <tdevries@suse.de>
PR symtab/26772
{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.*"