[Lldb-commits] [lldb] [lldb] Fix progress reporting for SymbolLocatorDebugSymbols (PR #79624)
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 26 12:31:20 PST 2024
================
@@ -1050,28 +1054,25 @@ bool SymbolLocatorDebugSymbols::DownloadObjectAndSymbolFile(
const std::string file_path_str =
file_spec_ptr ? file_spec_ptr->GetPath() : "";
- Log *log = GetLog(LLDBLog::Host);
+ if (uuid_str.empty() && file_path_str.empty())
+ return false;
// Create the dsymForUUID command.
- StreamString command;
+ const char *lookup_arg =
+ !uuid_str.empty() ? uuid_str.c_str() : file_path_str.c_str();
const char *copy_executable_arg = copy_executable ? "--copyExecutable " : "";
- if (!uuid_str.empty()) {
- command.Printf("%s --ignoreNegativeCache %s%s",
- dsymForUUID_exe_path.c_str(), copy_executable_arg,
- uuid_str.c_str());
- LLDB_LOGF(log, "Calling %s with UUID %s to find dSYM: %s",
- dsymForUUID_exe_path.c_str(), uuid_str.c_str(),
- command.GetString().data());
- } else if (!file_path_str.empty()) {
- command.Printf("%s --ignoreNegativeCache %s%s",
- dsymForUUID_exe_path.c_str(), copy_executable_arg,
- file_path_str.c_str());
- LLDB_LOGF(log, "Calling %s with file %s to find dSYM: %s",
- dsymForUUID_exe_path.c_str(), file_path_str.c_str(),
- command.GetString().data());
- } else {
- return false;
- }
+
+ StreamString command;
----------------
adrian-prantl wrote:
more unnecessary comments about unnecessary c string conversions :-)
```
llvm::SmallString<64> buf;
llvm::raw_svector_ostream(buf) << ...;
```
https://github.com/llvm/llvm-project/pull/79624
More information about the lldb-commits
mailing list