[lldb-dev] Patch to fix REPL for ARMv7 & ARMv6 on linux
William Dillon via lldb-dev
lldb-dev at lists.llvm.org
Wed Jan 6 13:37:24 PST 2016
Hi All,
There is a small change that enables correct calculation of arm sub architectures while using the REPL on arm-linux. As you may of may or may not know, linux appends ālā to arm architecture versions to denote little endian. This sometimes interferes with the determination of the architecture in the triple. I experimented with adding sub architecture entries for these within lldb, but I discovered a simpler (and less invasive) method. Because LLVM already knows how to handle some of these cases (I have a patch submitted for review that enables v6l; v7l already works), I am relying on llvm to clean it up. The gist of it is that the llvm constructor (when given a triple string) retains the provided string unless an accessor mutates it. Meanwhile, the accessors for the components go through the aliasing and parsing logic. This code detects whether the sub-architecture that armv6l or armv7l aliases to is detected, and re-sets the architecture in the triple. This overwrites the architecture that comes from linux, thus sanitizing it.
Some kind of solution is required for the REPL to on arm-linux.
Thoughts?
- Will
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lldb.diff
Type: application/octet-stream
Size: 934 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20160106/c5372577/attachment.obj>
More information about the lldb-dev
mailing list