Skip to content

[lldb] Show module name in progress update for downloading symbols #85342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions lldb/source/Commands/CommandObjectTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3377,7 +3377,7 @@ class CommandObjectTargetModulesList : public CommandObjectParsed {
case 'r': {
size_t ref_count = 0;
char in_shared_cache = 'Y';

ModuleSP module_sp(module->shared_from_this());
if (!ModuleList::ModuleIsInCache(module))
in_shared_cache = 'N';
Expand Down Expand Up @@ -4508,11 +4508,8 @@ class CommandObjectTargetSymbolsAdd : public CommandObjectParsed {

ModuleSpec module_spec;
module_spec.GetUUID() = frame_module_sp->GetUUID();

if (FileSystem::Instance().Exists(frame_module_sp->GetPlatformFileSpec())) {
module_spec.GetArchitecture() = frame_module_sp->GetArchitecture();
module_spec.GetFileSpec() = frame_module_sp->GetPlatformFileSpec();
}
module_spec.GetArchitecture() = frame_module_sp->GetArchitecture();
module_spec.GetFileSpec() = frame_module_sp->GetPlatformFileSpec();

if (!DownloadObjectAndSymbolFile(module_spec, result, flush)) {
result.AppendError("unable to find debug symbols for the current frame");
Expand Down Expand Up @@ -4557,12 +4554,8 @@ class CommandObjectTargetSymbolsAdd : public CommandObjectParsed {

ModuleSpec module_spec;
module_spec.GetUUID() = frame_module_sp->GetUUID();

if (FileSystem::Instance().Exists(
frame_module_sp->GetPlatformFileSpec())) {
module_spec.GetArchitecture() = frame_module_sp->GetArchitecture();
module_spec.GetFileSpec() = frame_module_sp->GetPlatformFileSpec();
}
module_spec.GetFileSpec() = frame_module_sp->GetPlatformFileSpec();
module_spec.GetArchitecture() = frame_module_sp->GetArchitecture();

bool current_frame_flush = false;
if (DownloadObjectAndSymbolFile(module_spec, result, current_frame_flush))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1066,11 +1066,21 @@ bool SymbolLocatorDebugSymbols::DownloadObjectAndSymbolFile(
command << lookup_arg;

// Log and report progress.
std::string lookup_desc;
if (uuid_ptr && file_spec_ptr)
lookup_desc =
llvm::formatv("{0} ({1})", file_spec_ptr->GetFilename().GetString(),
uuid_ptr->GetAsString());
else if (uuid_ptr)
lookup_desc = uuid_ptr->GetAsString();
else if (file_spec_ptr)
lookup_desc = file_spec_ptr->GetFilename().GetString();

Log *log = GetLog(LLDBLog::Host);
LLDB_LOG(log, "Calling {0} with {1} to find dSYM: {2}", dsymForUUID_exe_path,
lookup_arg, command.GetString());
LLDB_LOG(log, "Calling {0} for {1} to find dSYM: {2}", dsymForUUID_exe_path,
lookup_desc, command.GetString());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically this log message also needs updating...


Progress progress("Downloading symbol file", lookup_arg);
Progress progress("Downloading symbol file for", lookup_desc);

// Invoke dsymForUUID.
int exit_status = -1;
Expand Down