public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@redhat.com>
To: binutils@sourceware.org
Cc: Andrew Burgess <aburgess@redhat.com>
Subject: [PATCH 1/2] objdump: fix styled printing of addresses
Date: Fri, 29 Apr 2022 14:42:55 +0100	[thread overview]
Message-ID: <53d693186424011031ae193888a7d880098adad0.1651239378.git.aburgess@redhat.com> (raw)
In-Reply-To: <cover.1651239378.git.aburgess@redhat.com>

Previous work to add styled disassembler output missed a case in
objdump_print_addr, which is fixed in this commit.
---
 binutils/objdump.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/binutils/objdump.c b/binutils/objdump.c
index 54c89a32db2..060a136efa4 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -1640,14 +1640,15 @@ objdump_print_addr (bfd_vma vma,
     {
       if (!no_addresses)
 	{
-	  (*inf->fprintf_func) (inf->stream, "0x");
+	  (*inf->fprintf_styled_func) (inf->stream, dis_style_address, "0x");
 	  objdump_print_value (vma, inf, skip_zeroes);
 	}
 
       if (display_file_offsets)
-	inf->fprintf_func (inf->stream, _(" (File Offset: 0x%lx)"),
-			   (long int) (inf->section->filepos
-				       + (vma - inf->section->vma)));
+	inf->fprintf_styled_func (inf->stream, dis_style_text,
+				  _(" (File Offset: 0x%lx)"),
+				  (long int) (inf->section->filepos
+					      + (vma - inf->section->vma)));
       return;
     }
 
-- 
2.25.4


  reply	other threads:[~2022-04-29 13:43 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29 13:42 [PATCH 0/2] Disassembler styling for i386-dis.c Andrew Burgess
2022-04-29 13:42 ` Andrew Burgess [this message]
2022-05-02  7:14   ` [PATCH 1/2] objdump: fix styled printing of addresses Jan Beulich
2022-05-03  9:52     ` Andrew Burgess
2022-04-29 13:42 ` [PATCH 2/2] libopcodes: extend the styling within the i386 disassembler Andrew Burgess
2022-04-29 18:16   ` Vladimir Mezentsev
2022-05-03 13:15     ` Andrew Burgess
2022-04-29 18:57   ` H.J. Lu
2022-05-03 13:14     ` Andrew Burgess
2022-05-02  7:28   ` Jan Beulich
2022-05-03 13:12     ` Andrew Burgess
2022-05-03 15:47       ` H.J. Lu
2022-05-04  7:58       ` Jan Beulich
2022-05-09  9:48         ` Andrew Burgess
2022-05-09 12:54           ` [PATCHv2] " Andrew Burgess
2022-05-18 12:27             ` Jan Beulich
2022-05-26 12:48               ` Andrew Burgess
2022-05-18 21:23             ` H.J. Lu
2022-05-27 17:44             ` [PATCHv3] " Andrew Burgess
2022-05-30  8:19               ` Jan Beulich
2022-05-31 17:20                 ` Andrew Burgess
2022-06-01  5:59                   ` Jan Beulich
2022-06-01 15:56                     ` H.J. Lu
2022-06-08 16:03                       ` Andrew Burgess
2022-06-10 10:56               ` Jan Beulich
2022-06-10 13:01                 ` Andrew Burgess
2022-05-18  7:06           ` [PATCH 2/2] " Jan Beulich
2022-05-18 10:41             ` Andrew Burgess
2022-05-18 10:46               ` Jan Beulich

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=53d693186424011031ae193888a7d880098adad0.1651239378.git.aburgess@redhat.com \
    --to=aburgess@redhat.com \
    --cc=binutils@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).