[Lldb-commits] [PATCH] Report breakpoint/watchpoint hits during single stepping.

Jim Ingham jingham at apple.com
Wed Mar 18 10:37:33 PDT 2015


================
Comment at: test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py:37-38
@@ +36,4 @@
+        self.runCmd("target create " + exe, CURRENT_EXECUTABLE_SET)
+        self.runCmd("breakpoint set --name main", BREAKPOINT_CREATED)
+
+        self.runCmd("process launch", RUN_SUCCEEDED)
----------------
Please don't use self.runCmd("breakpoint set --name main") bare like this in test cases.  This makes a breakpoint but never checks that the breakpoint gets set.  If something goes wrong with that you'll get some confusing error message later on which won't tell you what really happened.

lldbutil has  a bunch of utility functions for setting breakpoints that set the breakpoint, and then check that it actually was set - so you can easily set breakpoints without having to do all the checking by hand.  run_break_set_by_symbol is the one you want in this case.

http://reviews.llvm.org/D8404

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list