summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/test/breakpoint_conditions/TestBreakpointConditions.py12
-rw-r--r--lldb/test/breakpoint_conditions/main.c2
-rw-r--r--lldb/test/lldbtest.py2
3 files changed, 10 insertions, 6 deletions
diff --git a/lldb/test/breakpoint_conditions/TestBreakpointConditions.py b/lldb/test/breakpoint_conditions/TestBreakpointConditions.py
index a5308ac42d7..4e2bc5b345e 100644
--- a/lldb/test/breakpoint_conditions/TestBreakpointConditions.py
+++ b/lldb/test/breakpoint_conditions/TestBreakpointConditions.py
@@ -27,7 +27,8 @@ class BreakpointConditionsTestCase(TestBase):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to of function 'c'.
- self.line = line_number('main.c', '// Find the line number of function "c" here.')
+ self.line1 = line_number('main.c', '// Find the line number of function "c" here.')
+ self.line2 = line_number('main.c', "// Find the line number of c's parent call here.")
def breakpoint_conditions(self):
"""Exercise breakpoint condition with 'breakpoint modify -c <expr> id'."""
@@ -55,10 +56,11 @@ class BreakpointConditionsTestCase(TestBase):
"hit count = 3"])
# The frame #0 should correspond to main.c:36, the executable statement
- # in function name 'c'.
- self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
- substrs = ["stop reason = breakpoint"],
- patterns = ["frame #0.*main.c:%d" % self.line])
+ # in function name 'c'. And the parent frame should point to main.c:24.
+ self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT_CONDITION,
+ #substrs = ["stop reason = breakpoint"],
+ patterns = ["frame #0.*main.c:%d" % self.line1,
+ "frame #1.*main.c:%d" % self.line2])
if __name__ == '__main__':
diff --git a/lldb/test/breakpoint_conditions/main.c b/lldb/test/breakpoint_conditions/main.c
index 0a0879013b2..dcedf62ae3c 100644
--- a/lldb/test/breakpoint_conditions/main.c
+++ b/lldb/test/breakpoint_conditions/main.c
@@ -21,7 +21,7 @@ int a(int val)
if (val <= 1)
return b(val);
else if (val >= 3)
- return c(val);
+ return c(val); // Find the line number of c's parent call here.
return val;
}
diff --git a/lldb/test/lldbtest.py b/lldb/test/lldbtest.py
index b74e93b8f95..51eb7a29d20 100644
--- a/lldb/test/lldbtest.py
+++ b/lldb/test/lldbtest.py
@@ -153,6 +153,8 @@ STEP_OUT_SUCCEEDED = "Thread step-out succeeded"
STOPPED_DUE_TO_BREAKPOINT = "Process state is stopped due to breakpoint"
+STOPPED_DUE_TO_BREAKPOINT_CONDITION = "Stopped due to breakpoint condition"
+
STOPPED_DUE_TO_SIGNAL = "Process state is stopped due to signal"
STOPPED_DUE_TO_STEP_IN = "Process state is stopped due to step in"
OpenPOWER on IntegriCloud