summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2011-09-23 00:54:11 +0000
committerJim Ingham <jingham@apple.com>2011-09-23 00:54:11 +0000
commit87df91b8661737980b58f7d1d05c27534c57f490 (patch)
tree14e962e25baadb5013438b6686d0c9b1f64922d2 /lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
parentb9a11322b13a13dfcccb79cb34ebfc4a84d65bfd (diff)
downloadbcm5719-llvm-87df91b8661737980b58f7d1d05c27534c57f490.tar.gz
bcm5719-llvm-87df91b8661737980b58f7d1d05c27534c57f490.zip
Added the ability to restrict breakpoints by function name, function regexp, selector
etc to specific source files. Added SB API's to specify these source files & also more than one module. Added an "exact" option to CompileUnit's FindLineEntry API. llvm-svn: 140362
Diffstat (limited to 'lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py')
-rw-r--r--lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py b/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
index b96d20d37df..616464e2104 100644
--- a/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
+++ b/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
@@ -77,6 +77,25 @@ class BreakpointCommandTestCase(TestBase):
"print >> here",
"here.close()"])
+ # Next lets try some other breakpoint kinds. First break with a regular expression
+ # and then specify only one file. The first time we should get two locations,
+ # the second time only one:
+ self.expect ("break set -r ._MyFunction",
+ patterns = ["Breakpoint created: [0-9]+: regex = '\._MyFunction', locations = 2"])
+
+ self.expect ("break set -r ._MyFunction -f a.c",
+ patterns = ["Breakpoint created: [0-9]+: regex = '\._MyFunction', locations = 1"])
+
+ self.expect ("break set -r ._MyFunction -f a.c -f b.c",
+ patterns = ["Breakpoint created: [0-9]+: regex = '\._MyFunction', locations = 2"])
+
+ # Now try a source regex breakpoint:
+ self.expect ("break set -p \"is about to return [12]0\" -f a.c -f b.c",
+ patterns = ["Breakpoint created: [0-9]+: source regex = \"is about to return \[12\]0\", locations = 2"])
+
+ self.expect ("break set -p \"is about to return [12]0\" -f a.c",
+ patterns = ["Breakpoint created: [0-9]+: source regex = \"is about to return \[12\]0\", locations = 1"])
+
# Run the program. Remove 'output.txt' if it exists.
if os.path.exists('output.txt'):
os.remove('output.txt')
OpenPOWER on IntegriCloud