aboutsummaryrefslogtreecommitdiffstats
path: root/source/Target/RegisterContext.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-12-18 20:12:36 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-12-18 20:12:36 +0000
commitef5d0b5e97ec8e6fa395d377b09aa7755e345b4f (patch)
tree27916256fdeeb57d10d2f3d6948be5d71a703215 /source/Target/RegisterContext.cpp
parent76e0736e7fcfeb179779e49c05604464b1ccd704 (diff)
downloadsrc-ef5d0b5e97ec8e6fa395d377b09aa7755e345b4f.tar.gz
src-ef5d0b5e97ec8e6fa395d377b09aa7755e345b4f.zip
Vendor import of lldb trunk r321017:vendor/lldb/lldb-trunk-r321017
Notes
Notes: svn path=/vendor/lldb/dist/; revision=326949 svn path=/vendor/lldb/lldb-trunk-r321017/; revision=326950; tag=vendor/lldb/lldb-trunk-r321017
Diffstat (limited to 'source/Target/RegisterContext.cpp')
-rw-r--r--source/Target/RegisterContext.cpp136
1 files changed, 3 insertions, 133 deletions
diff --git a/source/Target/RegisterContext.cpp b/source/Target/RegisterContext.cpp
index 66164c175e41..28beb7bcb5e8 100644
--- a/source/Target/RegisterContext.cpp
+++ b/source/Target/RegisterContext.cpp
@@ -93,10 +93,9 @@ RegisterContext::UpdateDynamicRegisterSize(const lldb_private::ArchSpec &arch,
Value result;
Status error;
const lldb::offset_t offset = 0;
- if (dwarf_expr.Evaluate(&exe_ctx, nullptr, nullptr, this, opcode_ctx,
- dwarf_data, nullptr, offset, dwarf_opcode_len,
- eRegisterKindDWARF, nullptr, nullptr, result,
- &error)) {
+ if (dwarf_expr.Evaluate(&exe_ctx, this, opcode_ctx, dwarf_data, nullptr,
+ offset, dwarf_opcode_len, eRegisterKindDWARF, nullptr,
+ nullptr, result, &error)) {
expr_result = result.GetScalar().SInt(-1);
switch (expr_result) {
case 0:
@@ -457,132 +456,3 @@ bool RegisterContext::ConvertBetweenRegisterKinds(lldb::RegisterKind source_rk,
}
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);
-//}