diff options
author | Justin Hibbits <jrh29@alumni.cwru.edu> | 2014-10-31 02:34:28 +0000 |
---|---|---|
committer | Justin Hibbits <jrh29@alumni.cwru.edu> | 2014-10-31 02:34:28 +0000 |
commit | 6256a0ea8fdd051e0f76ac422c353e4ac2b05d35 (patch) | |
tree | 2bbb7c0671150f55c774eb4eee50656e5891d978 /lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp | |
parent | 1e2cf0dd4bd7c76fc5a7862e42e2bac2da451fc7 (diff) | |
download | bcm5719-llvm-6256a0ea8fdd051e0f76ac422c353e4ac2b05d35.tar.gz bcm5719-llvm-6256a0ea8fdd051e0f76ac422c353e4ac2b05d35.zip |
First cut of PowerPC(64) support in LLDB.
Summary:
This adds preliminary support for PowerPC/PowerPC64, for FreeBSD. There are
some issues still:
* Breakpoints don't work well on powerpc64.
* Shared libraries don't yet get loaded for a 32-bit process on powerpc64 host.
* Backtraces don't work. This is due to PowerPC ABI using a backchain pointer
in memory, instead of a dedicated frame pointer register for the backchain.
* Breakpoints on functions without debug info may not work correctly for 32-bit
powerpc.
Reviewers: emaste, tfiala, jingham, clayborg
Reviewed By: clayborg
Subscribers: emaste, lldb-commits
Differential Revision: http://reviews.llvm.org/D5988
llvm-svn: 220944
Diffstat (limited to 'lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp')
-rw-r--r-- | lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp b/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp index cc086e3b120..ae2358ceaa7 100644 --- a/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp +++ b/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp @@ -326,6 +326,13 @@ PlatformFreeBSD::GetSoftwareBreakpointTrapOpcode (Target &target, BreakpointSite trap_opcode_size = sizeof(g_i386_opcode); } break; + case llvm::Triple::ppc: + case llvm::Triple::ppc64: + { + static const uint8_t g_ppc_opcode[] = { 0x7f, 0xe0, 0x00, 0x08 }; + trap_opcode = g_ppc_opcode; + trap_opcode_size = sizeof(g_ppc_opcode); + } } if (bp_site->SetTrapOpcode(trap_opcode, trap_opcode_size)) |