Skip to content

Commit

Permalink
[LLDB][Watchpoint] Change ignore_count condition location to fix watc…
Browse files Browse the repository at this point in the history
…hpoint ignore feature for architectures with watchpoint_exceptions_received=before

Reviewers: jingham.
Subscribers: clayborg, jaydeep, bhushan, sagar, nitesh.jain, lldb-commits.
Differential Revision: http://reviews.llvm.org/D13296

llvm-svn: 251905
  • Loading branch information
Mohit7 committed Nov 3, 2015
1 parent 73dc852 commit 13763c3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 0 additions & 3 deletions lldb/source/Breakpoint/Watchpoint.cpp
Expand Up @@ -183,9 +183,6 @@ Watchpoint::ShouldStop (StoppointCallbackContext *context)
if (!IsEnabled())
return false;

if (GetHitCount() <= GetIgnoreCount())
return false;

return true;
}

Expand Down
10 changes: 10 additions & 0 deletions lldb/source/Target/StopInfo.cpp
Expand Up @@ -759,6 +759,16 @@ class StopInfoWatchpoint : public StopInfo
}
}

// TODO: This condition should be checked in the synchronous part of the watchpoint code
// (Watchpoint::ShouldStop), so that we avoid pulling an event even if the watchpoint fails
// the ignore count condition. It is moved here temporarily, because for archs with
// watchpoint_exceptions_received=before, the code in the previous lines takes care of moving
// the inferior to next PC. We have to check the ignore count condition after this is done,
// otherwise we will hit same watchpoint multiple times until we pass ignore condition, but we
// won't actually be ignoring them.
if (wp_sp->GetHitCount() <= wp_sp->GetIgnoreCount())
m_should_stop = false;

if (m_should_stop && wp_sp->GetConditionText() != NULL)
{
// We need to make sure the user sees any parse errors in their condition, so we'll hook the
Expand Down

0 comments on commit 13763c3

Please sign in to comment.