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: BERBAR Florian
Subject: Re: objdump '--stop-address' option stop on a wrong ending address
Date: Mon, 7 Nov 2016 17:26:05 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0

On 07/11/2016 17:09, Nick Clifton wrote:
> Hi Florian,

Hi Nick
> 
>> 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.
>

Sorry about my mistake.

> 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.  So in your example:
> 
>   $ objdump --start-address=0x50c40 --stop-address=0x50c60 -d
> 
> should work.


Thank you,

> 
> Cheers
>   Nick
> 

Regards

Florian

Attachment: 0x346BBA8F.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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