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

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 28 07:49:36 PDT 2016


labath added a comment.

Looks good as far as I am concerned. Just a couple of nits here and there.


================
Comment at: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp:1887
@@ -1885,1 +1886,3 @@
             ++num_keys_decoded;
+        } else if (name.equals("eflags")) {
+          if (!value.getAsInteger(16,proc_arch_eflags))
----------------
Why you chose this name? eflags is the name of a i386 register. How about we use a different field name? `archflags` maybe ?

================
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()) {
----------------
Why do we have the compilcated switch here. Can't we replace that with:
`response.Printf("ptrsize:%d;", proc_arch.GetAddressByteSize());` for all sizes?


Repository:
  rL LLVM

https://reviews.llvm.org/D25021





More information about the lldb-commits mailing list