From 8006d319c2e73ece6d79ddccb8a2d37bd6045317 Mon Sep 17 00:00:00 2001 From: Deepak Panickal Date: Mon, 21 Jul 2014 17:22:12 +0000 Subject: [PATCH] Add the Hexagon DSP breakpoint opcode to PlatformWindows and PlatformLinux llvm-svn: 213567 --- lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp | 7 ++++++- lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp index 18d8e7c..847f8a0 100644 --- a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp +++ b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp @@ -401,7 +401,12 @@ PlatformLinux::GetSoftwareBreakpointTrapOpcode (Target &target, } break; case llvm::Triple::hexagon: - return 0; + { + static const uint8_t g_hex_opcode[] = { 0x0c, 0xdb, 0x00, 0x54 }; + trap_opcode = g_hex_opcode; + trap_opcode_size = sizeof(g_hex_opcode); + } + break; } if (bp_site->SetTrapOpcode(trap_opcode, trap_opcode_size)) diff --git a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp index 8ae1d8a..0353eb6 100644 --- a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp +++ b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp @@ -291,7 +291,12 @@ PlatformWindows::GetSoftwareBreakpointTrapOpcode (Target &target, BreakpointSite break; case llvm::Triple::hexagon: - return 0; + { + static const uint8_t g_hex_opcode[] = { 0x0c, 0xdb, 0x00, 0x54 }; + trap_opcode = g_hex_opcode; + trap_opcode_size = sizeof(g_hex_opcode); + } + break; default: llvm_unreachable("Unhandled architecture in PlatformWindows::GetSoftwareBreakpointTrapOpcode()"); break; -- 2.7.4