Author: tfiala Date: Thu Aug 21 11:42:31 2014 New Revision: 216188 URL: http://llvm.org/viewvc/llvm-project?rev=216188&view=rev Log: Add software breakpoint support for Linux aarch64.
See http://reviews.llvm.org/D4969 for details. Change by Paul Osmialowski. Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp?rev=216188&r1=216187&r2=216188&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp (original) +++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp Thu Aug 21 11:42:31 2014 @@ -421,6 +421,13 @@ PlatformLinux::GetSoftwareBreakpointTrap assert(false && "CPU type not supported!"); break; + case llvm::Triple::aarch64: + { + static const uint8_t g_aarch64_opcode[] = { 0x00, 0x00, 0x20, 0xd4 }; + trap_opcode = g_aarch64_opcode; + trap_opcode_size = sizeof(g_aarch64_opcode); + } + break; case llvm::Triple::x86: case llvm::Triple::x86_64: { Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp?rev=216188&r1=216187&r2=216188&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp (original) +++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Thu Aug 21 11:42:31 2014 @@ -2921,10 +2921,15 @@ NativeProcessLinux::GetSoftwareBreakpoin { // FIXME put this behind a breakpoint protocol class that can be // set per architecture. Need ARM, MIPS support here. + static const uint8_t g_aarch64_opcode[] = { 0x00, 0x00, 0x20, 0xd4 }; static const uint8_t g_i386_opcode [] = { 0xCC }; switch (m_arch.GetMachine ()) { + case llvm::Triple::aarch64: + actual_opcode_size = static_cast<uint32_t> (sizeof(g_aarch64_opcode)); + return Error (); + case llvm::Triple::x86: case llvm::Triple::x86_64: actual_opcode_size = static_cast<uint32_t> (sizeof(g_i386_opcode)); @@ -2950,10 +2955,16 @@ NativeProcessLinux::GetSoftwareBreakpoin { // FIXME put this behind a breakpoint protocol class that can be // set per architecture. Need ARM, MIPS support here. + static const uint8_t g_aarch64_opcode[] = { 0x00, 0x00, 0x20, 0xd4 }; static const uint8_t g_i386_opcode [] = { 0xCC }; switch (m_arch.GetMachine ()) { + case llvm::Triple::aarch64: + trap_opcode_bytes = g_aarch64_opcode; + actual_opcode_size = sizeof(g_aarch64_opcode); + return Error (); + case llvm::Triple::x86: case llvm::Triple::x86_64: trap_opcode_bytes = g_i386_opcode; _______________________________________________ lldb-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
