[Lldb-commits] [lldb] r137113 - in /lldb/trunk/tools/debugserver/source/MacOSX: i386/DNBArchImplI386.h x86_64/DNBArchImplX86_64.h
Greg Clayton
gclayton at apple.com
Mon Aug 8 22:27:15 PDT 2011
Author: gclayton
Date: Tue Aug 9 00:27:14 2011
New Revision: 137113
URL: http://llvm.org/viewvc/llvm-project?rev=137113&view=rev
Log:
The "bool HasAVX()" function doesn't backup and restore the
cpu registers it uses and it crashes the release version of
debugserver. We just get lucky in Debug builds. Until this
is fixed I am disabling AVX detection to avoid the crashes.
Modified:
lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h
lldb/trunk/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.h
Modified: lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h?rev=137113&r1=137112&r2=137113&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h Tue Aug 9 00:27:14 2011
@@ -202,10 +202,17 @@
static bool
CPUHasAVX()
{
+#if 0
if (s_has_avx == kAVXUnknown)
s_has_avx = (::HasAVX() ? kAVXPresent : kAVXNotPresent);
return (s_has_avx == kAVXPresent);
+#else
+ // ::HasAVX() will cause this code to crash because the
+ // assembly function doesn't backup and restore the registers
+ // it uses. Until this is fixed, AVX will be disabled.
+ return 0;
+#endif
}
MachThread *m_thread;
Modified: lldb/trunk/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.h?rev=137113&r1=137112&r2=137113&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.h (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.h Tue Aug 9 00:27:14 2011
@@ -209,10 +209,17 @@
static bool
CPUHasAVX()
{
+#if 0
if (s_has_avx == kAVXUnknown)
s_has_avx = (::HasAVX() ? kAVXPresent : kAVXNotPresent);
return (s_has_avx == kAVXPresent);
+#else
+ // ::HasAVX() will cause this code to crash because the
+ // assembly function doesn't backup and restore the registers
+ // it uses. Until this is fixed, AVX will be disabled.
+ return 0;
+#endif
}
MachThread *m_thread;
More information about the lldb-commits
mailing list