public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Sam James <sam@gentoo.org>
To: binutils@sourceware.org
Cc: Sam James <sam@gentoo.org>, Nick Clifton <nickc@redhat.com>
Subject: [PATCH] ld: ld-lib.exp: log failed dump.out contents for debugging
Date: Thu, 17 Aug 2023 05:19:44 +0100	[thread overview]
Message-ID: <20230817042005.2985898-1-sam@gentoo.org> (raw)

If we're using dump_prog in a test which fails, log the dump.out contents
to ld.log to aid debugging.

This avoids needing to ask reporters to manually run e.g. `objdump` commands
when making bug reports.

PR30722
	* ld/testsuite/lib/ld-lib.exp: Log failed dump.out contents to aid
	debugging.

Approved-by: Nick Clifton <nickc@redhat.com>
Signed-off-by: Sam James <sam@gentoo.org>
---
 ld/testsuite/lib/ld-lib.exp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index 918464069a9..aca303e0728 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -640,7 +640,7 @@ proc run_ld_link_tests { ldtests args } {
 		    remote_upload host "dump.out"
 
 		    if { [regexp_diff "dump.out" "$srcdir/$subdir/$dumpfile"] } then {
-			verbose "output is [file_contents "dump.out"]" 2
+			verbose -log "output is [file_contents "dump.out"]" 2
 			set failed 1
 			remote_file build delete "dump.out"
 			remote_file host delete "dump.out"
@@ -1067,7 +1067,7 @@ proc run_cc_link_tests { ldtests } {
 		    }
 
 		    if { [regexp_diff "dump.out" "$srcdir/$subdir/$dumpfile"] } then {
-			verbose "output is [file_contents "dump.out"]" 2
+			verbose -log "output is [file_contents "dump.out"]" 2
 			set failed 1
 			break
 		    }
-- 
2.41.0


                 reply	other threads:[~2023-08-17  4:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20230817042005.2985898-1-sam@gentoo.org \
    --to=sam@gentoo.org \
    --cc=binutils@sourceware.org \
    --cc=nickc@redhat.com \
    /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).