[Lldb-commits] [lldb] r145978 - in /lldb/trunk/tools/debugserver/source/MacOSX/arm: DNBArchImpl.cpp DNBArchImpl.h
Johnny Chen
johnny.chen at apple.com
Tue Dec 6 14:19:10 PST 2011
Author: johnny
Date: Tue Dec 6 16:19:09 2011
New Revision: 145978
URL: http://llvm.org/viewvc/llvm-project?rev=145978&view=rev
Log:
Add a typedef for arm_debug_state_t as DBG. Plus some minor comment changes.
Modified:
lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp
lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.h
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=145978&r1=145977&r2=145978&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp Tue Dec 6 16:19:09 2011
@@ -252,7 +252,7 @@
}
static void
-DumpDBGState(const arm_debug_state_t& dbg)
+DumpDBGState(const DBG& dbg)
{
uint32_t i = 0;
for (i=0; i<16; i++)
@@ -2284,9 +2284,8 @@
return INVALID_NUB_HW_INDEX;
// We can only watch up to four bytes that follow a 4 byte aligned address
- // per watchpoint register pair. Since we have at most so we can only watch
- // until the next 4 byte boundary and we need to make sure we can properly
- // encode this.
+ // per watchpoint register pair. Since we can only watch until the next 4
+ // byte boundary, we need to make sure we can properly encode this.
uint32_t addr_word_offset = addr % 4;
DNBLogThreadedIf(LOG_WATCHPOINTS, "DNBArchMachARM::EnableHardwareWatchpoint() - addr_word_offset = 0x%8.8x", addr_word_offset);
@@ -2315,8 +2314,8 @@
// Make the byte_mask into a valid Byte Address Select mask
uint32_t byte_address_select = byte_mask << 5;
// Make sure bits 1:0 are clear in our address
- m_state.dbg.__wvr[i] = addr & ~((nub_addr_t)3);
- m_state.dbg.__wcr[i] = byte_address_select | // Which bytes that follow the IMVA that we will watch
+ m_state.dbg.__wvr[i] = addr & ~((nub_addr_t)3); // DVA (Data Virtual Address)
+ m_state.dbg.__wcr[i] = byte_address_select | // Which bytes that follow the DVA that we will watch
S_USER | // Stop only in user mode
(read ? WCR_LOAD : 0) | // Stop on read access?
(write ? WCR_STORE : 0) | // Stop on write access?
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=145978&r1=145977&r2=145978&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.h (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.h Tue Dec 6 16:19:09 2011
@@ -109,6 +109,7 @@
typedef arm_thread_state_t GPR;
typedef arm_vfp_state_t FPU;
typedef arm_exception_state_t EXC;
+ typedef arm_debug_state_t DBG;
static const DNBRegisterInfo g_gpr_registers[];
static const DNBRegisterInfo g_vfp_registers[];
@@ -131,7 +132,7 @@
struct State
{
Context context;
- arm_debug_state_t dbg;
+ DBG dbg;
kern_return_t gpr_errs[2]; // Read/Write errors
kern_return_t vfp_errs[2]; // Read/Write errors
kern_return_t exc_errs[2]; // Read/Write errors
More information about the lldb-commits
mailing list