summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
diff options
context:
space:
mode:
authorIlia K <ki.stfu@gmail.com>2015-05-15 18:16:15 +0000
committerIlia K <ki.stfu@gmail.com>2015-05-15 18:16:15 +0000
commitd9f1a78aa07e425675661e87b7b9e7f9f4a8ce65 (patch)
treebd0f1c904a94266eab4e4a0fdcfd1994e87f6655 /lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
parent154eb5aa1d9c829715d13c9a047d4498be4d2e2a (diff)
downloadbcm5719-llvm-d9f1a78aa07e425675661e87b7b9e7f9f4a8ce65.tar.gz
bcm5719-llvm-d9f1a78aa07e425675661e87b7b9e7f9f4a8ce65.zip
Add --move-to-nearest-code / target.move-to-nearest-code options
Summary: This option forces to only set a source line breakpoint when there is an exact-match This patch includes the following commits: # Add the -m/--exact-match option in "breakpoint set" command ## Add exact_match arg in BreakpointResolverFileLine ctor ## Add m_exact_match field in BreakpointResolverFileLine ## Add exact_match arg in BreakpointResolverFileRegex ctor ## Add m_exact_match field in BreakpointResolverFileRegex ## Add exact_match arg in Target::CreateSourceRegexBreakpoint ## Add exact_match arg in Target::CreateBreakpoint ## Add -m/--exact-match option in "breakpoint set" command # Add target.exact-match option to skip BP if source line doesn't match ## Add target.exact-match global option ## Add Target::GetExactMatch ## Refactor Target::CreateSourceRegexBreakpoint to accept LazyBool exact_match (was bool) ## Refactor Target::CreateBreakpoint to accept LazyBool exact_match (was bool) # Add target.exact-match test in SettingsCommandTestCase # Add BreakpointOptionsTestCase tests to test --skip-prologue/--exact-match options # Fix a few typos in lldbutil.check_breakpoint_result func # Rename --exact-match/m_exact_match/exact_match/GetExactMatch to --move-to-nearest-code/m_move_to_nearest_code/move_to_nearest_code/GetMoveToNearestCode # Add exact_match field in BreakpointResolverFileLine::GetDescription and BreakpointResolverFileRegex::GetDescription, for example: was: ``` 1: file = '/Users/IliaK/p/llvm/tools/lldb/test/functionalities/breakpoint/breakpoint_command/main.c', line = 12, locations = 1, resolved = 1, hit count = 2 1.1: where = a.out`main + 20 at main.c:12, address = 0x0000000100000eb4, resolved, hit count = 2 ``` now: ``` 1: file = '/Users/IliaK/p/llvm/tools/lldb/test/functionalities/breakpoint/breakpoint_command/main.c', line = 12, exact_match = 0, locations = 1, resolved = 1, hit count = 2 1.1: where = a.out`main + 20 at main.c:12, address = 0x0000000100000eb4, resolved, hit count = 2 ``` Test Plan: ./dotest.py -v --executable $BUILDDIR/bin/lldb functionalities/breakpoint/ ./dotest.py -v --executable $BUILDDIR/bin/lldb settings/ ./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi/breakpoint/ Reviewers: jingham, clayborg Reviewed By: clayborg Subscribers: lldb-commits, clayborg, jingham Differential Revision: http://reviews.llvm.org/D9273 llvm-svn: 237460
Diffstat (limited to 'lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py')
-rw-r--r--lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py b/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
index 79696780287..b1116595d4b 100644
--- a/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
+++ b/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
@@ -64,12 +64,12 @@ class BreakpointCommandTestCase(TestBase):
# The breakpoint list now only contains breakpoint 1.
self.expect("breakpoint list", "Breakpoints 1 & 2 created",
- substrs = ["2: file = 'main.c', line = %d, locations = 1" % self.line],
- patterns = ["1: file = '.*main.c', line = %d, locations = 1" % self.line] )
+ substrs = ["2: file = 'main.c', line = %d, exact_match = 0, locations = 1" % self.line],
+ patterns = ["1: file = '.*main.c', line = %d, exact_match = 0, locations = 1" % self.line] )
self.expect("breakpoint list -f", "Breakpoints 1 & 2 created",
- substrs = ["2: file = 'main.c', line = %d, locations = 1" % self.line],
- patterns = ["1: file = '.*main.c', line = %d, locations = 1" % self.line,
+ substrs = ["2: file = 'main.c', line = %d, exact_match = 0, locations = 1" % self.line],
+ patterns = ["1: file = '.*main.c', line = %d, exact_match = 0, locations = 1" % self.line,
"1.1: .+at main.c:%d, .+unresolved, hit count = 0" % self.line,
"2.1: .+at main.c:%d, .+unresolved, hit count = 0" % self.line])
@@ -151,13 +151,13 @@ class BreakpointCommandTestCase(TestBase):
# The breakpoint list now only contains breakpoint 1.
self.expect("breakpoint list -f", "Breakpoint 1 exists",
- patterns = ["1: file = '.*main.c', line = %d, locations = 1, resolved = 1" %
+ patterns = ["1: file = '.*main.c', line = %d, exact_match = 0, locations = 1, resolved = 1" %
self.line,
"hit count = 1"])
# Not breakpoint 2.
self.expect("breakpoint list -f", "No more breakpoint 2", matching=False,
- substrs = ["2: file = 'main.c', line = %d, locations = 1, resolved = 1" %
+ substrs = ["2: file = 'main.c', line = %d, exact_match = 0, locations = 1, resolved = 1" %
self.line])
# Run the program again, with breakpoint 1 remaining.
OpenPOWER on IntegriCloud