public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [committed][gdb/testsuite] Fix gdb.dwarf2/dw2-error.exp with -readnow
@ 2020-10-28 20:07 Tom de Vries
  2020-10-30 18:16 ` Tom Tromey
  0 siblings, 1 reply; 3+ messages in thread
From: Tom de Vries @ 2020-10-28 20:07 UTC (permalink / raw)
  To: gdb-patches

Hi,

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.

Committed to trunk.

Thanks,
- Tom

[gdb/testsuite] Fix gdb.dwarf2/dw2-error.exp with -readnow

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.

---
 gdb/testsuite/gdb.dwarf2/dw2-error.exp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gdb/testsuite/gdb.dwarf2/dw2-error.exp b/gdb/testsuite/gdb.dwarf2/dw2-error.exp
index e698752212..345cc11709 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.*"

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [committed][gdb/testsuite] Fix gdb.dwarf2/dw2-error.exp with -readnow
  2020-10-28 20:07 [committed][gdb/testsuite] Fix gdb.dwarf2/dw2-error.exp with -readnow Tom de Vries
@ 2020-10-30 18:16 ` Tom Tromey
  2020-10-30 19:48   ` Tom de Vries
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2020-10-30 18:16 UTC (permalink / raw)
  To: Tom de Vries; +Cc: gdb-patches

>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom> Hi,
Tom> With test-case gdb.dwarf2/dw2-error.exp and target board readnow, we get:
Tom> ...
Tom> FAIL: gdb.dwarf2/dw2-error.exp: break -q main
Tom> ...

Tom> In the normal case, after running into the dwarf error, the minimal symbols
Tom> are still available, but with -readnow this is not the case.

I didn't understand this explanation.
What's going on here?  Is gdb is rejecting the objfile due to a DWARF
problem?

Tom

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [committed][gdb/testsuite] Fix gdb.dwarf2/dw2-error.exp with -readnow
  2020-10-30 18:16 ` Tom Tromey
@ 2020-10-30 19:48   ` Tom de Vries
  0 siblings, 0 replies; 3+ messages in thread
From: Tom de Vries @ 2020-10-30 19:48 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

On 10/30/20 7:16 PM, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
> 
> Tom> Hi,
> Tom> With test-case gdb.dwarf2/dw2-error.exp and target board readnow, we get:
> Tom> ...
> Tom> FAIL: gdb.dwarf2/dw2-error.exp: break -q main
> Tom> ...
> 
> Tom> In the normal case, after running into the dwarf error, the minimal symbols
> Tom> are still available, but with -readnow this is not the case.
> 
> I didn't understand this explanation.
> What's going on here?  Is gdb is rejecting the objfile due to a DWARF
> problem?

Yes.

Thanks,
- Tom

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-30 19:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-28 20:07 [committed][gdb/testsuite] Fix gdb.dwarf2/dw2-error.exp with -readnow Tom de Vries
2020-10-30 18:16 ` Tom Tromey
2020-10-30 19:48   ` Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).