- Subject: Re: Understanding gdb disassembly output
- From: Jon Masters <jcm@xxxxxxxxxx>
- Date: Tue, 01 May 2012 17:31:09 -0400
- Cc: arm <arm@xxxxxxxxxxxxxxxxxxxxxxx>
- Delivered-to: arm@xxxxxxxxxxxxxxxxxxxxxxx
- In-reply-to: <CAMLZHHQt6Ux4mDQwQiGCM=csvJz38bkrpjtCNEdXkpK+cnN_tQ@mail.gmail.com>
- Organization: Red Hat, Inc.
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1
On 05/01/2012 05:10 PM, Daniel Drake wrote:
> Specifically this bit looks of interest:
>
> 0x499fe5d4: ldr r8, [pc, #31461008] ; 0x499fea44
> 0x499fe5d8: blx r8
>
> So the first instruction here says "take the data at address
> pc+31461008 and save it in r8".
> pc is always 8 bytes on from the address of the current instruction,
> so at the moment pc = 0x499fe5d4 + 8 = 0x499fe5dc
I failed to spell out on IRC that the value you want for the offset is
the one in the comment (value_in_comment). The raw #31461008 contains
non-addressing bits taken from the ARM encoding. So actually, it's
saying to load r8 with the value at 0x499fea44.
The gory details are in print_arm_address in gdb, which is also where
we'll add 8 to the value of the pc in the offset so you don't need to.
Perhaps sometime someone might document gdb on ARM a little more...
Jon.
_______________________________________________
arm mailing list
arm@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/arm
[Linux ARM (Vger)]
[Linux ARM]
[ARM Kernel]
[Fedora User Discussion]
[Older Fedora Users Discussion]
[Fedora Advisory Board]
[Fedora Security]
[Fedora Maintainers]
[Fedora Devel Java]
[Fedora Legacy]
[Fedora Desktop]
[ATA RAID]
[Fedora Marketing]
[Fedora Mentors]
[Fedora Package Announce]
[Fedora Package Review]
[Fedora Music]
[Fedora Packaging]
[Centos]
[Fedora SELinux]
[Fedora Triage]
[Deep Creek Hot Springs]
[Coolkey]
[Yum Users]
[Tux]
[Big List of Linux Books]
[Yosemite News]
[Yosemite Photos]
[Linux Apps]
[KDE Users]
[Fedora Tools]
[Fedora Art]
[Fedora Docs]
[Asterisk PBX]