[Lldb-commits] [PATCH] D25021: [LLDB][MIPS] Fix qProcessInfo to return correct pointer size based on ELF ABI

Nitesh Jain via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 28 23:34:46 PDT 2016


nitesh.jain added inline comments.

================
Comment at: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp:1218
@@ +1217,3 @@
+    response.Printf("eflags:%" PRIx32 ";", proc_arch.GetFlags());
+    if (proc_triple.isArch64Bit()) {
+       if (proc_arch.IsMIPS()) {
----------------
clayborg wrote:
> labath wrote:
> > Why do we have the compilcated switch here. Can't we replace that with:
> > `response.Printf("ptrsize:%d;", proc_arch.GetAddressByteSize());` for all sizes?
> labath: the default ptr size for MIPS64 is 8. We would need to modify ArchSpec.cpp to look at the flags for MIPS64 and change the pointer size to 4 if the N32 is being used. 
Greg:  ArchSpec::GetAddressByteSize() will always return pointer size based on abi. So for N64 (default for MIPS64) abi it will return pointer size as 8
labath: We can replace switch with ArchSpec::GetAddressByteSize().



Repository:
  rL LLVM

https://reviews.llvm.org/D25021





More information about the lldb-commits mailing list