Skip to content

Commit 64db64e

Browse files
jasonmolendafschlimb
authored andcommitted
[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 llvm#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.
1 parent acce50a commit 64db64e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lldb/source/Core/DynamicLoader.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ ModuleSP DynamicLoader::LoadBinaryWithUUIDAndAddress(
229229
ModuleSpec module_spec;
230230
module_spec.GetUUID() = uuid;
231231
FileSpec name_filespec(name);
232+
if (FileSystem::Instance().Exists(name_filespec))
233+
module_spec.GetFileSpec() = name_filespec;
232234

233235
if (uuid.IsValid()) {
234236
Progress progress("Locating binary", prog_str.GetString().str());

0 commit comments

Comments
 (0)