electriclilies created this revision.
Herald added a project: All.
electriclilies requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D158009

Files:
  lldb/include/lldb/Core/ValueObject.h
  lldb/include/lldb/Core/ValueObjectSyntheticFilter.h
  lldb/source/Core/ValueObject.cpp
  lldb/source/DataFormatters/DataVisualization.cpp
  lldb/source/DataFormatters/FormatManager.cpp
  lldb/source/DataFormatters/LanguageCategory.cpp

Index: lldb/source/DataFormatters/LanguageCategory.cpp
===================================================================
--- lldb/source/DataFormatters/LanguageCategory.cpp
+++ lldb/source/DataFormatters/LanguageCategory.cpp
@@ -71,20 +71,16 @@
 
 template <>
 auto &LanguageCategory::GetHardcodedFinder<lldb::TypeFormatImplSP>() {
-    llvm::errs() << "get hardedcoded finder type formatn\n";
   return m_hardcoded_formats;
 }
 
 template <>
 auto &LanguageCategory::GetHardcodedFinder<lldb::TypeSummaryImplSP>() {
-  llvm::errs() << "get hardedcoded finder type summary\n";
   return m_hardcoded_summaries;
 }
 
 template <>
 auto &LanguageCategory::GetHardcodedFinder<lldb::SyntheticChildrenSP>() {
-  llvm::errs() << "get hardedcoded finder synthetic children\n";
-
   return m_hardcoded_synthetics;
 }
 
@@ -94,19 +90,14 @@
 bool LanguageCategory::GetHardcoded(FormatManager &fmt_mgr,
                                     FormattersMatchData &match_data,
                                     ImplSP &retval_sp) {
-  llvm::errs() << "languagecategory::GetHardcoded\n";
-  if (!IsEnabled()) {
-    llvm::errs() << "not enabled\n";
+  if (!IsEnabled())
     return false;
-  }
 
   ValueObject &valobj(match_data.GetValueObject());
   lldb::DynamicValueType use_dynamic(match_data.GetDynamicValueType());
-  llvm::errs() << "language category checkpoint\n";
+
   for (auto &candidate : GetHardcodedFinder<ImplSP>()) {
-    llvm::errs() << "looking at candidates\n;";
     if (auto result = candidate(valobj, use_dynamic, fmt_mgr)) {
-      llvm::errs() << "result\n";
       retval_sp = result;
       break;
     }
Index: lldb/source/DataFormatters/FormatManager.cpp
===================================================================
--- lldb/source/DataFormatters/FormatManager.cpp
+++ lldb/source/DataFormatters/FormatManager.cpp
@@ -588,13 +588,9 @@
 ImplSP FormatManager::GetHardcoded(FormattersMatchData &match_data) {
   ImplSP retval_sp;
   for (lldb::LanguageType lang_type : match_data.GetCandidateLanguages()) {
-    llvm::errs() << "lang type: " << lang_type << "\n";
     if (LanguageCategory *lang_category = GetCategoryForLanguage(lang_type)) {
-      llvm::errs() << "lang_category: " << lang_category << "\n";
-      if (lang_category->GetHardcoded(*this, match_data, retval_sp)) {
-        llvm::errs() << "lang_category->GetHardcoded succeeded\n";
+      if (lang_category->GetHardcoded(*this, match_data, retval_sp))
         return retval_sp;
-      }
     }
   }
   return retval_sp;
@@ -612,12 +608,9 @@
 template <typename ImplSP>
 ImplSP FormatManager::Get(ValueObject &valobj,
                           lldb::DynamicValueType use_dynamic) {
-  llvm::errs() << "format manager get\n";
-  llvm::errs() << "valobj dynamic value type: " << valobj.DoesProvideSyntheticValue() << "\n";
   FormattersMatchData match_data(valobj, use_dynamic);
   if (ImplSP retval_sp = GetCached<ImplSP>(match_data))
     return retval_sp;
-  llvm::errs() << "ckpt 1\n";
 
   Log *log = GetLog(LLDBLog::DataFormatters);
 
@@ -632,8 +625,6 @@
         }
     }
   }
-  llvm::errs() << "ckpt 2\n";
-
 
   LLDB_LOGF(log, FORMAT_LOG("Search failed. Giving hardcoded a chance."));
   return GetHardcoded<ImplSP>(match_data);
@@ -687,7 +678,6 @@
 lldb::SyntheticChildrenSP
 FormatManager::GetSyntheticChildren(ValueObject &valobj,
                                     lldb::DynamicValueType use_dynamic) {
-  llvm::errs() << "format manager get synthetic children\n";
   return Get<lldb::SyntheticChildrenSP>(valobj, use_dynamic);
 }
 
Index: lldb/source/DataFormatters/DataVisualization.cpp
===================================================================
--- lldb/source/DataFormatters/DataVisualization.cpp
+++ lldb/source/DataFormatters/DataVisualization.cpp
@@ -52,7 +52,6 @@
 lldb::SyntheticChildrenSP
 DataVisualization::GetSyntheticChildren(ValueObject &valobj,
                                         lldb::DynamicValueType use_dynamic) {
-  llvm::errs() << "inside get synthetic children2\n";
   return GetFormatManager().GetSyntheticChildren(valobj, use_dynamic);
 }
 
Index: lldb/source/Core/ValueObject.cpp
===================================================================
--- lldb/source/Core/ValueObject.cpp
+++ lldb/source/Core/ValueObject.cpp
@@ -218,10 +218,8 @@
     SetValueFormat(DataVisualization::GetFormat(*this, eNoDynamicValues));
     SetSummaryFormat(
         DataVisualization::GetSummaryFormat(*this, GetDynamicValueType()));
-    llvm::errs() << "about to call SetSyntheticChildren\n";
     SetSyntheticChildren(
         DataVisualization::GetSyntheticChildren(*this, GetDynamicValueType()));
-    llvm::errs() << "SetSyntheticChildren call finished\n";
   }
 
   return any_change;
@@ -546,6 +544,7 @@
   CompilerType child_compiler_type;
 
   ExecutionContext exe_ctx(GetExecutionContextRef());
+
   child_compiler_type = GetCompilerType().GetChildCompilerTypeAtIndex(
       &exe_ctx, idx, transparent_pointers, omit_empty_base_classes,
       ignore_array_bounds, child_name_str, child_byte_size, child_byte_offset,
@@ -1169,6 +1168,7 @@
     Stream &s, ValueObjectRepresentationStyle val_obj_display,
     Format custom_format, PrintableRepresentationSpecialCases special,
     bool do_dump_error) {
+
   // If the ValueObject has an error, we might end up dumping the type, which
   // is useful, but if we don't even have a type, then don't examine the object
   // further as that's not meaningful, only the error is.
@@ -1813,7 +1813,6 @@
 }
 
 void ValueObject::CalculateSyntheticValue() {
-  llvm::errs() << "calculatesyntheticvalue\n";
   TargetSP target_sp(GetTargetSP());
   if (target_sp && !target_sp->GetEnableSyntheticValue()) {
     m_synthetic_value = nullptr;
@@ -1824,20 +1823,14 @@
 
   if (!UpdateFormatsIfNeeded() && m_synthetic_value)
     return;
-  llvm::errs() << "1\n";
 
   if (m_synthetic_children_sp.get() == nullptr)
     return;
 
-  llvm::errs() << "2\n";
-
   if (current_synth_sp == m_synthetic_children_sp && m_synthetic_value)
     return;
 
-  llvm::errs() << "3\n";
-
   m_synthetic_value = new ValueObjectSynthetic(*this, m_synthetic_children_sp);
-  llvm::errs() << "set synthetic children\n";
 }
 
 void ValueObject::CalculateDynamicValue(DynamicValueType use_dynamic) {
@@ -2674,6 +2667,7 @@
     uint64_t language_flags = 0;
 
     ExecutionContext exe_ctx(GetExecutionContextRef());
+
     child_compiler_type = compiler_type.GetChildCompilerTypeAtIndex(
         &exe_ctx, 0, transparent_pointers, omit_empty_base_classes,
         ignore_array_bounds, child_name_str, child_byte_size, child_byte_offset,
Index: lldb/include/lldb/Core/ValueObjectSyntheticFilter.h
===================================================================
--- lldb/include/lldb/Core/ValueObjectSyntheticFilter.h
+++ lldb/include/lldb/Core/ValueObjectSyntheticFilter.h
@@ -66,7 +66,7 @@
 
   bool HasSyntheticValue() override { return false; }
 
-  bool IsSynthetic() override { llvm::errs() << "is synthetic\n"; return true; }
+  bool IsSynthetic() override { return true; }
 
   void CalculateSyntheticValue() override {}
 
Index: lldb/include/lldb/Core/ValueObject.h
===================================================================
--- lldb/include/lldb/Core/ValueObject.h
+++ lldb/include/lldb/Core/ValueObject.h
@@ -733,17 +733,13 @@
   }
 
   void SetSyntheticChildren(const lldb::SyntheticChildrenSP &synth_sp) {
-    llvm::errs() << "set synthetic children called\n";
-    llvm::errs() << "synth_sp: " << synth_sp.get() << "\n";
     if (synth_sp.get() == m_synthetic_children_sp.get())
       return;
     ClearUserVisibleData(eClearUserVisibleDataItemsSyntheticChildren);
-    llvm::errs() << "actually set m_synthetic_children_sp\n";
     m_synthetic_children_sp = synth_sp;
   }
 
   lldb::SyntheticChildrenSP GetSyntheticChildren() {
-    llvm::errs() << "inside get synthetic children\n";
     UpdateFormatsIfNeeded();
     return m_synthetic_children_sp;
   }
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to