[Lldb-commits] [lldb] r237303 - Initial FreeBSD/arm live debugging support

Ed Maste emaste at freebsd.org
Wed May 13 15:33:13 PDT 2015


Author: emaste
Date: Wed May 13 17:33:12 2015
New Revision: 237303

URL: http://llvm.org/viewvc/llvm-project?rev=237303&view=rev
Log:
Initial FreeBSD/arm live debugging support

Patch by Tom Rix, except using the RegisterContextFreeBSD_arm files
added in r235305 instead.

Modified:
    lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
    lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.cpp

Modified: lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp?rev=237303&r1=237302&r2=237303&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp Wed May 13 17:33:12 2015
@@ -591,6 +591,12 @@ PlatformFreeBSD::GetSoftwareBreakpointTr
     default:
         assert(false && "Unhandled architecture in PlatformFreeBSD::GetSoftwareBreakpointTrapOpcode()");
         break;
+    case llvm::Triple::arm:
+        {
+            static const uint8_t g_arm_opcode[] = { 0xfe, 0xde, 0xff, 0xe7 };
+            trap_opcode = g_arm_opcode;
+            trap_opcode_size = sizeof(g_arm_opcode);
+        }
     case llvm::Triple::x86:
     case llvm::Triple::x86_64:
         {

Modified: lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.cpp?rev=237303&r1=237302&r2=237303&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.cpp Wed May 13 17:33:12 2015
@@ -41,6 +41,7 @@
 #include "Plugins/Process/Utility/RegisterContextLinux_arm64.h"
 #include "Plugins/Process/Utility/RegisterContextLinux_i386.h"
 #include "Plugins/Process/Utility/RegisterContextLinux_x86_64.h"
+#include "Plugins/Process/Utility/RegisterContextFreeBSD_arm.h"
 #include "Plugins/Process/Utility/RegisterContextFreeBSD_i386.h"
 #include "Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h"
 #include "Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.h"
@@ -171,6 +172,9 @@ POSIXThread::GetRegisterContext()
             case llvm::Triple::FreeBSD:
                 switch (target_arch.GetMachine())
                 {
+                    case llvm::Triple::arm:
+                        reg_interface = new RegisterContextFreeBSD_arm(target_arch);
+                        break;
                     case llvm::Triple::ppc:
 #ifndef __powerpc64__
                         reg_interface = new RegisterContextFreeBSD_powerpc32(target_arch);





More information about the lldb-commits mailing list