anajuliapc added inline comments.

================
Comment at: 
source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.cpp:374
+  uint32_t tempControl = m_hwp_regs[wp_index].control;
+  long * tempSlot = reinterpret_cast<long *>(m_hwp_regs[wp_index].slot);
+
----------------
zturner wrote:
> `reinterpret_cast` from `long*` to `long`?  Is this correct?
Yes, It's strange but is the only way it works without changing 
`NativeProcessLinux::PtraceWrapper`. `PPC_PTRACE_DELHWDEBUG` works different 
from other PPC ptrace requests, because it must pass the return of 
`PPC_PTRACE_SETHWDEBUG` to [[ 
https://github.com/torvalds/linux/blob/master/Documentation/powerpc/ptrace.txt#L147
 | ptrace ]] instead of a data structure. If you pass it as `long`, 
PtraceWrapper fails because it must receive a `void*`.

I'll check the other points, thanks for the comments.


https://reviews.llvm.org/D38897



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to