diff options
author | Johnny Chen <johnny.chen@apple.com> | 2012-03-22 05:10:43 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2012-03-22 05:10:43 +0000 |
commit | 8c9739eedac4c61e7d0d8234ec6e5db17ada70f5 (patch) | |
tree | a57b4da03259f100443ef8221bc4d1b4bdf3f58f /lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp | |
parent | 2cc6f9dd901dfaf291aacb2196101283bfc95004 (diff) | |
download | bcm5719-llvm-8c9739eedac4c61e7d0d8234ec6e5db17ada70f5.tar.gz bcm5719-llvm-8c9739eedac4c61e7d0d8234ec6e5db17ada70f5.zip |
Fixed a bug with the r153228 check-in earlier today in that the cached watchpoint
member variables were not reset appropriately.
llvm-svn: 153239
Diffstat (limited to 'lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp')
-rw-r--r-- | lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp b/lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp index deb7bd65a28..92bd7b83994 100644 --- a/lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp +++ b/lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp @@ -366,15 +366,18 @@ DNBArchMachARM::ThreadWillResume() } // Disable the triggered watchpoint temporarily because we resume. - if (this->m_watchpoint_did_occur) + if (m_watchpoint_did_occur) { - if (this->m_watchpoint_hw_index >= 0) { - DisableHardwareWatchpoint(this->m_watchpoint_hw_index); + if (m_watchpoint_hw_index >= 0) { + DisableHardwareWatchpoint(m_watchpoint_hw_index); DNBLogThreadedIf(LOG_WATCHPOINTS, "DNBArchMachARM::ThreadWillResume() DisableHardwareWatchpoint(%d) called", - this->m_watchpoint_hw_index); + m_watchpoint_hw_index); + // Reset the two watchpoint member variables. + m_watchpoint_did_occur = false; + m_watchpoint_hw_index = -1; /* printf("DNBArchMachARM::ThreadWillResume() DisableHardwareWatchpoint(%d) called", - this->m_watchpoint_hw_index); + m_watchpoint_hw_index); */ } } @@ -504,19 +507,18 @@ DNBArchMachARM::NotifyException(MachException::Data& exc) // If yes, retrieve the exc_sub_code as the data break address. if (!HasWatchpointOccurred()) break; - //printf("Info -- hardware watchpoint was hit!\n"); - this->m_watchpoint_did_occur = true; - this->m_watchpoint_hw_index = -1; + //printf("Info -- Debug Status and Control Register indicates hardware watchpoint occurred!\n"); // The data break address is passed as exc_data[1]. nub_addr_t addr = exc.exc_data[1]; - //printf("exc.exc_data[1]=0x%x\n", addr); + //printf("Info -- from mach exception: exc.exc_data[1]=0x%x\n", addr); // Find the hardware index with the side effect of possibly massaging the // addr to return the starting address as seen from the debugger side. uint32_t hw_index = GetHardwareWatchpointHit(addr); if (hw_index != INVALID_NUB_HW_INDEX) { - this->m_watchpoint_hw_index = hw_index; + m_watchpoint_did_occur = true; + m_watchpoint_hw_index = hw_index; //printf("Setting exc.exc_data[1] to %u\n", addr); exc.exc_data[1] = addr; // Piggyback the hw_index in the exc.data. |