Author: Jason Molenda Date: 2021-09-16T01:38:48-07:00 New Revision: ceded4153245322c45d28068860fb3d8d0a4884d
URL: https://github.com/llvm/llvm-project/commit/ceded4153245322c45d28068860fb3d8d0a4884d DIFF: https://github.com/llvm/llvm-project/commit/ceded4153245322c45d28068860fb3d8d0a4884d.diff LOG: Don't set executable file in ObjectFileMachO::LoadCoreFileImages When the corefile reader is adding binaries from the "all image infos" LC_NOTE in a Mach-O corefile, it would detect if the binary being added was an executable binary and set it as the Target's executable binary. This has the side effect of clearing the Target's image list, so if the executable was in the middle of the all image infos, the initial images would be dropped. There's no need to set the executable binary in the Target for these corefile processes, so instead of doing multiple passes over the list to find the executable, I'm dropping that. Added: Modified: lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Removed: ################################################################################ diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp index d96b591fd95ff..99aef04ab6038 100644 --- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -7033,12 +7033,8 @@ bool ObjectFileMachO::LoadCoreFileImages(lldb_private::Process &process) { image.load_address); } } - if (module_sp.get() && module_sp->GetObjectFile()) { + if (module_sp.get()) { added_images = true; - if (module_sp->GetObjectFile()->GetType() == - ObjectFile::eTypeExecutable) { - process.GetTarget().SetExecutableModule(module_sp, eLoadDependentsNo); - } for (auto name_vmaddr_tuple : image.segment_load_addresses) { SectionList *sectlist = module_sp->GetObjectFile()->GetSectionList(); if (sectlist) { _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits