diff options
Diffstat (limited to 'lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp | 53 |
1 files changed, 24 insertions, 29 deletions
diff --git a/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp b/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp index e6557c2d58e..4b0d640c6c2 100644 --- a/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp +++ b/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp @@ -69,15 +69,15 @@ FreeBSDThread::FreeBSDThread(Process &process, lldb::tid_t tid) for (uint32_t wp_idx = 0; wp_idx < wp_size; wp_idx++) { lldb::WatchpointSP wp = wp_list.GetByIndex(wp_idx); if (wp.get() && wp->IsEnabled()) { - // This watchpoint as been enabled; obviously this "new" thread - // has been created since that watchpoint was enabled. Since - // the POSIXBreakpointProtocol has yet to be initialized, its - // m_watchpoints_initialized member will be FALSE. Attempting to - // read the debug status register to determine if a watchpoint - // has been hit would result in the zeroing of that register. - // Since the active debug registers would have been cloned when - // this thread was created, simply force the m_watchpoints_initized - // member to TRUE and avoid resetting dr6 and dr7. + // This watchpoint as been enabled; obviously this "new" thread has been + // created since that watchpoint was enabled. Since the + // POSIXBreakpointProtocol has yet to be initialized, its + // m_watchpoints_initialized member will be FALSE. Attempting to read + // the debug status register to determine if a watchpoint has been hit + // would result in the zeroing of that register. Since the active debug + // registers would have been cloned when this thread was created, simply + // force the m_watchpoints_initized member to TRUE and avoid resetting + // dr6 and dr7. GetPOSIXBreakpointProtocol()->ForceWatchpointsInitialized(); } } @@ -98,9 +98,8 @@ void FreeBSDThread::RefreshStateAfterStop() { // context by the time this function gets called. The KDPRegisterContext // class has been made smart enough to detect when it needs to invalidate // which registers are valid by putting hooks in the register read and - // register supply functions where they check the process stop ID and do - // the right thing. - // if (StateIsStoppedState(GetState()) + // register supply functions where they check the process stop ID and do the + // right thing. if (StateIsStoppedState(GetState()) { const bool force = false; GetRegisterContext()->InvalidateIfNeeded(force); @@ -469,20 +468,17 @@ void FreeBSDThread::BreakNotify(const ProcessMessage &message) { GetProcess()->GetBreakpointSiteList().FindByAddress(pc)); // If the breakpoint is for this thread, then we'll report the hit, but if it - // is for another thread, - // we create a stop reason with should_stop=false. If there is no breakpoint - // location, then report - // an invalid stop reason. We don't need to worry about stepping over the - // breakpoint here, that will - // be taken care of when the thread resumes and notices that there's a + // is for another thread, we create a stop reason with should_stop=false. If + // there is no breakpoint location, then report an invalid stop reason. We + // don't need to worry about stepping over the breakpoint here, that will be + // taken care of when the thread resumes and notices that there's a // breakpoint under the pc. if (bp_site) { lldb::break_id_t bp_id = bp_site->GetID(); // If we have an operating system plug-in, we might have set a thread - // specific breakpoint using the - // operating system thread ID, so we can't make any assumptions about the - // thread ID so we must always - // report the breakpoint regardless of the thread. + // specific breakpoint using the operating system thread ID, so we can't + // make any assumptions about the thread ID so we must always report the + // breakpoint regardless of the thread. if (bp_site->ValidForThisThread(this) || GetProcess()->GetOperatingSystem() != NULL) SetStopInfo(StopInfo::CreateStopReasonWithBreakpointSiteID(*this, bp_id)); @@ -541,13 +537,12 @@ void FreeBSDThread::TraceNotify(const ProcessMessage &message) { lldb::BreakpointSiteSP bp_site( GetProcess()->GetBreakpointSiteList().FindByAddress(pc)); - // If the current pc is a breakpoint site then set the StopInfo to Breakpoint. - // Otherwise, set the StopInfo to Watchpoint or Trace. - // If we have an operating system plug-in, we might have set a thread specific - // breakpoint using the - // operating system thread ID, so we can't make any assumptions about the - // thread ID so we must always - // report the breakpoint regardless of the thread. + // If the current pc is a breakpoint site then set the StopInfo to + // Breakpoint. Otherwise, set the StopInfo to Watchpoint or Trace. If we have + // an operating system plug-in, we might have set a thread specific + // breakpoint using the operating system thread ID, so we can't make any + // assumptions about the thread ID so we must always report the breakpoint + // regardless of the thread. if (bp_site && (bp_site->ValidForThisThread(this) || GetProcess()->GetOperatingSystem() != NULL)) SetStopInfo(StopInfo::CreateStopReasonWithBreakpointSiteID( |