summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/include/lldb/Core/Logging.h1
-rw-r--r--lldb/source/Core/FormatEntity.cpp6
-rw-r--r--lldb/source/Core/Logging.cpp3
-rw-r--r--lldb/source/Core/ValueObject.cpp2
-rw-r--r--lldb/source/DataFormatters/FormatManager.cpp8
-rw-r--r--lldb/source/DataFormatters/TypeCategoryMap.cpp8
6 files changed, 16 insertions, 12 deletions
diff --git a/lldb/include/lldb/Core/Logging.h b/lldb/include/lldb/Core/Logging.h
index a4dd76f1123..ca04c84b21a 100644
--- a/lldb/include/lldb/Core/Logging.h
+++ b/lldb/include/lldb/Core/Logging.h
@@ -48,6 +48,7 @@
#define LIBLLDB_LOG_SYSTEM_RUNTIME (1u << 26)
#define LIBLLDB_LOG_JIT_LOADER (1u << 27)
#define LIBLLDB_LOG_LANGUAGE (1u << 28)
+#define LIBLLDB_LOG_DATAFORMATTERS (1u << 29)
#define LIBLLDB_LOG_ALL (UINT32_MAX)
#define LIBLLDB_LOG_DEFAULT (LIBLLDB_LOG_PROCESS |\
LIBLLDB_LOG_THREAD |\
diff --git a/lldb/source/Core/FormatEntity.cpp b/lldb/source/Core/FormatEntity.cpp
index daaf88fe45c..500518f6a23 100644
--- a/lldb/source/Core/FormatEntity.cpp
+++ b/lldb/source/Core/FormatEntity.cpp
@@ -533,7 +533,7 @@ ScanBracketedRange (llvm::StringRef subpath,
int64_t& index_lower,
int64_t& index_higher)
{
- Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_DATAFORMATTERS));
close_bracket_index = llvm::StringRef::npos;
const size_t open_bracket_index = subpath.find('[');
if (open_bracket_index == llvm::StringRef::npos)
@@ -670,7 +670,7 @@ ExpandIndexedExpression (ValueObject* valobj,
StackFrame* frame,
bool deref_pointer)
{
- Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_DATAFORMATTERS));
const char* ptr_deref_format = "[%d]";
std::string ptr_deref_buffer(10,0);
::sprintf(&ptr_deref_buffer[0], ptr_deref_format, index);
@@ -731,7 +731,7 @@ DumpValue (Stream &s,
if (valobj == NULL)
return false;
- Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_DATAFORMATTERS));
Format custom_format = eFormatInvalid;
ValueObject::ValueObjectRepresentationStyle val_obj_display = entry.string.empty() ? ValueObject::eValueObjectRepresentationStyleValue : ValueObject::eValueObjectRepresentationStyleSummary;
diff --git a/lldb/source/Core/Logging.cpp b/lldb/source/Core/Logging.cpp
index 412536adbb3..d08d833ee46 100644
--- a/lldb/source/Core/Logging.cpp
+++ b/lldb/source/Core/Logging.cpp
@@ -148,6 +148,7 @@ lldb_private::DisableLog (const char **categories, Stream *feedback_strm)
else if (0 == ::strcasecmp(arg, "os")) flag_bits &= ~LIBLLDB_LOG_OS;
else if (0 == ::strcasecmp(arg, "jit")) flag_bits &= ~LIBLLDB_LOG_JIT_LOADER;
else if (0 == ::strcasecmp(arg, "language")) flag_bits &= ~LIBLLDB_LOG_LANGUAGE;
+ else if (0 == ::strncasecmp(arg, "formatters", 10)) flag_bits &= ~LIBLLDB_LOG_DATAFORMATTERS;
else
{
feedback_strm->Printf ("error: unrecognized log category '%s'\n", arg);
@@ -224,6 +225,7 @@ lldb_private::EnableLog (StreamSP &log_stream_sp, uint32_t log_options, const ch
else if (0 == ::strncasecmp(arg, "watch", 5)) flag_bits |= LIBLLDB_LOG_WATCHPOINTS;
else if (0 == ::strcasecmp(arg, "jit")) flag_bits |= LIBLLDB_LOG_JIT_LOADER;
else if (0 == ::strcasecmp(arg, "language")) flag_bits |= LIBLLDB_LOG_LANGUAGE;
+ else if (0 == ::strncasecmp(arg, "formatters", 10)) flag_bits |= LIBLLDB_LOG_DATAFORMATTERS;
else
{
feedback_strm->Printf("error: unrecognized log category '%s'\n", arg);
@@ -254,6 +256,7 @@ lldb_private::ListLogCategories (Stream *strm)
" dyld - log shared library related activities\n"
" events - log broadcaster, listener and event queue activities\n"
" expr - log expressions\n"
+ " formatters - log data formatters related activities\n"
" host - log host activities\n"
" jit - log JIT events in the target\n"
" language - log language runtime events\n"
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp
index 98c05c32744..e083c72c568 100644
--- a/lldb/source/Core/ValueObject.cpp
+++ b/lldb/source/Core/ValueObject.cpp
@@ -275,7 +275,7 @@ ValueObject::UpdateValueIfNeeded (bool update_format)
bool
ValueObject::UpdateFormatsIfNeeded()
{
- Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_DATAFORMATTERS));
if (log)
log->Printf("[%s %p] checking for FormatManager revisions. ValueObject rev: %d - Global rev: %d",
GetName().GetCString(), static_cast<void*>(this),
diff --git a/lldb/source/DataFormatters/FormatManager.cpp b/lldb/source/DataFormatters/FormatManager.cpp
index 3a5664f7c5c..9eb6e10f438 100644
--- a/lldb/source/DataFormatters/FormatManager.cpp
+++ b/lldb/source/DataFormatters/FormatManager.cpp
@@ -720,7 +720,7 @@ FormatManager::GetFormat (ValueObject& valobj,
FormattersMatchData match_data(valobj, use_dynamic);
TypeFormatImplSP retval;
- Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_DATAFORMATTERS));
if (match_data.GetTypeForCache())
{
if (log)
@@ -803,7 +803,7 @@ FormatManager::GetSummaryFormat (ValueObject& valobj,
FormattersMatchData match_data(valobj, use_dynamic);
TypeSummaryImplSP retval;
- Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_DATAFORMATTERS));
if (match_data.GetTypeForCache())
{
if (log)
@@ -887,7 +887,7 @@ FormatManager::GetSyntheticChildren (ValueObject& valobj,
FormattersMatchData match_data(valobj, use_dynamic);
SyntheticChildrenSP retval;
- Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_DATAFORMATTERS));
if (match_data.GetTypeForCache())
{
if (log)
@@ -954,7 +954,7 @@ FormatManager::GetValidator (ValueObject& valobj,
FormattersMatchData match_data(valobj, use_dynamic);
TypeValidatorImplSP retval;
- Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_DATAFORMATTERS));
if (match_data.GetTypeForCache())
{
if (log)
diff --git a/lldb/source/DataFormatters/TypeCategoryMap.cpp b/lldb/source/DataFormatters/TypeCategoryMap.cpp
index 0b3e056f5da..2798bf7e12c 100644
--- a/lldb/source/DataFormatters/TypeCategoryMap.cpp
+++ b/lldb/source/DataFormatters/TypeCategoryMap.cpp
@@ -225,7 +225,7 @@ TypeCategoryMap::GetFormat (FormattersMatchData& match_data)
uint32_t reason_why;
ActiveCategoriesIterator begin, end = m_active_categories.end();
- Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_DATAFORMATTERS));
if (log)
{
@@ -263,7 +263,7 @@ TypeCategoryMap::GetSummaryFormat (FormattersMatchData& match_data)
uint32_t reason_why;
ActiveCategoriesIterator begin, end = m_active_categories.end();
- Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_DATAFORMATTERS));
if (log)
{
@@ -303,7 +303,7 @@ TypeCategoryMap::GetSyntheticChildren (FormattersMatchData& match_data)
ActiveCategoriesIterator begin, end = m_active_categories.end();
- Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_DATAFORMATTERS));
if (log)
{
@@ -342,7 +342,7 @@ TypeCategoryMap::GetValidator (FormattersMatchData& match_data)
uint32_t reason_why;
ActiveCategoriesIterator begin, end = m_active_categories.end();
- Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_DATAFORMATTERS));
if (log)
{
OpenPOWER on IntegriCloud