Merged in r311585. Thanks!
On Wed, Aug 23, 2017 at 11:02 AM, Greg Clayton <clayb...@gmail.com> wrote: > Fine with me. > > On Aug 23, 2017, at 10:47 AM, Saleem Abdulrasool <compn...@compnerd.org> > wrote: > > This would be nice to merge to 5.0 IMO. It fixes reading the x87 FPU state. > What do you think Greg? > > On Wed, Aug 23, 2017 at 10:24 AM Saleem Abdulrasool via lldb-commits > <lldb-commits@lists.llvm.org> wrote: >> >> Author: compnerd >> Date: Wed Aug 23 10:23:12 2017 >> New Revision: 311579 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=311579&view=rev >> Log: >> Process: fix FXSAVE on x86 >> >> The FXSAVE member `ftw` (FPU Tag Word) was given the wrong size (8-bit) >> instead of the correct width (16-bit) as per the x87 Programmer's >> Manual. Adjust this to ensure that we print out the complete value for >> the register. >> >> Modified: >> >> lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py >> >> lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp >> lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h >> >> Modified: >> lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py >> URL: >> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py?rev=311579&r1=311578&r2=311579&view=diff >> >> ============================================================================== >> --- >> lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py >> (original) >> +++ >> lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py >> Wed Aug 23 10:23:12 2017 >> @@ -256,7 +256,7 @@ class RegisterCommandsTestCase(TestBase) >> self.expect( >> "register read ftag", substrs=[ >> 'ftag' + ' = ', str( >> - "0x%0.2x" % >> + "0x%0.4x" % >> (reg_value_ftag_initial | ( >> 1 << fstat_top_pointer_initial)))]) >> reg_value_ftag_initial = reg_value_ftag_initial | ( >> >> Modified: >> lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp >> URL: >> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp?rev=311579&r1=311578&r2=311579&view=diff >> >> ============================================================================== >> --- >> lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp >> (original) >> +++ >> lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp Wed >> Aug 23 10:23:12 2017 >> @@ -36,8 +36,7 @@ struct GPR { >> struct FPR_i386 { >> uint16_t fctrl; // FPU Control Word (fcw) >> uint16_t fstat; // FPU Status Word (fsw) >> - uint8_t ftag; // FPU Tag Word (ftw) >> - uint8_t reserved_1; // Reserved >> + uint16_t ftag; // FPU Tag Word (ftw) >> uint16_t fop; // Last Instruction Opcode (fop) >> union { >> struct { >> >> Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h >> URL: >> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h?rev=311579&r1=311578&r2=311579&view=diff >> >> ============================================================================== >> --- lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h >> (original) >> +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h Wed >> Aug 23 10:23:12 2017 >> @@ -257,8 +257,7 @@ struct XMMReg { >> struct FXSAVE { >> uint16_t fctrl; // FPU Control Word (fcw) >> uint16_t fstat; // FPU Status Word (fsw) >> - uint8_t ftag; // FPU Tag Word (ftw) >> - uint8_t reserved_1; // Reserved >> + uint16_t ftag; // FPU Tag Word (ftw) >> uint16_t fop; // Last Instruction Opcode (fop) >> union { >> struct { >> >> >> _______________________________________________ >> lldb-commits mailing list >> lldb-commits@lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits > > -- > Saleem Abdulrasool > compnerd (at) compnerd (dot) org > > _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits