[Lldb-commits] [lldb] f3b07f9 - [lldb] Remove unused StackFrame::TrackGlobalVariable

Dave Lee via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 12 08:51:36 PST 2021


Author: Dave Lee
Date: 2021-03-12T08:51:25-08:00
New Revision: f3b07f9c5d97a53b7253f4ffa2133bf6d31e3aec

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

LOG: [lldb] Remove unused StackFrame::TrackGlobalVariable

Last used by the Go plugin which was removed in https://reviews.llvm.org/D54057.

Added: 
    

Modified: 
    lldb/include/lldb/Target/StackFrame.h
    lldb/source/Target/StackFrame.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Target/StackFrame.h b/lldb/include/lldb/Target/StackFrame.h
index f57d7cc956eb..1a9aaad1a4db 100644
--- a/lldb/include/lldb/Target/StackFrame.h
+++ b/lldb/include/lldb/Target/StackFrame.h
@@ -422,22 +422,6 @@ class StackFrame : public ExecutionContextScope,
   GetValueObjectForFrameVariable(const lldb::VariableSP &variable_sp,
                                  lldb::DynamicValueType use_dynamic);
 
-  /// Add an arbitrary Variable object (e.g. one that specifics a global or
-  /// static) to a StackFrame's list of ValueObjects.
-  ///
-  /// \params [in] variable_sp
-  ///   The Variable to base this ValueObject on
-  ///
-  /// \params [in] use_dynamic
-  ///     Whether the correct dynamic type of the variable should be
-  ///     determined before creating the ValueObject, or if the static type
-  ///     is sufficient.  One of the DynamicValueType enumerated values.
-  ///
-  /// \return
-  ///     A ValueObject for this variable.
-  lldb::ValueObjectSP TrackGlobalVariable(const lldb::VariableSP &variable_sp,
-                                          lldb::DynamicValueType use_dynamic);
-
   /// Query this frame to determine what the default language should be when
   /// parsing expressions given the execution context.
   ///

diff  --git a/lldb/source/Target/StackFrame.cpp b/lldb/source/Target/StackFrame.cpp
index 49e2a0dd074f..5402ba2626b1 100644
--- a/lldb/source/Target/StackFrame.cpp
+++ b/lldb/source/Target/StackFrame.cpp
@@ -1166,31 +1166,6 @@ StackFrame::GetValueObjectForFrameVariable(const VariableSP &variable_sp,
   return valobj_sp;
 }
 
-ValueObjectSP StackFrame::TrackGlobalVariable(const VariableSP &variable_sp,
-                                              DynamicValueType use_dynamic) {
-  std::lock_guard<std::recursive_mutex> guard(m_mutex);
-  if (IsHistorical())
-    return ValueObjectSP();
-
-  // Check to make sure we aren't already tracking this variable?
-  ValueObjectSP valobj_sp(
-      GetValueObjectForFrameVariable(variable_sp, use_dynamic));
-  if (!valobj_sp) {
-    // We aren't already tracking this global
-    VariableList *var_list = GetVariableList(true);
-    // If this frame has no variables, create a new list
-    if (var_list == nullptr)
-      m_variable_list_sp = std::make_shared<VariableList>();
-
-    // Add the global/static variable to this frame
-    m_variable_list_sp->AddVariable(variable_sp);
-
-    // Now make a value object for it so we can track its changes
-    valobj_sp = GetValueObjectForFrameVariable(variable_sp, use_dynamic);
-  }
-  return valobj_sp;
-}
-
 bool StackFrame::IsInlined() {
   if (m_sc.block == nullptr)
     GetSymbolContext(eSymbolContextBlock);


        


More information about the lldb-commits mailing list