[Lldb-commits] [lldb] r147886 - in /lldb/trunk/tools/debugserver: debugserver.xcodeproj/project.pbxproj source/MacOSX/arm/DNBArchImpl.cpp source/MacOSX/arm/DNBArchImpl.h

Greg Clayton gclayton at apple.com
Tue Jan 10 14:33:56 PST 2012


Author: gclayton
Date: Tue Jan 10 16:33:56 2012
New Revision: 147886

URL: http://llvm.org/viewvc/llvm-project?rev=147886&view=rev
Log:
Disable ARMDisassembler.framework support which was used for software single stepping.


Modified:
    lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj
    lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp
    lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.h

Modified: lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj?rev=147886&r1=147885&r2=147886&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj Tue Jan 10 16:33:56 2012
@@ -557,8 +557,6 @@
 				"OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = (
 					"-framework",
 					SpringBoardServices,
-					"-framework",
-					ARMDisassembler,
 					"-llockdown",
 				);
 				OTHER_MIGFLAGS = "-I$(DERIVED_FILE_DIR)";
@@ -600,8 +598,6 @@
 				"OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = (
 					"-framework",
 					SpringBoardServices,
-					"-framework",
-					ARMDisassembler,
 					"-llockdown",
 				);
 				OTHER_MIGFLAGS = "-I$(DERIVED_FILE_DIR)";
@@ -643,8 +639,6 @@
 				"OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = (
 					"-framework",
 					SpringBoardServices,
-					"-framework",
-					ARMDisassembler,
 					"-llockdown",
 				);
 				OTHER_MIGFLAGS = "-I$(DERIVED_FILE_DIR)";

Modified: lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp?rev=147886&r1=147885&r2=147886&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp Tue Jan 10 16:33:56 2012
@@ -423,10 +423,13 @@
                     }
                     m_sw_single_step_itblock_break_count = 0;
 
+#if defined (USE_ARM_DISASSEMBLER_FRAMEWORK)
+
                     // Decode instructions up to the current PC to ensure the internal decoder state is valid for the IT block
                     // The decoder has to decode each instruction in the IT block even if it is not executed so that
                     // the fields are correctly updated
                     DecodeITBlockInstructions(m_state.context.gpr.__pc);
+#endif
                 }
 
             }
@@ -466,6 +469,8 @@
 }
 
 
+#if defined (USE_ARM_DISASSEMBLER_FRAMEWORK)
+
 void
 DNBArchMachARM::DecodeITBlockInstructions(nub_addr_t curr_pc)
 
@@ -520,7 +525,7 @@
         DNBLogThreadedIf(LOG_STEP | LOG_VERBOSE, "%s: next_pc_in_itblock=0x%8.8x", __FUNCTION__, next_pc_in_itblock);
     }
 }
-
+#endif
 
 // Set the single step bit in the processor status register.
 kern_return_t
@@ -685,6 +690,8 @@
     return false;
 }
 
+#if defined (USE_ARM_DISASSEMBLER_FRAMEWORK)
+
 bool
 DNBArchMachARM::ComputeNextPC(nub_addr_t currentPC, arm_decoded_instruction_t decodedInstruction, bool currentPCIsThumb, nub_addr_t *targetPC)
 {
@@ -1830,6 +1837,8 @@
     return decodeReturnCode;
 }
 
+#endif
+
 nub_bool_t
 DNBArchMachARM::BreakpointHit (nub_process_t pid, nub_thread_t tid, nub_break_t breakID, void *baton)
 {
@@ -1847,6 +1856,8 @@
 DNBArchMachARM::SetSingleStepSoftwareBreakpoints()
 {
     DNBError err;
+
+#if defined (USE_ARM_DISASSEMBLER_FRAMEWORK)
     err = GetGPRState(false);
 
     if (err.Fail())
@@ -2043,7 +2054,9 @@
         }
 #endif
     }
-
+#else
+    err.LogThreaded("%s: ARMDisassembler.framework support is disabled", __FUNCTION__);
+#endif
     return err.Error();
 }
 

Modified: lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.h?rev=147886&r1=147885&r2=147886&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.h (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.h Tue Jan 10 16:33:56 2012
@@ -17,7 +17,9 @@
 #if defined (__arm__)
 
 #include "DNBArch.h"
+#if defined (USE_ARM_DISASSEMBLER_FRAMEWORK)
 #include <ARMDisassembler/ARMDisassembler.h>
+#endif
 
 class MachThread;
 
@@ -36,7 +38,9 @@
         m_last_decode_pc(INVALID_NUB_ADDRESS)
     {
         memset(&m_dbg_save, 0, sizeof(m_dbg_save));
+#if defined (USE_ARM_DISASSEMBLER_FRAMEWORK)
         ThumbStaticsInit(&m_last_decode_thumb);
+#endif
         for (int i = 0; i < kMaxNumThumbITBreakpoints; i++)
             m_sw_single_step_itblock_break_id[i] = INVALID_NUB_BREAK_ID;
     }
@@ -85,10 +89,12 @@
     kern_return_t           SetSingleStepSoftwareBreakpoints ();
 
     bool                    ConditionPassed(uint8_t condition, uint32_t cpsr);
+#if defined (USE_ARM_DISASSEMBLER_FRAMEWORK)
     bool                    ComputeNextPC(nub_addr_t currentPC, arm_decoded_instruction_t decodedInstruction, bool currentPCIsThumb, nub_addr_t *targetPC);
-    void                    EvaluateNextInstructionForSoftwareBreakpointSetup(nub_addr_t currentPC, uint32_t cpsr, bool currentPCIsThumb, nub_addr_t *nextPC, bool *nextPCIsThumb);
-    void                    DecodeITBlockInstructions(nub_addr_t curr_pc);
     arm_error_t             DecodeInstructionUsingDisassembler(nub_addr_t curr_pc, uint32_t curr_cpsr, arm_decoded_instruction_t *decodedInstruction, thumb_static_data_t *thumbStaticData, nub_addr_t *next_pc);
+    void                    DecodeITBlockInstructions(nub_addr_t curr_pc);
+#endif
+    void                    EvaluateNextInstructionForSoftwareBreakpointSetup(nub_addr_t currentPC, uint32_t cpsr, bool currentPCIsThumb, nub_addr_t *nextPC, bool *nextPCIsThumb);
     static nub_bool_t       BreakpointHit (nub_process_t pid, nub_thread_t tid, nub_break_t breakID, void *baton);
 
     typedef enum RegisterSetTag
@@ -233,8 +239,10 @@
     nub_break_t     m_sw_single_step_itblock_break_id[kMaxNumThumbITBreakpoints];
     nub_addr_t      m_sw_single_step_itblock_break_count;
     // Disassembler state
+#if defined (USE_ARM_DISASSEMBLER_FRAMEWORK)
     thumb_static_data_t m_last_decode_thumb;
     arm_decoded_instruction_t m_last_decode_arm;
+#endif
     nub_addr_t      m_last_decode_pc;
 
 };





More information about the lldb-commits mailing list