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: 
@@ -827,2 +806,3 @@
+  if (m_xstate_type == XStateType::Invalid) {
     if (const_cast<NativeRegisterContextLinux_x86_64 
       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: 
@@ -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?

lldb-commits mailing list

Reply via email to