diff options
author | Eugene Zemtsov <ezemtsov@google.com> | 2018-04-16 22:26:21 +0000 |
---|---|---|
committer | Eugene Zemtsov <ezemtsov@google.com> | 2018-04-16 22:26:21 +0000 |
commit | 9b294d1e905ab49c941333c81840afac9f6fe238 (patch) | |
tree | 2dbb3908040df7dd63464851684f309f2eb95206 /lldb/packages/Python/lldbsuite/test | |
parent | 17a47b915ab28f158dad485625c34db2bcc23821 (diff) | |
download | bcm5719-llvm-9b294d1e905ab49c941333c81840afac9f6fe238.tar.gz bcm5719-llvm-9b294d1e905ab49c941333c81840afac9f6fe238.zip |
Make sure deleting all breakpoints clears their sites first
Bug: https://bugs.llvm.org/show_bug.cgi?id=36430
Differential Revision: https://reviews.llvm.org/D45554
llvm-svn: 330163
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
2 files changed, 23 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py index 8b56e6f9d27..7a2dc61b1b6 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py @@ -45,6 +45,25 @@ class BreakpointCommandTestCase(TestBase): self.addTearDownHook( lambda: self.runCmd("settings clear auto-confirm")) + @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24528") + def test_delete_all_breakpoints(self): + """Test that deleting all breakpoints works.""" + self.build() + exe = self.getBuildArtifact("a.out") + self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) + + lldbutil.run_break_set_by_symbol(self, "main") + lldbutil.run_break_set_by_file_and_line( + self, "main.c", self.line, num_expected_locations=1, loc_exact=True) + + self.runCmd("run", RUN_SUCCEEDED) + + self.runCmd("breakpoint delete") + self.runCmd("process continue") + self.expect("process status", PROCESS_STOPPED, + patterns=['Process .* exited with status = 0']) + + def breakpoint_command_sequence(self): """Test a sequence of breakpoint command add, list, and delete.""" exe = self.getBuildArtifact("a.out") diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/main.c b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/main.c index 62ec97f4328..702644b692d 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/main.c +++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/main.c @@ -9,5 +9,9 @@ int main (int argc, char const *argv[]) { + // Add a body to the function, so we can set more than one + // breakpoint in it. + static volatile int var = 0; + var++; return 0; // Set break point at this line. } |