diff options
| author | Bruce Mitchener <bruce.mitchener@gmail.com> | 2017-07-19 14:31:19 +0000 |
|---|---|---|
| committer | Bruce Mitchener <bruce.mitchener@gmail.com> | 2017-07-19 14:31:19 +0000 |
| commit | ccbf7987a3804dfad44ba1fbfb370283f380f198 (patch) | |
| tree | 6dbecd7a3949f3ae9ebb03ba770ef9f68dd43860 /lldb/source/API/SBBreakpointLocation.cpp | |
| parent | 1298fd907c512f10be67710d1a81a2ba9a4444d5 (diff) | |
| download | bcm5719-llvm-ccbf7987a3804dfad44ba1fbfb370283f380f198.tar.gz bcm5719-llvm-ccbf7987a3804dfad44ba1fbfb370283f380f198.zip | |
Expose hit count via SBBreakpointLocation.
Summary:
SBBreakpointLocation exposed the ignore count, but didn't expose
the hit count. Both values were exposed by SBBreakpoint and
SBWatchpoint, so this makes things a bit more consistent.
Reviewers: lldb-commits
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D31283
llvm-svn: 308480
Diffstat (limited to 'lldb/source/API/SBBreakpointLocation.cpp')
| -rw-r--r-- | lldb/source/API/SBBreakpointLocation.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lldb/source/API/SBBreakpointLocation.cpp b/lldb/source/API/SBBreakpointLocation.cpp index dc9c00d8dd5..3678d1d33e0 100644 --- a/lldb/source/API/SBBreakpointLocation.cpp +++ b/lldb/source/API/SBBreakpointLocation.cpp @@ -100,6 +100,16 @@ bool SBBreakpointLocation::IsEnabled() { return false; } +uint32_t SBBreakpointLocation::GetHitCount() { + BreakpointLocationSP loc_sp = GetSP(); + if (loc_sp) { + std::lock_guard<std::recursive_mutex> guard( + loc_sp->GetTarget().GetAPIMutex()); + return loc_sp->GetHitCount(); + } else + return 0; +} + uint32_t SBBreakpointLocation::GetIgnoreCount() { BreakpointLocationSP loc_sp = GetSP(); if (loc_sp) { |

