aboutsummaryrefslogtreecommitdiff
path: root/source/DataFormatters
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2013-12-03 18:51:59 +0000
committerEd Maste <emaste@FreeBSD.org>2013-12-03 18:51:59 +0000
commit86758c718870f701bc69c1ca05495305ed1c5b85 (patch)
treeb2051e4e4856cc58ac7e2d20242b870b4f355ca1 /source/DataFormatters
parentf21a844f60ae6c74fcf1fddca32461acce3c1ee0 (diff)
downloadsrc-86758c718870f701bc69c1ca05495305ed1c5b85.tar.gz
src-86758c718870f701bc69c1ca05495305ed1c5b85.zip
Import lldb as of SVN r196259 (git 3be86e5)vendor/lldb/lldb-r196259
(A number of files not required for the FreeBSD build have been removed.) Sponsored by: DARPA, AFRL
Notes
Notes: svn path=/vendor/lldb/dist/; revision=258882 svn path=/vendor/lldb/lldb-r196259/; revision=258883; tag=vendor/lldb/lldb-r196259
Diffstat (limited to 'source/DataFormatters')
-rw-r--r--source/DataFormatters/CXXFormatterFunctions.cpp30
-rw-r--r--source/DataFormatters/FormatClasses.cpp13
-rw-r--r--source/DataFormatters/FormatManager.cpp133
-rw-r--r--source/DataFormatters/LibCxx.cpp8
-rw-r--r--source/DataFormatters/LibStdcpp.cpp16
-rw-r--r--source/DataFormatters/NSDictionary.cpp4
-rw-r--r--source/DataFormatters/NSSet.cpp70
-rw-r--r--source/DataFormatters/TypeCategory.cpp35
-rw-r--r--source/DataFormatters/TypeCategoryMap.cpp15
9 files changed, 253 insertions, 71 deletions
diff --git a/source/DataFormatters/CXXFormatterFunctions.cpp b/source/DataFormatters/CXXFormatterFunctions.cpp
index e00413556cc9..136c8c51e660 100644
--- a/source/DataFormatters/CXXFormatterFunctions.cpp
+++ b/source/DataFormatters/CXXFormatterFunctions.cpp
@@ -49,9 +49,9 @@ lldb_private::formatters::ExtractValueFromObjCExpression (ValueObject &valobj,
return false;
EvaluateExpressionOptions options;
- options.SetCoerceToId(false)
- .SetUnwindOnError(true)
- .SetKeepInMemory(true);
+ options.SetCoerceToId(false);
+ options.SetUnwindOnError(true);
+ options.SetKeepInMemory(true);
target->EvaluateExpression(expr.GetData(),
stack_frame,
@@ -83,10 +83,10 @@ lldb_private::formatters::ExtractSummaryFromObjCExpression (ValueObject &valobj,
return false;
EvaluateExpressionOptions options;
- options.SetCoerceToId(false)
- .SetUnwindOnError(true)
- .SetKeepInMemory(true)
- .SetUseDynamic(lldb::eDynamicCanRunTarget);
+ options.SetCoerceToId(false);
+ options.SetUnwindOnError(true);
+ options.SetKeepInMemory(true);
+ options.SetUseDynamic(lldb::eDynamicCanRunTarget);
target->EvaluateExpression(expr.GetData(),
stack_frame,
@@ -121,10 +121,10 @@ lldb_private::formatters::CallSelectorOnObject (ValueObject &valobj,
return valobj_sp;
EvaluateExpressionOptions options;
- options.SetCoerceToId(false)
- .SetUnwindOnError(true)
- .SetKeepInMemory(true)
- .SetUseDynamic(lldb::eDynamicCanRunTarget);
+ options.SetCoerceToId(false);
+ options.SetUnwindOnError(true);
+ options.SetKeepInMemory(true);
+ options.SetUseDynamic(lldb::eDynamicCanRunTarget);
target->EvaluateExpression(expr.GetData(),
stack_frame,
@@ -158,10 +158,10 @@ lldb_private::formatters::CallSelectorOnObject (ValueObject &valobj,
return valobj_sp;
EvaluateExpressionOptions options;
- options.SetCoerceToId(false)
- .SetUnwindOnError(true)
- .SetKeepInMemory(true)
- .SetUseDynamic(lldb::eDynamicCanRunTarget);
+ options.SetCoerceToId(false);
+ options.SetUnwindOnError(true);
+ options.SetKeepInMemory(true);
+ options.SetUseDynamic(lldb::eDynamicCanRunTarget);
target->EvaluateExpression(expr.GetData(),
stack_frame,
diff --git a/source/DataFormatters/FormatClasses.cpp b/source/DataFormatters/FormatClasses.cpp
index c67f86a7493d..f27b45b30491 100644
--- a/source/DataFormatters/FormatClasses.cpp
+++ b/source/DataFormatters/FormatClasses.cpp
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
-#include "lldb/lldb-python.h"
+#include "lldb/DataFormatters/FormatClasses.h"
// C Includes
@@ -16,17 +16,6 @@
// Other libraries and framework includes
// Project includes
-#include "lldb/lldb-public.h"
-#include "lldb/lldb-enumerations.h"
-
-#include "lldb/Core/Debugger.h"
-#include "lldb/Core/StreamString.h"
-#include "lldb/Core/Timer.h"
-#include "lldb/DataFormatters/FormatClasses.h"
-#include "lldb/Interpreter/CommandInterpreter.h"
-#include "lldb/Symbol/ClangASTType.h"
-#include "lldb/Target/StackFrame.h"
-#include "lldb/Target/Target.h"
using namespace lldb;
using namespace lldb_private;
diff --git a/source/DataFormatters/FormatManager.cpp b/source/DataFormatters/FormatManager.cpp
index b4c4628b48a2..bec2edf5d5c2 100644
--- a/source/DataFormatters/FormatManager.cpp
+++ b/source/DataFormatters/FormatManager.cpp
@@ -163,6 +163,139 @@ FormatManager::GetFormatAsCString (Format format)
return NULL;
}
+void
+FormatManager::GetPossibleMatches (ValueObject& valobj,
+ ClangASTType clang_type,
+ uint32_t reason,
+ lldb::DynamicValueType use_dynamic,
+ FormattersMatchVector& entries,
+ bool did_strip_ptr,
+ bool did_strip_ref,
+ bool did_strip_typedef,
+ bool root_level)
+{
+ clang_type = clang_type.RemoveFastQualifiers();
+ ConstString type_name(clang_type.GetConstTypeName());
+ if (valobj.GetBitfieldBitSize() > 0)
+ {
+ StreamString sstring;
+ sstring.Printf("%s:%d",type_name.AsCString(),valobj.GetBitfieldBitSize());
+ ConstString bitfieldname = ConstString(sstring.GetData());
+ entries.push_back({bitfieldname,0,did_strip_ptr,did_strip_ref,did_strip_typedef});
+ reason |= lldb_private::eFormatterChoiceCriterionStrippedBitField;
+ }
+ entries.push_back({type_name,reason,did_strip_ptr,did_strip_ref,did_strip_typedef});
+
+ if (clang_type.IsReferenceType())
+ {
+ ClangASTType non_ref_type = clang_type.GetNonReferenceType();
+ GetPossibleMatches(valobj,
+ non_ref_type,
+ reason | lldb_private::eFormatterChoiceCriterionStrippedPointerReference,
+ use_dynamic,
+ entries,
+ did_strip_ptr,
+ true,
+ did_strip_typedef);
+ }
+ else if (clang_type.IsPointerType())
+ {
+ ClangASTType non_ptr_type = clang_type.GetPointeeType();
+ GetPossibleMatches(valobj,
+ non_ptr_type,
+ reason | lldb_private::eFormatterChoiceCriterionStrippedPointerReference,
+ use_dynamic,
+ entries,
+ true,
+ did_strip_ref,
+ did_strip_typedef);
+ }
+ bool canBeObjCDynamic = clang_type.IsPossibleDynamicType (NULL,
+ false, // no C
+ true); // yes ObjC
+
+ if (canBeObjCDynamic)
+ {
+ if (use_dynamic != lldb::eNoDynamicValues)
+ {
+ do
+ {
+ lldb::ProcessSP process_sp = valobj.GetProcessSP();
+ ObjCLanguageRuntime* runtime = process_sp->GetObjCLanguageRuntime();
+ if (runtime == nullptr)
+ break;
+ ObjCLanguageRuntime::ClassDescriptorSP objc_class_sp (runtime->GetClassDescriptor(valobj));
+ if (!objc_class_sp)
+ break;
+ ConstString name (objc_class_sp->GetClassName());
+ entries.push_back({name,reason | lldb_private::eFormatterChoiceCriterionDynamicObjCDiscovery,did_strip_ptr,did_strip_ref,did_strip_typedef});
+ } while (false);
+ }
+
+ ClangASTType non_ptr_type = clang_type.GetPointeeType();
+ GetPossibleMatches(valobj,
+ non_ptr_type,
+ reason | lldb_private::eFormatterChoiceCriterionStrippedPointerReference,
+ use_dynamic,
+ entries,
+ true,
+ did_strip_ref,
+ did_strip_typedef);
+ }
+
+ // try to strip typedef chains
+ if (clang_type.IsTypedefType())
+ {
+ ClangASTType deffed_type = clang_type.GetTypedefedType();
+ GetPossibleMatches(valobj,
+ deffed_type,
+ reason | lldb_private::eFormatterChoiceCriterionNavigatedTypedefs,
+ use_dynamic,
+ entries,
+ did_strip_ptr,
+ did_strip_ref,
+ true);
+ }
+
+ if (root_level)
+ {
+ do {
+ if (!clang_type.IsValid())
+ break;
+
+ ClangASTType unqual_clang_ast_type = clang_type.GetFullyUnqualifiedType();
+ if (!unqual_clang_ast_type.IsValid())
+ break;
+ if (unqual_clang_ast_type.GetOpaqueQualType() != clang_type.GetOpaqueQualType())
+ GetPossibleMatches (valobj,
+ unqual_clang_ast_type,
+ reason,
+ use_dynamic,
+ entries,
+ did_strip_ptr,
+ did_strip_ref,
+ did_strip_typedef);
+ } while(false);
+
+
+ // if all else fails, go to static type
+ if (valobj.IsDynamic())
+ {
+ lldb::ValueObjectSP static_value_sp(valobj.GetStaticValue());
+ if (static_value_sp)
+ GetPossibleMatches(*static_value_sp.get(),
+ static_value_sp->GetClangType(),
+ reason | lldb_private::eFormatterChoiceCriterionWentToStaticValue,
+ use_dynamic,
+ entries,
+ did_strip_ptr,
+ did_strip_ref,
+ did_strip_typedef,
+ true);
+ }
+ }
+}
+
lldb::TypeFormatImplSP
FormatManager::GetFormatForType (lldb::TypeNameSpecifierImplSP type_sp)
{
diff --git a/source/DataFormatters/LibCxx.cpp b/source/DataFormatters/LibCxx.cpp
index cdc57f6bd937..21e104602a3f 100644
--- a/source/DataFormatters/LibCxx.cpp
+++ b/source/DataFormatters/LibCxx.cpp
@@ -35,10 +35,10 @@ m_options()
{
if (valobj_sp)
Update();
- m_options.SetCoerceToId(false)
- .SetUnwindOnError(true)
- .SetKeepInMemory(true)
- .SetUseDynamic(lldb::eDynamicCanRunTarget);
+ m_options.SetCoerceToId(false);
+ m_options.SetUnwindOnError(true);
+ m_options.SetKeepInMemory(true);
+ m_options.SetUseDynamic(lldb::eDynamicCanRunTarget);
}
size_t
diff --git a/source/DataFormatters/LibStdcpp.cpp b/source/DataFormatters/LibStdcpp.cpp
index e0f23cc35e3f..08e7d584003e 100644
--- a/source/DataFormatters/LibStdcpp.cpp
+++ b/source/DataFormatters/LibStdcpp.cpp
@@ -34,10 +34,10 @@ m_options()
{
if (valobj_sp)
Update();
- m_options.SetCoerceToId(false)
- .SetUnwindOnError(true)
- .SetKeepInMemory(true)
- .SetUseDynamic(lldb::eDynamicCanRunTarget);
+ m_options.SetCoerceToId(false);
+ m_options.SetUnwindOnError(true);
+ m_options.SetKeepInMemory(true);
+ m_options.SetUseDynamic(lldb::eDynamicCanRunTarget);
}
size_t
@@ -215,10 +215,10 @@ lldb_private::formatters::LibstdcppMapIteratorSyntheticFrontEnd::LibstdcppMapIte
{
if (valobj_sp)
Update();
- m_options.SetCoerceToId(false)
- .SetUnwindOnError(true)
- .SetKeepInMemory(true)
- .SetUseDynamic(lldb::eDynamicCanRunTarget);
+ m_options.SetCoerceToId(false);
+ m_options.SetUnwindOnError(true);
+ m_options.SetKeepInMemory(true);
+ m_options.SetUseDynamic(lldb::eDynamicCanRunTarget);
}
bool
diff --git a/source/DataFormatters/NSDictionary.cpp b/source/DataFormatters/NSDictionary.cpp
index 05a5dda39e53..f53004df5c5f 100644
--- a/source/DataFormatters/NSDictionary.cpp
+++ b/source/DataFormatters/NSDictionary.cpp
@@ -218,8 +218,10 @@ lldb_private::formatters::NSDictionaryCodeRunningSyntheticFrontEnd::GetChildAtIn
StreamString object_fetcher_expr;
object_fetcher_expr.Printf("struct __lldb_autogen_nspair { id key; id value; } _lldb_valgen_item; _lldb_valgen_item.key = %s; _lldb_valgen_item.value = %s; _lldb_valgen_item;",key_fetcher_expr.GetData(),value_fetcher_expr.GetData());
lldb::ValueObjectSP child_sp;
+ EvaluateExpressionOptions options;
+ options.SetKeepInMemory(true);
m_backend.GetTargetSP()->EvaluateExpression(object_fetcher_expr.GetData(), m_backend.GetFrameSP().get(), child_sp,
- EvaluateExpressionOptions().SetKeepInMemory(true));
+ options);
if (child_sp)
child_sp->SetName(ConstString(idx_name.GetData()));
return child_sp;
diff --git a/source/DataFormatters/NSSet.cpp b/source/DataFormatters/NSSet.cpp
index 02eb2bfc124f..e6fe2a34a67b 100644
--- a/source/DataFormatters/NSSet.cpp
+++ b/source/DataFormatters/NSSet.cpp
@@ -249,6 +249,10 @@ lldb_private::formatters::NSSetISyntheticFrontEnd::GetChildAtIndex (size_t idx)
if (idx >= num_children)
return lldb::ValueObjectSP();
+ ProcessSP process_sp = m_exe_ctx_ref.GetProcessSP();
+ if (!process_sp)
+ return lldb::ValueObjectSP();
+
if (m_children.empty())
{
// do the scan phase
@@ -260,7 +264,6 @@ lldb_private::formatters::NSSetISyntheticFrontEnd::GetChildAtIndex (size_t idx)
while(tries < num_children)
{
obj_at_idx = m_data_ptr + (test_idx * m_ptr_size);
- ProcessSP process_sp = m_exe_ctx_ref.GetProcessSP();
if (!process_sp)
return lldb::ValueObjectSP();
Error error;
@@ -286,12 +289,34 @@ lldb_private::formatters::NSSetISyntheticFrontEnd::GetChildAtIndex (size_t idx)
SetItemDescriptor &set_item = m_children[idx];
if (!set_item.valobj_sp)
{
- // make the new ValueObject
- StreamString expr;
- expr.Printf("(id)%" PRIu64,set_item.item_ptr);
+ auto ptr_size = process_sp->GetAddressByteSize();
+ DataBufferHeap buffer(ptr_size,0);
+ switch (ptr_size)
+ {
+ case 0: // architecture has no clue?? - fail
+ return lldb::ValueObjectSP();
+ case 4:
+ *((uint32_t*)buffer.GetBytes()) = (uint32_t)set_item.item_ptr;
+ break;
+ case 8:
+ *((uint64_t*)buffer.GetBytes()) = (uint64_t)set_item.item_ptr;
+ break;
+ default:
+ assert(false && "pointer size is not 4 nor 8 - get out of here ASAP");
+ }
StreamString idx_name;
idx_name.Printf("[%zu]",idx);
- set_item.valobj_sp = ValueObject::CreateValueObjectFromExpression(idx_name.GetData(), expr.GetData(), m_exe_ctx_ref);
+
+ DataExtractor data(buffer.GetBytes(),
+ buffer.GetByteSize(),
+ process_sp->GetByteOrder(),
+ process_sp->GetAddressByteSize());
+
+ set_item.valobj_sp =
+ ValueObject::CreateValueObjectFromData(idx_name.GetData(),
+ data,
+ m_exe_ctx_ref,
+ m_backend.GetClangType().GetBasicTypeFromAST(lldb::eBasicTypeObjCID));
}
return set_item.valobj_sp;
}
@@ -392,6 +417,10 @@ lldb_private::formatters::NSSetMSyntheticFrontEnd::GetChildAtIndex (size_t idx)
if (idx >= num_children)
return lldb::ValueObjectSP();
+ ProcessSP process_sp = m_exe_ctx_ref.GetProcessSP();
+ if (!process_sp)
+ return lldb::ValueObjectSP();
+
if (m_children.empty())
{
// do the scan phase
@@ -403,7 +432,6 @@ lldb_private::formatters::NSSetMSyntheticFrontEnd::GetChildAtIndex (size_t idx)
while(tries < num_children)
{
obj_at_idx = m_objs_addr + (test_idx * m_ptr_size);
- ProcessSP process_sp = m_exe_ctx_ref.GetProcessSP();
if (!process_sp)
return lldb::ValueObjectSP();
Error error;
@@ -429,12 +457,34 @@ lldb_private::formatters::NSSetMSyntheticFrontEnd::GetChildAtIndex (size_t idx)
SetItemDescriptor &set_item = m_children[idx];
if (!set_item.valobj_sp)
{
- // make the new ValueObject
- StreamString expr;
- expr.Printf("(id)%" PRIu64,set_item.item_ptr);
+ auto ptr_size = process_sp->GetAddressByteSize();
+ DataBufferHeap buffer(ptr_size,0);
+ switch (ptr_size)
+ {
+ case 0: // architecture has no clue?? - fail
+ return lldb::ValueObjectSP();
+ case 4:
+ *((uint32_t*)buffer.GetBytes()) = (uint32_t)set_item.item_ptr;
+ break;
+ case 8:
+ *((uint64_t*)buffer.GetBytes()) = (uint64_t)set_item.item_ptr;
+ break;
+ default:
+ assert(false && "pointer size is not 4 nor 8 - get out of here ASAP");
+ }
StreamString idx_name;
idx_name.Printf("[%zu]",idx);
- set_item.valobj_sp = ValueObject::CreateValueObjectFromExpression(idx_name.GetData(), expr.GetData(), m_exe_ctx_ref);
+
+ DataExtractor data(buffer.GetBytes(),
+ buffer.GetByteSize(),
+ process_sp->GetByteOrder(),
+ process_sp->GetAddressByteSize());
+
+ set_item.valobj_sp =
+ ValueObject::CreateValueObjectFromData(idx_name.GetData(),
+ data,
+ m_exe_ctx_ref,
+ m_backend.GetClangType().GetBasicTypeFromAST(lldb::eBasicTypeObjCID));
}
return set_item.valobj_sp;
}
diff --git a/source/DataFormatters/TypeCategory.cpp b/source/DataFormatters/TypeCategory.cpp
index 636000bb23ea..a02560e78780 100644
--- a/source/DataFormatters/TypeCategory.cpp
+++ b/source/DataFormatters/TypeCategory.cpp
@@ -39,15 +39,15 @@ m_name(name)
bool
TypeCategoryImpl::Get (ValueObject& valobj,
+ const FormattersMatchVector& candidates,
lldb::TypeFormatImplSP& entry,
- lldb::DynamicValueType use_dynamic,
uint32_t* reason)
{
if (!IsEnabled())
return false;
- if (GetValueNavigator()->Get(valobj, entry, use_dynamic, reason))
+ if (GetValueNavigator()->Get(candidates, entry, reason))
return true;
- bool regex = GetRegexValueNavigator()->Get(valobj, entry, use_dynamic, reason);
+ bool regex = GetRegexValueNavigator()->Get(candidates, entry, reason);
if (regex && reason)
*reason |= lldb_private::eFormatterChoiceCriterionRegularExpressionSummary;
return regex;
@@ -55,25 +55,25 @@ TypeCategoryImpl::Get (ValueObject& valobj,
bool
TypeCategoryImpl::Get (ValueObject& valobj,
+ const FormattersMatchVector& candidates,
lldb::TypeSummaryImplSP& entry,
- lldb::DynamicValueType use_dynamic,
uint32_t* reason)
{
if (!IsEnabled())
return false;
- if (GetSummaryNavigator()->Get(valobj, entry, use_dynamic, reason))
+ if (GetSummaryNavigator()->Get(candidates, entry, reason))
return true;
- bool regex = GetRegexSummaryNavigator()->Get(valobj, entry, use_dynamic, reason);
+ bool regex = GetRegexSummaryNavigator()->Get(candidates, entry, reason);
if (regex && reason)
*reason |= lldb_private::eFormatterChoiceCriterionRegularExpressionSummary;
return regex;
}
bool
-TypeCategoryImpl::Get(ValueObject& valobj,
- lldb::SyntheticChildrenSP& entry_sp,
- lldb::DynamicValueType use_dynamic,
- uint32_t* reason)
+TypeCategoryImpl::Get (ValueObject& valobj,
+ const FormattersMatchVector& candidates,
+ lldb::SyntheticChildrenSP& entry,
+ uint32_t* reason)
{
if (!IsEnabled())
return false;
@@ -82,16 +82,16 @@ TypeCategoryImpl::Get(ValueObject& valobj,
bool regex_filter = false;
// first find both Filter and Synth, and then check which is most recent
- if (!GetFilterNavigator()->Get(valobj, filter_sp, use_dynamic, &reason_filter))
- regex_filter = GetRegexFilterNavigator()->Get (valobj, filter_sp, use_dynamic, &reason_filter);
+ if (!GetFilterNavigator()->Get(candidates, filter_sp, &reason_filter))
+ regex_filter = GetRegexFilterNavigator()->Get (candidates, filter_sp, &reason_filter);
#ifndef LLDB_DISABLE_PYTHON
bool regex_synth = false;
uint32_t reason_synth = 0;
bool pick_synth = false;
ScriptedSyntheticChildren::SharedPointer synth;
- if (!GetSyntheticNavigator()->Get(valobj, synth, use_dynamic, &reason_synth))
- regex_synth = GetRegexSyntheticNavigator()->Get (valobj, synth, use_dynamic, &reason_synth);
+ if (!GetSyntheticNavigator()->Get(candidates, synth, &reason_synth))
+ regex_synth = GetRegexSyntheticNavigator()->Get (candidates, synth, &reason_synth);
if (!filter_sp.get() && !synth.get())
return false;
else if (!filter_sp.get() && synth.get())
@@ -111,27 +111,26 @@ TypeCategoryImpl::Get(ValueObject& valobj,
{
if (regex_synth && reason)
*reason |= lldb_private::eFormatterChoiceCriterionRegularExpressionFilter;
- entry_sp = synth;
+ entry = synth;
return true;
}
else
{
if (regex_filter && reason)
*reason |= lldb_private::eFormatterChoiceCriterionRegularExpressionFilter;
- entry_sp = filter_sp;
+ entry = filter_sp;
return true;
}
#else
if (filter_sp)
{
- entry_sp = filter_sp;
+ entry = filter_sp;
return true;
}
#endif
return false;
-
}
void
diff --git a/source/DataFormatters/TypeCategoryMap.cpp b/source/DataFormatters/TypeCategoryMap.cpp
index 621258806def..c6dba1b9f4bd 100644
--- a/source/DataFormatters/TypeCategoryMap.cpp
+++ b/source/DataFormatters/TypeCategoryMap.cpp
@@ -11,6 +11,9 @@
#include "lldb/DataFormatters/TypeCategoryMap.h"
+#include "lldb/DataFormatters/FormatClasses.h"
+#include "lldb/DataFormatters/FormatManager.h"
+
// C Includes
// C++ Includes
// Other libraries and framework includes
@@ -187,13 +190,15 @@ TypeCategoryMap::GetFormat (ValueObject& valobj,
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
+ FormattersMatchVector matches = FormatManager::GetPossibleMatches(valobj, use_dynamic);
+
for (begin = m_active_categories.begin(); begin != end; begin++)
{
lldb::TypeCategoryImplSP category_sp = *begin;
lldb::TypeFormatImplSP current_format;
if (log)
log->Printf("\n[TypeCategoryMap::GetFormat] Trying to use category %s", category_sp->GetName());
- if (!category_sp->Get(valobj, current_format, use_dynamic, &reason_why))
+ if (!category_sp->Get(valobj, matches, current_format, &reason_why))
continue;
return current_format;
}
@@ -213,13 +218,15 @@ TypeCategoryMap::GetSummaryFormat (ValueObject& valobj,
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
+ FormattersMatchVector matches = FormatManager::GetPossibleMatches(valobj, use_dynamic);
+
for (begin = m_active_categories.begin(); begin != end; begin++)
{
lldb::TypeCategoryImplSP category_sp = *begin;
lldb::TypeSummaryImplSP current_format;
if (log)
log->Printf("\n[CategoryMap::GetSummaryFormat] Trying to use category %s", category_sp->GetName());
- if (!category_sp->Get(valobj, current_format, use_dynamic, &reason_why))
+ if (!category_sp->Get(valobj, matches, current_format, &reason_why))
continue;
return current_format;
}
@@ -241,13 +248,15 @@ TypeCategoryMap::GetSyntheticChildren (ValueObject& valobj,
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
+ FormattersMatchVector matches = FormatManager::GetPossibleMatches(valobj, use_dynamic);
+
for (begin = m_active_categories.begin(); begin != end; begin++)
{
lldb::TypeCategoryImplSP category_sp = *begin;
lldb::SyntheticChildrenSP current_format;
if (log)
log->Printf("\n[CategoryMap::GetSyntheticChildren] Trying to use category %s", category_sp->GetName());
- if (!category_sp->Get(valobj, current_format, use_dynamic, &reason_why))
+ if (!category_sp->Get(valobj, matches, current_format, &reason_why))
continue;
return current_format;
}