aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectTarget.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2022-04-14 16:52:38 -0700
committerJonas Devlieghere <jonas@devlieghere.com>2022-04-14 16:54:00 -0700
commitaf91446aa2903324c81d9e0b0a8a9fc037edc1a4 (patch)
treeff1ccde41a665a0e86ee808230f74c38b87ec045 /lldb/source/Commands/CommandObjectTarget.cpp
parent894a591cf6fc542e6fc5d84222c839495a3d832f (diff)
downloadllvm-af91446aa2903324c81d9e0b0a8a9fc037edc1a4.zip
llvm-af91446aa2903324c81d9e0b0a8a9fc037edc1a4.tar.gz
llvm-af91446aa2903324c81d9e0b0a8a9fc037edc1a4.tar.bz2
[lldb] Show the DBGError if dsymForUUID can't find a dSYM
Show the user the DBGError (if available) when dsymForUUID fails. rdar://90949180 Differential revision: https://reviews.llvm.org/D123743
Diffstat (limited to 'lldb/source/Commands/CommandObjectTarget.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectTarget.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index 61944eb..aeb65da 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -2464,7 +2464,8 @@ protected:
if (m_symbol_file.GetOptionValue().OptionWasSet())
module_spec.GetSymbolFileSpec() =
m_symbol_file.GetOptionValue().GetCurrentValue();
- if (Symbols::DownloadObjectAndSymbolFile(module_spec)) {
+ Status error;
+ if (Symbols::DownloadObjectAndSymbolFile(module_spec, error)) {
ModuleSP module_sp(
target->GetOrCreateModule(module_spec, true /* notify */));
if (module_sp) {
@@ -2500,6 +2501,7 @@ protected:
result.AppendErrorWithFormat(
"Unable to locate the executable or symbol file with UUID %s",
strm.GetData());
+ result.SetError(error);
return false;
}
} else {
@@ -4165,10 +4167,13 @@ protected:
bool DownloadObjectAndSymbolFile(ModuleSpec &module_spec,
CommandReturnObject &result, bool &flush) {
- if (Symbols::DownloadObjectAndSymbolFile(module_spec)) {
+ Status error;
+ if (Symbols::DownloadObjectAndSymbolFile(module_spec, error)) {
if (module_spec.GetSymbolFileSpec())
return AddModuleSymbols(m_exe_ctx.GetTargetPtr(), module_spec, flush,
result);
+ } else {
+ result.SetError(error);
}
return false;
}