mgorny added inline comments.

================
Comment at: 
lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp:994-995
         !(m_xstate.xs_rfbm & XCR0_YMM_Hi128)) {
-      error.SetErrorStringWithFormat("register \"%s\" not supported by 
CPU/kernel",
-                                     reg_info->name);
+      error.SetErrorStringWithFormat(
+          "register \"%s\" not supported by CPU/kernel", reg_info->name);
     } else {
----------------
labath wrote:
> Is this code actually reachable? Ideally, I'd expect this to be checked 
> immediately after program startup, so that we can avoid even reporting the 
> existence of [xy]mm registers..
Yes, it is. I've just run it inside qemu with an emulated non-AVX CPU, and the 
code definitely gets run. The user-visible result is apparently that the 
registers are reported as unavailable.

I suppose we could use sysctl (or cpuid) to check for supported instruction 
sets in constructor but I don't really know how to make LLDB consider them 
non-existing.

In any case, I think that's material for a separate patch.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90034/new/

https://reviews.llvm.org/D90034

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

Reply via email to