Author: tfiala Date: Wed Aug 27 11:05:26 2014 New Revision: 216553 URL: http://llvm.org/viewvc/llvm-project?rev=216553&view=rev Log: Add Linux support for get thread area on ARM64 using ProcessMonitor debugging.
See http://reviews.llvm.org/D5073. Change by Paul Osmialowski. Modified: lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp Modified: lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp?rev=216553&r1=216552&r2=216553&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp (original) +++ lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp Wed Aug 27 11:05:26 2014 @@ -15,6 +15,7 @@ #include <string.h> #include <stdint.h> #include <unistd.h> +#include <elf.h> #include <sys/personality.h> #include <sys/ptrace.h> #include <sys/uio.h> @@ -24,11 +25,6 @@ #include <sys/user.h> #include <sys/wait.h> -#if defined (__arm64__) || defined (__aarch64__) -// NT_PRSTATUS and NT_FPREGSET definition -#include <elf.h> -#endif - // C++ Includes // Other libraries and framework includes #include "lldb/Core/Debugger.h" @@ -802,6 +798,19 @@ ReadThreadPointerOperation::Execute(Proc const ArchSpec& arch = monitor->GetProcess().GetTarget().GetArchitecture(); switch(arch.GetMachine()) { + case llvm::Triple::aarch64: + { + int regset = NT_ARM_TLS; + struct iovec ioVec; + + ioVec.iov_base = m_addr; + ioVec.iov_len = sizeof(lldb::addr_t); + if (PTRACE(PTRACE_GETREGSET, m_tid, ®set, &ioVec, ioVec.iov_len) < 0) + m_result = false; + else + m_result = true; + break; + } #if defined(__i386__) || defined(__x86_64__) // Note that struct user below has a field named i387 which is x86-specific. // Therefore, this case should be compiled only for x86-based systems. _______________________________________________ lldb-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
