brucem created this revision. 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.
https://reviews.llvm.org/D31283 Files: include/lldb/API/SBBreakpointLocation.h scripts/interface/SBBreakpointLocation.i source/API/SBBreakpointLocation.cpp Index: source/API/SBBreakpointLocation.cpp =================================================================== --- source/API/SBBreakpointLocation.cpp +++ source/API/SBBreakpointLocation.cpp @@ -100,6 +100,16 @@ 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) { Index: scripts/interface/SBBreakpointLocation.i =================================================================== --- scripts/interface/SBBreakpointLocation.i +++ scripts/interface/SBBreakpointLocation.i @@ -48,6 +48,9 @@ IsEnabled (); uint32_t + GetHitCount (); + + uint32_t GetIgnoreCount (); void Index: include/lldb/API/SBBreakpointLocation.h =================================================================== --- include/lldb/API/SBBreakpointLocation.h +++ include/lldb/API/SBBreakpointLocation.h @@ -38,6 +38,8 @@ bool IsEnabled(); + uint32_t GetHitCount(); + uint32_t GetIgnoreCount(); void SetIgnoreCount(uint32_t n);
Index: source/API/SBBreakpointLocation.cpp =================================================================== --- source/API/SBBreakpointLocation.cpp +++ source/API/SBBreakpointLocation.cpp @@ -100,6 +100,16 @@ 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) { Index: scripts/interface/SBBreakpointLocation.i =================================================================== --- scripts/interface/SBBreakpointLocation.i +++ scripts/interface/SBBreakpointLocation.i @@ -48,6 +48,9 @@ IsEnabled (); uint32_t + GetHitCount (); + + uint32_t GetIgnoreCount (); void Index: include/lldb/API/SBBreakpointLocation.h =================================================================== --- include/lldb/API/SBBreakpointLocation.h +++ include/lldb/API/SBBreakpointLocation.h @@ -38,6 +38,8 @@ bool IsEnabled(); + uint32_t GetHitCount(); + uint32_t GetIgnoreCount(); void SetIgnoreCount(uint32_t n);
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits