diff options
author | Mohit K. Bhakkad <mohit.bhakkad@imgtec.com> | 2015-01-08 09:46:29 +0000 |
---|---|---|
committer | Mohit K. Bhakkad <mohit.bhakkad@imgtec.com> | 2015-01-08 09:46:29 +0000 |
commit | 29e2a7739309067bc8ddb1085829f320a72f5db2 (patch) | |
tree | 00fc83f21aa8b06d1d50b30f6ce6327b46408e07 | |
parent | 118995a6cd4da476a187ec036ceabe7c8eea46e5 (diff) |
[LLDB][MIPS] Adding SoftwareBreakpointTrapOpcode and RelocationJumpSlotType for MIPS
Patch by Bhushan Attarde
Reviewers: clayborg
Reviewed By: clayborg
Subscribers: petarj, dsanders, mohit.bhakkad, lldb-commits
Differential Revision: http://reviews.llvm.org/D6861
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@225436 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | source/Plugins/ObjectFile/ELF/ELFHeader.cpp | 3 | ||||
-rw-r--r-- | source/Plugins/Platform/Linux/PlatformLinux.cpp | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/source/Plugins/ObjectFile/ELF/ELFHeader.cpp b/source/Plugins/ObjectFile/ELF/ELFHeader.cpp index cfb24f880..12392c244 100644 --- a/source/Plugins/ObjectFile/ELF/ELFHeader.cpp +++ b/source/Plugins/ObjectFile/ELF/ELFHeader.cpp @@ -195,6 +195,9 @@ ELFHeader::GetRelocationJumpSlotType() const case EM_AARCH64: slot = R_AARCH64_JUMP_SLOT; break; + case EM_MIPS: + slot = R_MIPS_JUMP_SLOT; + break; } return slot; diff --git a/source/Plugins/Platform/Linux/PlatformLinux.cpp b/source/Plugins/Platform/Linux/PlatformLinux.cpp index cb48a291d..41dd060ba 100644 --- a/source/Plugins/Platform/Linux/PlatformLinux.cpp +++ b/source/Plugins/Platform/Linux/PlatformLinux.cpp @@ -583,6 +583,13 @@ PlatformLinux::GetSoftwareBreakpointTrapOpcode (Target &target, } } break; + case llvm::Triple::mips64: + { + static const uint8_t g_hex_opcode[] = { 0x00, 0x00, 0x00, 0x0d }; + trap_opcode = g_hex_opcode; + trap_opcode_size = sizeof(g_hex_opcode); + } + break; } if (bp_site->SetTrapOpcode(trap_opcode, trap_opcode_size)) |