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 1/4] [gdb/testsuite] Fix build-ids in gdb.dwarf2/dwzbuildid.exp
Date: Fri,  8 Sep 2023 12:28:03 +0200	[thread overview]
Message-ID: <20230908102806.13015-1-tdevries@suse.de> (raw)

When looking at the execs from test-case gdb.dwarf2/dwzbuildid.exp using
readelf, I run into:
...
$ readelf -w dwzbuildid-ok > READELF
readelf: Warning: Corrupt debuglink section: .gnu_debugaltlink
readelf: Warning: Build-ID is too short (0x6 bytes)
...

Fix this by ensuring the Build-IDs are the required 20 bytes.

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

diff --git a/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp b/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp
index ba9db41ba61..1aad712e32c 100644
--- a/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp
+++ b/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp
@@ -90,11 +90,11 @@ if  { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile}1.o \
 
 # The values don't really matter, just whether they are equal.
 set ok_prefix 01
-set ok_suffix 0203040506
-set ok_suffix2 02030405ff
+set ok_suffix 02030405060708091011121314151617181920
+set ok_suffix2 020304050607080910111213141516171819ff
 set ok_buildid ${ok_prefix}${ok_suffix}
 set ok_buildid2 ${ok_prefix}${ok_suffix2}
-set bad_buildid ffffffffffff
+set bad_buildid [string repeat ff 20]
 
 set debugdir [standard_output_file {}]
 set basedir $debugdir/.build-id

base-commit: 932a49fff332ba4921dc9e38cf45bf65a301f2c6
-- 
2.35.3


             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 Tom de Vries [this message]
2023-09-08 10:28 ` [pushed 2/4] [gdb/testsuite] Add aranges " Tom de Vries
2023-09-08 10:28 ` [pushed 3/4] [gdb/testsuite] Add kfail " Tom de Vries
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-1-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).