summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp37
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h1
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp14
3 files changed, 33 insertions, 19 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp
index 76acd896729..bb11f6461d9 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp
@@ -102,14 +102,15 @@ LogChannelDWARF::Disable (const char **categories, Stream *feedback_strm)
{
const char *arg = categories[i];
- if (::strcasecmp (arg, "all") == 0 ) flag_bits &= ~DWARF_LOG_ALL;
- else if (::strcasecmp (arg, "info") == 0 ) flag_bits &= ~DWARF_LOG_DEBUG_INFO;
- else if (::strcasecmp (arg, "line") == 0 ) flag_bits &= ~DWARF_LOG_DEBUG_LINE;
- else if (::strcasecmp (arg, "pubnames") == 0 ) flag_bits &= ~DWARF_LOG_DEBUG_PUBNAMES;
- else if (::strcasecmp (arg, "pubtypes") == 0 ) flag_bits &= ~DWARF_LOG_DEBUG_PUBTYPES;
- else if (::strcasecmp (arg, "aranges") == 0 ) flag_bits &= ~DWARF_LOG_DEBUG_ARANGES;
- else if (::strcasecmp (arg, "lookups") == 0 ) flag_bits &= ~DWARF_LOG_LOOKUPS;
- else if (::strcasecmp (arg, "default") == 0 ) flag_bits &= ~DWARF_LOG_DEFAULT;
+ if (::strcasecmp (arg, "all") == 0) flag_bits &= ~DWARF_LOG_ALL;
+ else if (::strcasecmp (arg, "info") == 0) flag_bits &= ~DWARF_LOG_DEBUG_INFO;
+ else if (::strcasecmp (arg, "line") == 0) flag_bits &= ~DWARF_LOG_DEBUG_LINE;
+ else if (::strcasecmp (arg, "pubnames") == 0) flag_bits &= ~DWARF_LOG_DEBUG_PUBNAMES;
+ else if (::strcasecmp (arg, "pubtypes") == 0) flag_bits &= ~DWARF_LOG_DEBUG_PUBTYPES;
+ else if (::strcasecmp (arg, "aranges") == 0) flag_bits &= ~DWARF_LOG_DEBUG_ARANGES;
+ else if (::strcasecmp (arg, "lookups") == 0) flag_bits &= ~DWARF_LOG_LOOKUPS;
+ else if (::strcasecmp (arg, "default") == 0) flag_bits &= ~DWARF_LOG_DEFAULT;
+ else if (::strncasecmp(arg, "comp", 4) == 0) flag_bits &= ~DWARF_LOG_TYPE_COMPLETION;
else
{
feedback_strm->Printf("error: unrecognized log category '%s'\n", arg);
@@ -144,14 +145,15 @@ LogChannelDWARF::Enable
{
const char *arg = categories[i];
- if (::strcasecmp (arg, "all") == 0 ) flag_bits |= DWARF_LOG_ALL;
- else if (::strcasecmp (arg, "info") == 0 ) flag_bits |= DWARF_LOG_DEBUG_INFO;
- else if (::strcasecmp (arg, "line") == 0 ) flag_bits |= DWARF_LOG_DEBUG_LINE;
- else if (::strcasecmp (arg, "pubnames") == 0 ) flag_bits |= DWARF_LOG_DEBUG_PUBNAMES;
- else if (::strcasecmp (arg, "pubtypes") == 0 ) flag_bits |= DWARF_LOG_DEBUG_PUBTYPES;
- else if (::strcasecmp (arg, "aranges") == 0 ) flag_bits |= DWARF_LOG_DEBUG_ARANGES;
- else if (::strcasecmp (arg, "lookups") == 0 ) flag_bits |= DWARF_LOG_LOOKUPS;
- else if (::strcasecmp (arg, "default") == 0 ) flag_bits |= DWARF_LOG_DEFAULT;
+ if (::strcasecmp (arg, "all") == 0) flag_bits |= DWARF_LOG_ALL;
+ else if (::strcasecmp (arg, "info") == 0) flag_bits |= DWARF_LOG_DEBUG_INFO;
+ else if (::strcasecmp (arg, "line") == 0) flag_bits |= DWARF_LOG_DEBUG_LINE;
+ else if (::strcasecmp (arg, "pubnames") == 0) flag_bits |= DWARF_LOG_DEBUG_PUBNAMES;
+ else if (::strcasecmp (arg, "pubtypes") == 0) flag_bits |= DWARF_LOG_DEBUG_PUBTYPES;
+ else if (::strcasecmp (arg, "aranges") == 0) flag_bits |= DWARF_LOG_DEBUG_ARANGES;
+ else if (::strcasecmp (arg, "lookups") == 0) flag_bits |= DWARF_LOG_LOOKUPS;
+ else if (::strcasecmp (arg, "default") == 0) flag_bits |= DWARF_LOG_DEFAULT;
+ else if (::strncasecmp(arg, "comp", 4) == 0) flag_bits |= DWARF_LOG_TYPE_COMPLETION;
else
{
feedback_strm->Printf("error: unrecognized log category '%s'\n", arg);
@@ -178,7 +180,8 @@ LogChannelDWARF::ListCategories (Stream *strm)
" line - log the parsing if .debug_line\n"
" pubnames - log the parsing if .debug_pubnames\n"
" pubtypes - log the parsing if .debug_pubtypes\n"
- " lookups - log any lookups that happen by name, regex, or address\n\n",
+ " lookups - log any lookups that happen by name, regex, or address\n\n"
+ " completion - log struct/unions/class type completions\n\n",
SymbolFileDWARF::GetPluginNameStatic());
}
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h b/lldb/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h
index bc6c2b4e11b..f0094554ad3 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h
@@ -24,6 +24,7 @@
#define DWARF_LOG_DEBUG_PUBTYPES (1u << 4)
#define DWARF_LOG_DEBUG_ARANGES (1u << 5)
#define DWARF_LOG_LOOKUPS (1u << 6)
+#define DWARF_LOG_TYPE_COMPLETION (1u << 7)
#define DWARF_LOG_ALL (UINT32_MAX)
#define DWARF_LOG_DEFAULT (DWARF_LOG_DEBUG_INFO)
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index f06a9546317..243cbce0056 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -1943,13 +1943,23 @@ SymbolFileDWARF::ResolveClangOpaqueTypeDefinition (lldb::clang_type_t clang_type
const dw_tag_t tag = die->Tag();
- LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO));
+ LogSP log (LogChannelDWARF::GetLogIfAny(DWARF_LOG_DEBUG_INFO|DWARF_LOG_TYPE_COMPLETION));
if (log)
+ {
GetObjectFile()->GetModule()->LogMessage (log.get(),
- "0x%8.8llx: %s '%s' resolving forward declaration...\n",
+ "0x%8.8llx: %s '%s' resolving forward declaration...",
MakeUserID(die->GetOffset()),
DW_TAG_value_to_name(tag),
type->GetName().AsCString());
+
+ if (log->GetVerbose())
+ {
+ StreamString strm;
+ Host::Backtrace (strm, 1024);
+ if (strm.GetData())
+ log->PutCString(strm.GetData());
+ }
+ }
assert (clang_type);
DWARFDebugInfoEntry::Attributes attributes;
OpenPOWER on IntegriCloud