[Lldb-commits] [PATCH] D19604: Allow ObjectFilePECOFF to initialize with ARM binaries.
Muhammad Omair Javaid via lldb-commits
lldb-commits at lists.llvm.org
Mon May 2 07:43:40 PDT 2016
omjavaid requested changes to this revision.
omjavaid added a comment.
This revision now requires changes to proceed.
Please see inline comments.
================
Comment at: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp:149
@@ +148,3 @@
+ {
+ spec.SetTriple("armv7-pc-windows");
+ specs.Append(ModuleSpec(file, spec));
----------------
compnerd wrote:
> This may be a bit tricky. `armv7-windows` is unsupported in LLVM/clang (and we silently rewrite that in the clang frontend), and you need `thumbv7-windows` (ARM NT). Though, it is possible that LLDB is unable to handle that distinction right now.
>
> That said, the `pc` vendor is silly, and `unknown` sounds better to me, but this shouldn't matter too much.
>
> Finally, the Windows environment defaults to `msvc` here, which has a slight issue that it can sometimes fail to generate an assembly listing (the code generation is correct, its just a serialization issue caused by not having invested sufficiently in generating MASM style assembly listing).
>
> The safest triple would be `thumbv7-unknown-windows-itanium`. But, if lldb is going to ensure that the code is handled as thumb, using `armv7` should be fine.
Can we recognize armv7 and armv8 independent of each other?
For 32 bit arm normally we use arm-linux-gnueabi independent of instruction modes (thumb or arm) and architecture versions (v5, v5 or v7).
And we right now do not specifically distinguish between thumb and arm triples.
Better select arm-unknown-windows.
Please also handle arm v8 case where header is MachineArm64 and triple should be like aarch64-unknown-windows.
http://reviews.llvm.org/D19604
More information about the lldb-commits
mailing list