[Lldb-commits] [PATCH] D15884: [LLDB][MIPS] Make register read/write to set/get the size of register according to abi.
Tamas Berghammer via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 5 02:42:49 PST 2016
tberghammer accepted this revision.
tberghammer added a comment.
This revision is now accepted and ready to land.
Looks good
================
Comment at: source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp:1391
@@ -1390,3 +1390,3 @@
if (m_thread.GetProcess()->GetArchitecture(arch))
- value.SetBytes((void *)(((unsigned char *)®s) + offset + 4 * (arch.GetMachine() == llvm::Triple::mips)), arch.GetAddressByteSize(), arch.GetByteOrder());
+ value.SetBytes((void *)(((unsigned char *)®s) + offset + 4 * (arch.GetMachine() == llvm::Triple::mips)), 4 + (!(arch.GetFlags() & lldb_private::ArchSpec::eMIPSABI_O32) * 4), arch.GetByteOrder());
else
----------------
(nit): I would prefer to use the following syntax, but don't feel strongly about it:
```
(arch.GetFlags() & lldb_private::ArchSpec::eMIPSABI_O32) ? 4 : 8
```
Repository:
rL LLVM
http://reviews.llvm.org/D15884
More information about the lldb-commits
mailing list