labath requested changes to this revision. labath added a comment. This revision now requires changes to proceed.
I am going to assume you know more about the exact details of the intel cpu's than me, so I am not going comment on the technical details. The code seems cleaner, so this looks like a good thing to do. Just please try to avoid using the const_cast if it's no absolutely necessary (and it almost never is). ================ Comment at: source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp:807 @@ -827,2 +806,3 @@ + if (m_xstate_type == XStateType::Invalid) { if (const_cast<NativeRegisterContextLinux_x86_64 *>(this)->ReadFPR().Fail()) return false; ---------------- I don't think the `const_cast` here is a good idea. How about we just make this functions non-const ? ================ Comment at: source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp:808 @@ -807,3 @@ - // Check if FXSAVE is enabled. - if (!__get_cpuid(1, &rax, &rbx, &rcx, &rdx)) - return false; ---------------- I remember you #including some header to get the __get_cpuid function. Can that be removed now? https://reviews.llvm.org/D24764 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits