[Lldb-commits] [lldb] r155071 - /lldb/branches/lldb-platform-work/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py

Johnny Chen johnny.chen at apple.com
Wed Apr 18 15:13:43 PDT 2012


Author: johnny
Date: Wed Apr 18 17:13:43 2012
New Revision: 155071

URL: http://llvm.org/viewvc/llvm-project?rev=155071&view=rev
Log:
Make the test more robust by checking that the thread we switched, which has the stop reason of lldb.eStopReasonWatchpoint, indeed has its bottom-most frame at function do_bad_thing_with_location().

Modified:
    lldb/branches/lldb-platform-work/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py

Modified: lldb/branches/lldb-platform-work/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py?rev=155071&r1=155070&r2=155071&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py (original)
+++ lldb/branches/lldb-platform-work/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py Wed Apr 18 17:13:43 2012
@@ -90,15 +90,13 @@
         # only once.  The stop reason of the thread should be watchpoint.
         self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
             substrs = ['stopped',
-                       'stop reason = watchpoint %d' % expected_wp_id,
-                       self.violating_func])
+                       'stop reason = watchpoint %d' % expected_wp_id])
 
         # Switch to the thread stopped due to watchpoint and issue some commands.
         self.switch_to_thread_with_stop_reason(lldb.eStopReasonWatchpoint)
         self.runCmd("thread backtrace")
-        self.runCmd("expr unsigned val = *g_char_ptr; val")
-        self.expect(self.res.GetOutput().splitlines()[0], exe=False,
-            endstr = ' = 1')
+        self.expect("frame info",
+            substrs = [self.violating_func])
 
         # Use the '-v' option to do verbose listing of the watchpoint.
         # The hit count should now be 1.





More information about the lldb-commits mailing list