forked from OSchip/llvm-project
Don't remove PIE executables when using svr4 packets
Summary: Because PIE executables have an e_type of llvm::ELF::ET_DYN, they are not of type eTypeExecutable, and were being removed when svr4 packets were used. Reviewers: clayborg, ADodds, tfiala, sas Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20990 llvm-svn: 271899
This commit is contained in:
parent
8448071d3e
commit
80dbd154fa
|
@ -4875,11 +4875,10 @@ ProcessGDBRemote::LoadModules (LoadedModuleInfoList &module_list)
|
|||
found = true;
|
||||
}
|
||||
|
||||
if (!found)
|
||||
// The main executable will never be included in libraries-svr4, don't remove it
|
||||
if (!found && loaded_module.get() != target.GetExecutableModulePointer())
|
||||
{
|
||||
lldb_private::ObjectFile * obj = loaded_module->GetObjectFile ();
|
||||
if (obj && obj->GetType () != ObjectFile::Type::eTypeExecutable)
|
||||
removed_modules.Append (loaded_module);
|
||||
removed_modules.Append (loaded_module);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue