[lldb] Re-insert code to search for a binary by filepath if provided
July 14 2024 I landed a change to update progress reporting when loading kernel/firmware binaries https://github.com/llvm/llvm-project/pull/98845 In DynamicLoader::LoadBinaryWithUUIDAndAddress I removed code that was setting the ModuleSpec to the provided name, if the name provided is that of a file on disk. With this code missing, if a filepath name is passed in, this code will fail to find that binary on the local disk. There's nothing in the PR / intention that would lead to this change, it was unintentional.
This commit is contained in:
@@ -229,6 +229,8 @@ ModuleSP DynamicLoader::LoadBinaryWithUUIDAndAddress(
|
||||
ModuleSpec module_spec;
|
||||
module_spec.GetUUID() = uuid;
|
||||
FileSpec name_filespec(name);
|
||||
if (FileSystem::Instance().Exists(name_filespec))
|
||||
module_spec.GetFileSpec() = name_filespec;
|
||||
|
||||
if (uuid.IsValid()) {
|
||||
Progress progress("Locating binary", prog_str.GetString().str());
|
||||
|
||||
Reference in New Issue
Block a user