bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: objdump '--stop-address' option stop on a wrong ending address


From: Andreas Schwab
Subject: Re: objdump '--stop-address' option stop on a wrong ending address
Date: Mon, 07 Nov 2016 21:01:17 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

On Nov 07 2016, Nick Clifton <address@hidden> wrote:

> Hi Florian,
>
>> I try to extract function assembly code with objdump using
>> "--start-address" and "--stop-address" options but the stop address stop
>> on the second to last address.
>
>> $ objdump --start-address=0x50c40 --stop-address=0x50c5f -d
>
>>    50c59:    b8 01 00 00 00          mov    $0x1,%eax
>>    50c5e:    c3                      retq
>> 
>> As you can see the last address is wrong. The assembly code stop on
>> 0x50c5e instead of 0x50c5f.
>
> Actually this is the intended behaviour.  The --stop-address option 
> specifies the address at which objdump should *stop* displaying data.  
> So when objdump reaches address 50c5f it stops and does not display
> the disassembly for that address.
>
> In order to display the entire disassembly of a specific region you
> need to set the stop address to one more than the last address of the
> region concerned.

But note that the region does end at 0x50c5f, so there is nothing more
to disassemble anyway.

Andreas.

-- 
Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]