Skip to content

Commit 1c8dcac

Browse files
author
George Hu
committed
Revert "Call locate module callback for main executable"
This reverts commit c6534a1.
1 parent 2dc6595 commit 1c8dcac

File tree

1 file changed

+3
-25
lines changed

1 file changed

+3
-25
lines changed

lldb/source/Target/Platform.cpp

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -751,22 +751,8 @@ Status Platform::ResolveExecutable(const ModuleSpec &module_spec,
751751
ModuleList::GetSharedModule(resolved_module_spec, exe_module_sp,
752752
nullptr, nullptr);
753753

754-
Status error;
755-
if (!exe_module_sp) {
756-
// If locate module callback didn't provide a module, fallback to standard
757-
// path
758-
error = ModuleList::GetSharedModule(resolved_module_spec, exe_module_sp,
759-
nullptr, nullptr);
760-
}
761-
762-
if (exe_module_sp && exe_module_sp->GetObjectFile()) {
763-
// Set the symbol file if locate module callback returned one
764-
if (symbol_file_spec) {
765-
exe_module_sp->SetSymbolFileFileSpec(symbol_file_spec);
766-
}
767-
return error; // Return the actual status from GetSharedModule (or success
768-
// from callback)
769-
}
754+
if (exe_module_sp && exe_module_sp->GetObjectFile())
755+
return error;
770756
exe_module_sp.reset();
771757
}
772758
// No valid architecture was specified or the exact arch wasn't found.
@@ -778,7 +764,6 @@ Status Platform::ResolveExecutable(const ModuleSpec &module_spec,
778764
Status error;
779765
for (const ArchSpec &arch : GetSupportedArchitectures(process_host_arch)) {
780766
resolved_module_spec.GetArchitecture() = arch;
781-
<<<<<<< Updated upstream
782767

783768
// Call locate module callback first, then fallback to standard path
784769
FileSpec symbol_file_spec;
@@ -790,19 +775,12 @@ Status Platform::ResolveExecutable(const ModuleSpec &module_spec,
790775
nullptr, nullptr);
791776
}
792777

793-
=======
794778
error =
795779
ModuleList::GetSharedModule(resolved_module_spec, exe_module_sp,
796780
nullptr, nullptr);
797-
>>>>>>> Stashed changes
798781
if (error.Success()) {
799-
if (exe_module_sp && exe_module_sp->GetObjectFile()) {
800-
// Set the symbol file if locate module callback returned one
801-
if (symbol_file_spec) {
802-
exe_module_sp->SetSymbolFileFileSpec(symbol_file_spec);
803-
}
782+
if (exe_module_sp && exe_module_sp->GetObjectFile())
804783
break;
805-
}
806784
error = Status::FromErrorString("no exe object file");
807785
}
808786

0 commit comments

Comments
 (0)