Open llvmbot opened 5 years ago
I built trunk.
r350053 -> Process launch failed (Because it does not support armv7l)
Zybo-Z7-10:/work/llvm+lldb_trunk/obj$ bin/lldb (lldb) file ~/a.out Current executable set to '~/a.out' (arm). (lldb) b main Breakpoint 1: where = a.out`main, address = 0x000103f4 (lldb) target list Current targets:
r350053 + patch_for_r350053_without_modify_ArchSpec::MergeFrom.patch -> Breakpoint does not work
(lldb) file ~/a.out Current executable set to '~/a.out' (arm). (lldb) b main Breakpoint 1: where = a.out`main, address = 0x000103f4 (lldb) target list Current targets:
r350053 + patch_for_r350053.patch -> Breakpoint works correctly
(lldb) file ~/a.out Current executable set to '~/a.out' (arm). (lldb) b main Breakpoint 1: where = a.out`main, address = 0x000103f4 (lldb) target list Current targets:
main a.out
main:
-> 0x103f4 <+0>: push {r4, r5, r6, r7, r11, lr}
0x103f8 <+4>: add r11, sp, #16
0x103fc <+8>: sub sp, sp, #24
0x10400 <+12>: movw r2, #0x4d8
(lldb) target list
Current targets:I just started to build r350053 without libcxx and libcxxabi. I think it will take several days to complete without a problem. The arm processor is very slow.
Can you try with trunk (top-of-tree)? Thanks.
Hi!
This issue may be a good introductory issue for people new to working on LLVM. If you would like to work on this issue, your first steps are:
1) Assign the issue to you.
2) Fix the issue locally.
3) Run the test suite locally.
3.1) Remember that the subdirectories under test/
create fine-grained testing targets, so you can
e.g. use make check-clang-ast
to only run Clang's AST tests.
4) Create a git
commit
5) Run git clang-format HEAD~1
to format your changes.
6) Submit the patch to Phabricator.
6.1) Detailed instructions can be found here
For more instructions on how to submit a patch to LLVM, see our documentation.
If you have any further questions about this issue, don't hesitate to ask via a comment on this Github issue.
@llvm/issue-subscribers-good-first-issue
Extended Description
I tried to debug an application on armv7l-linux but it did not work. I applied the below patch, but the result was the same. https://github.com/hpux735/swift-lldb/commit/e3e023f54c69512a77a87dfc328b3a8e75a9e185
The behavior of current LLDB + above patch: I set a breakpoint at line 6, but not worked after line 16. LLDB changed arch arm-*-linux-eabihf to armv7l-unknown-unknown at line 8-12. I was not able to set breakpoint at line 13.
1 (lldb) file ~/a.out 2 Current executable set to '~/a.out' (arm). 3 (lldb) target list 4 Current targets: 5 target #0: /home/common/a.out ( arch=arm--linux-eabihf, platform=host ) 6 (lldb) b main 7 Breakpoint 1: where = a.out`main, address = 0x000103f4 8 (lldb) process launch --stop-at-entry 9 Process 5659 launched: '/home/common/a.out' (arm) 10 (lldb) target list 11 Current targets: 12 * target #0: ( arch=armv7l-unknown-unknown, platform=host, pid=5659, state=stopped )
13 (lldb) b main
14 Breakpoint 2: no locations (pending).
15 WARNING: Unable to resolve breakpoint to any actual locations.
16 (lldb) c
17 Process 5659 resuming
18 hello
19 Process 5659 exited with status = 0 (0x00000000)
20 (lldb)
I am using Digilent Zybo, but same problem will probably occur in RaspberryPi.
I think there is a bug in ArchSpec::MergeFrom. LLDB loses vendor and OS name by calling ArchSpec::CoreUpdated(true) to set SubArch. I think this problem is caused by the fact that SubArch can only be set by the constructor of llvm::Triple. LLDB worked fine by saving those information.
I judged that the FindCoreDefinition should be modified to support cores other than armv7 and little-endian, so the above patch is not good. I have created a patch. Are there any arm users who can try this? I used 5.0.2 and 6.0.1 because libcxxabi of 7.0.0 failed in build on arm.