[Lldb-commits] [PATCH] D24124: [LLDB][MIPS] Fix register read/write for big endian

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 1 04:34:22 PDT 2016


labath requested changes to this revision.
labath added a comment.
This revision now requires changes to proceed.

I don't think the patch can go in in this form. Also, you seem to be putting multiple unrelated changes in one patch. It would be much easier to review if you split that up into multiple patches.


================
Comment at: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:1844
@@ +1843,3 @@
+    
+    uint64_t value;
+    value = reg_size == 4 ? *(uint32_t *)reg_bytes : *(uint64_t *)reg_bytes;
----------------
This looks like a massive hack. The register value object already takes a byte order as a parameter, so the fact that you are doing some funny endian conversions here means that there is something wrong. Also, this probably will not work for registers whose sizes are not 4 or 8 (%ah, %ax, all SSE registers, etc.).

I think we'll need to find a different way to fix this.


https://reviews.llvm.org/D24124





More information about the lldb-commits mailing list