diff options
author | Francis Ricci <francisjricci@gmail.com> | 2016-06-06 15:00:50 +0000 |
---|---|---|
committer | Francis Ricci <francisjricci@gmail.com> | 2016-06-06 15:00:50 +0000 |
commit | 80dbd154fac43908c3501ab847cb2d4ff69a1359 (patch) | |
tree | 700d7c7351e988a01551c807cf08b0dc6dd36147 /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | |
parent | 8448071d3ead73d12a633f354ef0194b87b4265a (diff) | |
download | bcm5719-llvm-80dbd154fac43908c3501ab847cb2d4ff69a1359.tar.gz bcm5719-llvm-80dbd154fac43908c3501ab847cb2d4ff69a1359.zip |
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
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index 53bf9f653ab..60dbcb29a71 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -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); } } |