aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test/lldbutil.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lldbutil.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lldbutil.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbutil.py b/lldb/packages/Python/lldbsuite/test/lldbutil.py
index c92626f..117c624 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbutil.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbutil.py
@@ -755,8 +755,13 @@ def check_breakpoint(
expected_location_resolved - Extected resolved status for the location_id (True/False). Default - True.
expected_location_hit_count - Expected hit count for the breakpoint at location_id. Must be set if the location_id parameter is set.
"""
-
- bkpt = test.target().FindBreakpointByID(bpno)
+
+ if isinstance(test.target, lldb.SBTarget):
+ target = test.target
+ else:
+ target = test.target()
+ bkpt = target.FindBreakpointByID(bpno)
+
test.assertTrue(bkpt.IsValid(), "Breakpoint is not valid.")
if expected_locations is not None: