[Lldb-commits] [lldb] 762e8f9 - [lldb] [Process/NetBSD] Fix operating on ftag register

Michał Górny via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 30 06:39:38 PDT 2020


Author: Michał Górny
Date: 2020-09-30T15:39:31+02:00
New Revision: 762e8f9bbdaf43300dbc75637a8bce1ce643cc06

URL: https://github.com/llvm/llvm-project/commit/762e8f9bbdaf43300dbc75637a8bce1ce643cc06
DIFF: https://github.com/llvm/llvm-project/commit/762e8f9bbdaf43300dbc75637a8bce1ce643cc06.diff

LOG: [lldb] [Process/NetBSD] Fix operating on ftag register

Added: 
    

Modified: 
    lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp b/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
index ca4706a65657..af8b2a2ba794 100644
--- a/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
+++ b/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
@@ -324,7 +324,7 @@ static constexpr int RegNumX86ToX86_64(int regnum) {
   case lldb_fstat_i386:
     return lldb_fstat_x86_64;
   case lldb_ftag_i386:
-    return lldb_fstat_x86_64;
+    return lldb_ftag_x86_64;
   case lldb_fop_i386:
     return lldb_fop_x86_64;
   case lldb_fiseg_i386:
@@ -651,7 +651,7 @@ NativeRegisterContextNetBSD_x86_64::ReadRegister(const RegisterInfo *reg_info,
     reg_value = (uint16_t)m_fpr.fxstate.fx_sw;
     break;
   case lldb_ftag_x86_64:
-    reg_value = (uint8_t)m_fpr.fxstate.fx_tw;
+    reg_value = (uint16_t)m_fpr.fxstate.fx_tw;
     break;
   case lldb_fop_x86_64:
     reg_value = (uint64_t)m_fpr.fxstate.fx_opcode;
@@ -939,7 +939,7 @@ Status NativeRegisterContextNetBSD_x86_64::WriteRegister(
     m_fpr.fxstate.fx_sw = reg_value.GetAsUInt16();
     break;
   case lldb_ftag_x86_64:
-    m_fpr.fxstate.fx_tw = reg_value.GetAsUInt8();
+    m_fpr.fxstate.fx_tw = reg_value.GetAsUInt16();
     break;
   case lldb_fop_x86_64:
     m_fpr.fxstate.fx_opcode = reg_value.GetAsUInt16();


        


More information about the lldb-commits mailing list