[Lldb-commits] [lldb] r297691 - [debugserver] NFC. Missed one bit of cleanup in r297688
Chris Bieneman via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 13 16:46:51 PDT 2017
Author: cbieneman
Date: Mon Mar 13 18:46:50 2017
New Revision: 297691
URL: http://llvm.org/viewvc/llvm-project?rev=297691&view=rev
Log:
[debugserver] NFC. Missed one bit of cleanup in r297688
I did this cleanup in the x86_64, but missed it in the i386 code. This just simplifies the calls to thread_get_state.
Modified:
lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp
Modified: lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp?rev=297691&r1=297690&r2=297691&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp Mon Mar 13 18:46:50 2017
@@ -406,30 +406,21 @@ kern_return_t DNBArchImplI386::GetFPUSta
}
m_state.SetError(e_regSetFPU, Read, 0);
} else {
+ mach_msg_type_number_t count = e_regSetWordSizeFPU;
+ int flavor = __i386_FLOAT_STATE;
+
if (CPUHasAVX() || FORCE_AVX_REGS) {
- mach_msg_type_number_t count = e_regSetWordSizeAVX;
- m_state.SetError(e_regSetFPU, Read,
- ::thread_get_state(
- m_thread->MachPortNumber(), __i386_AVX_STATE,
- (thread_state_t)&m_state.context.fpu.avx, &count));
- DNBLogThreadedIf(LOG_THREAD, "::thread_get_state (0x%4.4x, %u, &avx, "
- "%u (%u passed in)) => 0x%8.8x",
- m_thread->MachPortNumber(), __i386_AVX_STATE, count,
- e_regSetWordSizeAVX,
- m_state.GetError(e_regSetFPU, Read));
- } else {
- mach_msg_type_number_t count = e_regSetWordSizeFPU;
- m_state.SetError(
- e_regSetFPU, Read,
- ::thread_get_state(m_thread->MachPortNumber(), __i386_FLOAT_STATE,
- (thread_state_t)&m_state.context.fpu.no_avx,
- &count));
- DNBLogThreadedIf(LOG_THREAD, "::thread_get_state (0x%4.4x, %u, &fpu, "
- "%u (%u passed in) => 0x%8.8x",
- m_thread->MachPortNumber(), __i386_FLOAT_STATE, count,
- e_regSetWordSizeFPU,
- m_state.GetError(e_regSetFPU, Read));
+ count = e_regSetWordSizeAVX;
+ flavor = __i386_AVX_STATE;
}
+ m_state.SetError(e_regSetFPU, Read,
+ ::thread_get_state(m_thread->MachPortNumber(), flavor,
+ (thread_state_t)&m_state.context.fpu,
+ &count));
+ DNBLogThreadedIf(LOG_THREAD,
+ "::thread_get_state (0x%4.4x, %u, &fpu, %u => 0x%8.8x",
+ m_thread->MachPortNumber(), flavor, (uint32_t)count,
+ m_state.GetError(e_regSetFPU, Read));
}
}
return m_state.GetError(e_regSetFPU, Read);
More information about the lldb-commits
mailing list