public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [pushed 3/4] [gdb/testsuite] Add kfail in gdb.dwarf2/dwzbuildid.exp
Date: Fri,  8 Sep 2023 12:28:05 +0200	[thread overview]
Message-ID: <20230908102806.13015-3-tdevries@suse.de> (raw)
In-Reply-To: <20230908102806.13015-1-tdevries@suse.de>

When running test-case gdb.dwarf2/dwzbuildid.exp using target board readnow, I
get:
...
(gdb) file dwzbuildid-mismatch^M
Reading symbols from dwzbuildid-mismatch...^M
warning: File "dwzbuildid5.o" has a different build-id, file skipped^M
could not find '.gnu_debugaltlink' file for dwzbuildid-mismatch^M
(gdb) delete breakpoints^M
(gdb) info breakpoints^M
No breakpoints or watchpoints.^M
(gdb) break -qualified main^M
No symbol table is loaded.  Use the "file" command.^M
Make breakpoint pending on future shared library load? (y or [n]) n^M
(gdb) FAIL: gdb.dwarf2/dwzbuildid.exp: mismatch: gdb_breakpoint: set breakpoint at main
...

This is PR symtab/26797: when using readnow, a failure in reading the dwarf
results in the minimal symbols not being available.

Add a corresponding KFAIL.

Tested on x86_64-linux.
---
 gdb/testsuite/gdb.dwarf2/dwzbuildid.exp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp b/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp
index 721aef8d344..81cefc60dfc 100644
--- a/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp
+++ b/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp
@@ -160,6 +160,13 @@ foreach testname {ok mismatch fallback} {
 
 	gdb_load ${binfile}-${testname}
 
+	if { $testname == "mismatch" && [readnow] } {
+	    # Main is found in the minimal symbols.  When using readnow, a
+	    # failure to read the dwarf also causes the minimal symbols to be
+	    # unavailable.
+	    # Setup a kfail for "FAIL: gdb_breakpoint: set breakpoint at main".
+	    setup_kfail "symtab/26797" *-*-*
+	}
 	if {[runto_main]} {
 	    if {$testname == "mismatch"} {
 		gdb_test "print the_int" \
-- 
2.35.3


  parent reply	other threads:[~2023-09-08 10:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-08 10:28 [pushed 1/4] [gdb/testsuite] Fix build-ids " Tom de Vries
2023-09-08 10:28 ` [pushed 2/4] [gdb/testsuite] Add aranges " Tom de Vries
2023-09-08 10:28 ` Tom de Vries [this message]
2023-09-08 10:28 ` [pushed 4/4] [gdb/testsuite] Make gdb.dwarf2/dwzbuildid.exp more robust Tom de Vries

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230908102806.13015-3-tdevries@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).