This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: OBJDUMP: print_addr_with_sym
- From: Tristan Gingold <gingold at adacore dot com>
- To: Claudiu Zissulescu <Claudiu dot Zissulescu at synopsys dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Thu, 6 Oct 2016 12:24:46 +0200
- Subject: Re: OBJDUMP: print_addr_with_sym
- Authentication-results: sourceware.org; auth=none
- References: <098ECE41A0A6114BB2A07F1EC238DE89661B7A7C@de02wembxa.internal.synopsys.com>
> When using (*info->print_address_func) in disassembler, objdump prints something like this for ARC:
>
> 494: 0802 0020 bl.d 494 <main+0x494>
>
> Where the first 494 is a hex number, but it misses the "0x". I've traced this problem to objdump_print_addr_with_sym (objdump.c:1015) where we call objdump_print_value() function without outputting "0x" string.
Note that the instruction bytes/words are also in hexa, so they miss the 0x too :-)
> Shouldn't we add (*inf->fprintf_func) (inf->stream, "0x") before the call of objdump_print_addr_with_sym() (see objdump_print_addr ()) or do I miss something.
That would break backward compatibility.
I think that everyone knows that addresses in dumps (as well as byte instructions) are in hexa. Might be worth clarifying that in the doc.
Tristan.