[lldb-dev] [Bug 18637] New: Incorrect ARM disassembly annotation for symbol stubs
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jan 27 15:32:09 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=18637
Bug ID: 18637
Summary: Incorrect ARM disassembly annotation for symbol stubs
Product: lldb
Version: 3.4
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: lldb-dev at cs.uiuc.edu
Reporter: zach at fb.com
Classification: Unclassified
The lldb from Xcode 5.1b4 (lldb-310.2.32) to incorrectly annotates ARM
instructions corresponding to indirect function calls when running on an
iPhone. This reproduces when generating both arm64 or armv7s code.
Here is an example using armv7s.
Steps to reproduce:
1) Place a breakpoint onn CFSocketCreate in a simple iOS app with the following
code in main.c:
int main(int argc, char * argv[])
{
@autoreleasepool {
CFSocketCreate(kCFAllocatorDefault, 0, 0, 0, 0, NULL, NULL);
return 0;
}
}
2) Breakpoint is hit, instructions appear:
CoreFoundation`CFSocketCreate:
0x30539848: push {r4, r5, r6, r7, lr}
...
0x305398d8: mov r1, r6
0x305398da: blx 0x305a68dc ; symbol stub for: __copy_helper_block_457
0x305398de: mov r1, r0
...
The annotation on 0x305398da is incorrect:
(lldb) p/a 0x305a68dc
(int) $3 = 0x305a68dc CoreFoundation`symbol stub for: __copy_helper_block_457
0x305a68dc is actually a symbol stub that will branch to
libsystem_kernel.dylib`socket, which you can verify below:
(lldb) disas -s0x305a68dc -c4
CoreFoundation`symbol stub for: __copy_helper_block_457:
0x305a68dc: ldr r12, [pc, #4] ; symbol stub for:
__copy_helper_block_457 + 12
0x305a68e0: add r12, pc, r12
0x305a68e4: ldr pc, [r12]
0x305a68e8: beq 0x2f0575a0
(lldb) x/4w 0x305a68dc
0x305a68dc: 0xe59fc004
0x305a68e0: 0xe08fc00c
0x305a68e4: 0xe59cf000
0x305a68e8: 0x0aaac32c
(lldb) x/a `0x305a68e8 + 0x0aaac32c`
0x3b052c14: 0x3ae6cce4 libsystem_kernel.dylib`socket
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140127/949c94f5/attachment.html>
More information about the lldb-dev
mailing list