summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
diff options
context:
space:
mode:
authorAntonio Afonso <antonio.afonso@gmail.com>2019-06-14 21:15:08 +0000
committerAntonio Afonso <antonio.afonso@gmail.com>2019-06-14 21:15:08 +0000
commitf4335b8e3c6a787e3616f3b0ccdfd64409eaf149 (patch)
tree7fbcb3e390df5c927ba9738f46368d251af2928d /lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
parent2de984cd3046de0ec6b9557721a08688beadf7e2 (diff)
downloadbcm5719-llvm-f4335b8e3c6a787e3616f3b0ccdfd64409eaf149.tar.gz
bcm5719-llvm-f4335b8e3c6a787e3616f3b0ccdfd64409eaf149.zip
Implement GetSharedLibraryInfoAddress
Summary: This is the third patch to improve module loading in a series that started here (where I explain the motivation and solution): D62499 Add functions to read the r_debug location to know where the linked list of loaded libraries are so I can generate the `xfer:libraries-svr4` packet. I'm also using this function to implement `GetSharedLibraryInfoAddress` that was "not implemented" for linux. Most of this code was inspired by the current ds2 implementation here: https://github.com/facebook/ds2/blob/master/Sources/Target/POSIX/ELFProcess.cpp. Reviewers: clayborg, xiaobai, labath Reviewed By: clayborg, labath Subscribers: emaste, krytarowski, mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D62501 llvm-svn: 363458
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp')
-rw-r--r--lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp22
1 files changed, 1 insertions, 21 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
index 81d257e95e1..7637237aa16 100644
--- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
@@ -288,7 +288,7 @@ NativeProcessLinux::NativeProcessLinux(::pid_t pid, int terminal_fd,
NativeDelegate &delegate,
const ArchSpec &arch, MainLoop &mainloop,
llvm::ArrayRef<::pid_t> tids)
- : NativeProcessProtocol(pid, terminal_fd, delegate), m_arch(arch) {
+ : NativeProcessELF(pid, terminal_fd, delegate), m_arch(arch) {
if (m_terminal_fd != -1) {
Status status = EnsureFDFlags(m_terminal_fd, O_NONBLOCK);
assert(status.Success());
@@ -1389,11 +1389,6 @@ Status NativeProcessLinux::DeallocateMemory(lldb::addr_t addr) {
return Status("not implemented");
}
-lldb::addr_t NativeProcessLinux::GetSharedLibraryInfoAddress() {
- // punt on this for now
- return LLDB_INVALID_ADDRESS;
-}
-
size_t NativeProcessLinux::UpdateThreads() {
// The NativeProcessLinux monitoring threads are always up to date with
// respect to thread state and they keep the thread list populated properly.
@@ -2082,18 +2077,3 @@ Status NativeProcessLinux::StopProcessorTracingOnThread(lldb::user_id_t traceid,
return error;
}
-
-llvm::Optional<uint64_t>
-NativeProcessLinux::GetAuxValue(enum AuxVector::EntryType type) {
- if (m_aux_vector == nullptr) {
- auto buffer_or_error = GetAuxvData();
- if (!buffer_or_error)
- return llvm::None;
- DataExtractor auxv_data(buffer_or_error.get()->getBufferStart(),
- buffer_or_error.get()->getBufferSize(),
- GetByteOrder(), GetAddressByteSize());
- m_aux_vector = llvm::make_unique<AuxVector>(auxv_data);
- }
-
- return m_aux_vector->GetAuxValue(type);
-}
OpenPOWER on IntegriCloud