objdump: fix styled printing of addresses
authorAndrew Burgess <aburgess@redhat.com>
Fri, 22 Apr 2022 15:45:06 +0000 (16:45 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Tue, 3 May 2022 09:51:21 +0000 (10:51 +0100)
Previous work to add styled disassembler output missed a case in
objdump_print_addr, which is fixed in this commit.

binutils/objdump.c

index 54c89a32db2677e57f2de678f1bd7937129fca60..060a136efa44c167360276f4cfc29b18640460ba 100644 (file)
@@ -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;
     }