[lldb] Delete ValueObjectRegisterContext class
authorPavel Labath <labath@google.com>
Thu, 6 Feb 2020 22:47:56 +0000 (14:47 -0800)
committerPavel Labath <labath@google.com>
Fri, 7 Feb 2020 17:20:22 +0000 (09:20 -0800)
It is unused.

lldb/include/lldb/Core/ValueObjectRegister.h
lldb/source/Core/ValueObjectRegister.cpp

index 8f36438..28dad99 100644 (file)
@@ -28,43 +28,6 @@ class ExecutionContextScope;
 class Scalar;
 class Stream;
 
-// A ValueObject that contains a root variable that may or may not
-// have children.
-class ValueObjectRegisterContext : public ValueObject {
-public:
-  ~ValueObjectRegisterContext() override;
-
-  uint64_t GetByteSize() override;
-
-  lldb::ValueType GetValueType() const override {
-    return lldb::eValueTypeRegisterSet;
-  }
-
-  ConstString GetTypeName() override;
-
-  ConstString GetQualifiedTypeName() override;
-
-  ConstString GetDisplayTypeName() override;
-
-  size_t CalculateNumChildren(uint32_t max) override;
-
-  ValueObject *CreateChildAtIndex(size_t idx, bool synthetic_array_member,
-                                  int32_t synthetic_index) override;
-
-protected:
-  bool UpdateValue() override;
-
-  CompilerType GetCompilerTypeImpl() override;
-
-  lldb::RegisterContextSP m_reg_ctx_sp;
-
-private:
-  ValueObjectRegisterContext(ValueObject &parent,
-                             lldb::RegisterContextSP &reg_ctx_sp);
-  // For ValueObject only
-  DISALLOW_COPY_AND_ASSIGN(ValueObjectRegisterContext);
-};
-
 class ValueObjectRegisterSet : public ValueObject {
 public:
   ~ValueObjectRegisterSet() override;
index 22a7b15..f05f772 100644 (file)
@@ -35,72 +35,6 @@ class ExecutionContextScope;
 using namespace lldb;
 using namespace lldb_private;
 
-#pragma mark ValueObjectRegisterContext
-
-ValueObjectRegisterContext::ValueObjectRegisterContext(
-    ValueObject &parent, RegisterContextSP &reg_ctx)
-    : ValueObject(parent), m_reg_ctx_sp(reg_ctx) {
-  assert(reg_ctx);
-  m_name.SetCString("Registers");
-  SetValueIsValid(true);
-}
-
-ValueObjectRegisterContext::~ValueObjectRegisterContext() {}
-
-CompilerType ValueObjectRegisterContext::GetCompilerTypeImpl() {
-  return CompilerType();
-}
-
-ConstString ValueObjectRegisterContext::GetTypeName() { return ConstString(); }
-
-ConstString ValueObjectRegisterContext::GetDisplayTypeName() {
-  return ConstString();
-}
-
-ConstString ValueObjectRegisterContext::GetQualifiedTypeName() {
-  return ConstString();
-}
-
-size_t ValueObjectRegisterContext::CalculateNumChildren(uint32_t max) {
-  auto reg_set_count = m_reg_ctx_sp->GetRegisterSetCount();
-  return reg_set_count <= max ? reg_set_count : max;
-}
-
-uint64_t ValueObjectRegisterContext::GetByteSize() { return 0; }
-
-bool ValueObjectRegisterContext::UpdateValue() {
-  m_error.Clear();
-  ExecutionContext exe_ctx(GetExecutionContextRef());
-  StackFrame *frame = exe_ctx.GetFramePtr();
-  if (frame)
-    m_reg_ctx_sp = frame->GetRegisterContext();
-  else
-    m_reg_ctx_sp.reset();
-
-  if (m_reg_ctx_sp.get() == nullptr) {
-    SetValueIsValid(false);
-    m_error.SetErrorToGenericError();
-  } else
-    SetValueIsValid(true);
-
-  return m_error.Success();
-}
-
-ValueObject *ValueObjectRegisterContext::CreateChildAtIndex(
-    size_t idx, bool synthetic_array_member, int32_t synthetic_index) {
-  ValueObject *new_valobj = nullptr;
-
-  const size_t num_children = GetNumChildren();
-  if (idx < num_children) {
-    ExecutionContext exe_ctx(GetExecutionContextRef());
-    new_valobj = new ValueObjectRegisterSet(
-        exe_ctx.GetBestExecutionContextScope(), m_reg_ctx_sp, idx);
-  }
-
-  return new_valobj;
-}
-
-#pragma mark -
 #pragma mark ValueObjectRegisterSet
 
 ValueObjectSP