[PATCH 1/2] objdump: fix styled printing of addresses
Andrew Burgess
aburgess@redhat.com
Fri Apr 29 13:42:55 GMT 2022
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
More information about the Binutils
mailing list