labath added a comment. In D63545#1551675 <https://reviews.llvm.org/D63545#1551675>, @mgorny wrote:
> In D63545#1551627 <https://reviews.llvm.org/D63545#1551627>, @labath wrote: > > > We have the same XSTATE<->YMM conversion functions in NativeProcessLinux. > > It would be nice to extract them to some common place > > (Plugins/Process/Utility, I guess :P). > > > Hmm, I guess that's doable if we pass the relevant struct fields as pointers. Maybe have GetYMM(unsigned num, YMM& reg)/SetYMM(unsigned num, const YMM ®) methods on the XSAVE struct ? > > >> The rest seems pretty straight-forward, though you're repeating the patterns >> that I find really reduntant/annoying. Eg. I don't see the reason to check >> the null-ness of the XState buffer. It sounds like it should be a hard error >> for someone to call ReadXState without bothering to arrange for the storage >> buffer to exist. > > Yeah, I guess that's something I can fix globally first. Sounds great. ================ Comment at: lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp:239 + + if (byte_order == lldb::eByteOrderBig) { + ::memcpy(m_xstate_x86_64.xs_fxsave.fx_xmm[reg_index].xmm_bytes, ---------------- mgorny wrote: > labath wrote: > > Why would we ever want to do this? > I was asking myself the exact same thing! But the code is present both on > Linux and FreeBSD, so I presumed there is some fancy use case I have no clue > about. Yeah, I don't think that's a safe assumption around here. :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63545/new/ https://reviews.llvm.org/D63545 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits