summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/POSIX
diff options
context:
space:
mode:
authorJustin Hibbits <jrh29@alumni.cwru.edu>2014-11-12 15:14:08 +0000
committerJustin Hibbits <jrh29@alumni.cwru.edu>2014-11-12 15:14:08 +0000
commit89e6f3851efc15ef8b87f19d5e46c54332db684f (patch)
tree5863ab72625168a97d0fe08be8ba649548c291d5 /lldb/source/Plugins/Process/POSIX
parent43bcdbde4a4e6f821e5749758d864c0da915462f (diff)
downloadbcm5719-llvm-89e6f3851efc15ef8b87f19d5e46c54332db684f.tar.gz
bcm5719-llvm-89e6f3851efc15ef8b87f19d5e46c54332db684f.zip
Improve PowerPC unwind support
Summary: Taking advantage of the new 'CFAIsRegisterDereferenced' CFA register type, add full stack unwind support to the PowerPC/PowerPC64 ABI. Also, add a new register set for powerpc32-on-64, so the register sizes are correct. This also requires modifying the ProcessMonitor to add support for non-uintptr_t-sized register values. Reviewers: jasonmolenda, emaste Subscribers: emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D6183 llvm-svn: 221789
Diffstat (limited to 'lldb/source/Plugins/Process/POSIX')
-rw-r--r--lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_powerpc.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_powerpc.cpp b/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_powerpc.cpp
index 0dfb91d5e4e..b542db4779d 100644
--- a/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_powerpc.cpp
+++ b/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_powerpc.cpp
@@ -123,8 +123,13 @@ RegisterContextPOSIXProcessMonitor_powerpc::WriteRegister(const unsigned reg,
}
ProcessMonitor &monitor = GetMonitor();
+ // Account for the fact that 32-bit targets on powerpc64 really use 64-bit
+ // registers in ptrace, but expose here 32-bit registers with a higher
+ // offset.
+ uint64_t offset = GetRegisterOffset(reg_to_write);
+ offset &= ~(sizeof(uintptr_t) - 1);
return monitor.WriteRegisterValue(m_thread.GetID(),
- GetRegisterOffset(reg_to_write),
+ offset,
GetRegisterName(reg_to_write),
value_to_write);
}
OpenPOWER on IntegriCloud