[Lldb-commits] [lldb] r374350 - [lldb] Add log output for the support files we pass to the CppModuleConfiguration

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 10 06:43:37 PDT 2019


Author: teemperor
Date: Thu Oct 10 06:43:37 2019
New Revision: 374350

URL: http://llvm.org/viewvc/llvm-project?rev=374350&view=rev
Log:
[lldb] Add log output for the support files we pass to the CppModuleConfiguration

CppModuleConfiguration is the most likely point of failure when we have weird
setups where we fail to load a C++ module. With this logging it should be easier
to figure out why we can't find a valid configuration as the configuration only
depends on the list of file paths.

Modified:
    lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp?rev=374350&r1=374349&r2=374350&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp Thu Oct 10 06:43:37 2019
@@ -444,6 +444,8 @@ static CppModuleConfiguration LogConfigE
 
 CppModuleConfiguration GetModuleConfig(lldb::LanguageType language,
                                        ExecutionContext &exe_ctx) {
+  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
+
   // Don't do anything if this is not a C++ module configuration.
   if (!SupportsCxxModuleImport(language))
     return LogConfigError("Language doesn't support C++ modules");
@@ -483,6 +485,15 @@ CppModuleConfiguration GetModuleConfig(l
       }
     }
   });
+
+  LLDB_LOG(log, "[C++ module config] Found {0} support files to analyze",
+           files.GetSize());
+  if (log && log->GetVerbose()) {
+    for (const FileSpec &f : files)
+      LLDB_LOGV(log, "[C++ module config] Analyzing support file: {0}",
+                f.GetPath());
+  }
+
   // Try to create a configuration from the files. If there is no valid
   // configuration possible with the files, this just returns an invalid
   // configuration.




More information about the lldb-commits mailing list