[Lldb-commits] [lldb] r320060 - [Target] Remove commented out code. Found by inspection. NFCI.

Davide Italiano via lldb-commits lldb-commits at lists.llvm.org
Thu Dec 7 09:05:56 PST 2017


Author: davide
Date: Thu Dec  7 09:05:56 2017
New Revision: 320060

URL: http://llvm.org/viewvc/llvm-project?rev=320060&view=rev
Log:
[Target] Remove commented out code. Found by inspection. NFCI.

Modified:
    lldb/trunk/source/Target/RegisterContext.cpp

Modified: lldb/trunk/source/Target/RegisterContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/RegisterContext.cpp?rev=320060&r1=320059&r2=320060&view=diff
==============================================================================
--- lldb/trunk/source/Target/RegisterContext.cpp (original)
+++ lldb/trunk/source/Target/RegisterContext.cpp Thu Dec  7 09:05:56 2017
@@ -456,132 +456,3 @@ bool RegisterContext::ConvertBetweenRegi
   }
   return false;
 }
-
-// bool
-// RegisterContext::ReadRegisterValue (uint32_t reg, Scalar &value)
-//{
-//    DataExtractor data;
-//    if (!ReadRegisterBytes (reg, data))
-//        return false;
-//
-//    const RegisterInfo *reg_info = GetRegisterInfoAtIndex (reg);
-//    uint32_t offset = 0;
-//    switch (reg_info->encoding)
-//    {
-//    case eEncodingInvalid:
-//    case eEncodingVector:
-//        break;
-//
-//    case eEncodingUint:
-//        switch (reg_info->byte_size)
-//        {
-//        case 1:
-//            {
-//                value = data.GetU8 (&offset);
-//                return true;
-//            }
-//        case 2:
-//            {
-//                value = data.GetU16 (&offset);
-//                return true;
-//            }
-//        case 4:
-//            {
-//                value = data.GetU32 (&offset);
-//                return true;
-//            }
-//        case 8:
-//            {
-//                value = data.GetU64 (&offset);
-//                return true;
-//            }
-//        }
-//        break;
-//    case eEncodingSint:
-//        switch (reg_info->byte_size)
-//        {
-//        case 1:
-//            {
-//                int8_t v;
-//                if (data.ExtractBytes (0, sizeof (int8_t),
-//                endian::InlHostByteOrder(), &v) != sizeof (int8_t))
-//                    return false;
-//                value = v;
-//                return true;
-//            }
-//        case 2:
-//            {
-//                int16_t v;
-//                if (data.ExtractBytes (0, sizeof (int16_t),
-//                endian::InlHostByteOrder(), &v) != sizeof (int16_t))
-//                    return false;
-//                value = v;
-//                return true;
-//            }
-//        case 4:
-//            {
-//                int32_t v;
-//                if (data.ExtractBytes (0, sizeof (int32_t),
-//                endian::InlHostByteOrder(), &v) != sizeof (int32_t))
-//                    return false;
-//                value = v;
-//                return true;
-//            }
-//        case 8:
-//            {
-//                int64_t v;
-//                if (data.ExtractBytes (0, sizeof (int64_t),
-//                endian::InlHostByteOrder(), &v) != sizeof (int64_t))
-//                    return false;
-//                value = v;
-//                return true;
-//            }
-//        }
-//        break;
-//    case eEncodingIEEE754:
-//        switch (reg_info->byte_size)
-//        {
-//        case sizeof (float):
-//            {
-//                float v;
-//                if (data.ExtractBytes (0, sizeof (float),
-//                endian::InlHostByteOrder(), &v) != sizeof (float))
-//                    return false;
-//                value = v;
-//                return true;
-//            }
-//        case sizeof (double):
-//            {
-//                double v;
-//                if (data.ExtractBytes (0, sizeof (double),
-//                endian::InlHostByteOrder(), &v) != sizeof (double))
-//                    return false;
-//                value = v;
-//                return true;
-//            }
-//        case sizeof (long double):
-//            {
-//                double v;
-//                if (data.ExtractBytes (0, sizeof (long double),
-//                endian::InlHostByteOrder(), &v) != sizeof (long double))
-//                    return false;
-//                value = v;
-//                return true;
-//            }
-//        }
-//        break;
-//    }
-//    return false;
-//}
-//
-// bool
-// RegisterContext::WriteRegisterValue (uint32_t reg, const Scalar &value)
-//{
-//    DataExtractor data;
-//    if (!value.IsValid())
-//        return false;
-//    if (!value.GetData (data))
-//        return false;
-//
-//    return WriteRegisterBytes (reg, data);
-//}




More information about the lldb-commits mailing list