[Lldb-commits] [PATCH] D39487: Add float/vector registers for ppc64le
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Nov 2 05:31:50 PDT 2017
labath added inline comments.
================
Comment at: source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.cpp:534
+Status NativeRegisterContextLinux_ppc64le::ReadVMX() {
+ void *buf = GetVMXBuffer();
+ if (!buf)
----------------
Isn't this somewhat over-engineered?
I mean, GetVMXBuffer returns a pointer to a member variable, so it's pretty much impossible for it to be null. And all GetVMXSize does is return the size of that member variable. If we remove all this boilerplate then this becomes something like:
```
int regset = NT_PPC_VMX;
return NativeProcessLinux::PtraceWrapper(PTRACE_SETVRREGS, m_thread.GetID(),
®set, &m_vmx_ppc64le, sizeof(m_vmx_ppc64le));
```
which I think is much easier to follow than jumping through dozens of these tiny functions
https://reviews.llvm.org/D39487
More information about the lldb-commits
mailing list