Skip to content

Commit 06d33ba

Browse files
Kevin Freikevinfrei
authored andcommitted
Log Debuginfod server failures in verbose mode
1 parent 7859bf2 commit 06d33ba

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

lldb/source/Plugins/SymbolLocator/Debuginfod/SymbolLocatorDebuginfod.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#include "lldb/Core/PluginManager.h"
1212
#include "lldb/Interpreter/OptionValueString.h"
1313
#include "lldb/Utility/Args.h"
14+
#include "lldb/Utility/LLDBLog.h"
15+
#include "lldb/Utility/Log.h"
1416

1517
#include "llvm/Debuginfod/Debuginfod.h"
1618
#include "llvm/Debuginfod/HTTPClient.h"
@@ -173,9 +175,13 @@ GetFileForModule(const ModuleSpec &module_spec,
173175
cache_key, url_path, cache_path, debuginfod_urls, timeout);
174176
if (result)
175177
return FileSpec(*result);
176-
// An error here should be logged as a failure in the Debuginfod library,
177-
// just consume it here.
178-
consumeError(result.takeError());
178+
179+
Log *log = GetLog(LLDBLog::Symbols);
180+
auto err_message = llvm::toString(result.takeError());
181+
LLDB_LOGV(log,
182+
"[Debuginfod] Failed to download symbol artifact {0} "
183+
"with error {1}",
184+
url_path, err_message);
179185
return {};
180186
}
181187

0 commit comments

Comments
 (0)