[Lldb-commits] [PATCH] D144937: [LLDB] Expose several methods in SBWatchpoint
Med Ismail Bennani via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Feb 28 10:04:17 PST 2023
mib added inline comments.
================
Comment at: lldb/test/API/python_api/watchpoint/TestSetWatchpoint.py:66
+ if variable_watchpoint:
+ # FIXME: There should probably be an API to create a variable watchpoint
+ self.runCmd('watchpoint set variable -w read_write -- global')
----------------
+1, please file an enhancement request :)
================
Comment at: lldb/test/API/python_api/watchpoint/TestSetWatchpoint.py:68
+ self.runCmd('watchpoint set variable -w read_write -- global')
+ watchpoint = target.GetWatchpointAtIndex(0)
+ self.assertTrue(watchpoint.IsWatchVariable())
----------------
`runCmd` doesn't check if the command succeeded, so you probably want to add an asset to check the number of watchpoint on the target is not zero.
================
Comment at: lldb/test/API/python_api/watchpoint/TestSetWatchpoint.py:83
+ self.assertFalse(watchpoint.IsWatchVariable())
+ self.assertEqual(watchpoint.GetWatchSpec(), '')
+
----------------
unrelated to this patch, there is seems we don't initialize the watch spec for expression watchpoint, we should probably file a bug report for that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144937/new/
https://reviews.llvm.org/D144937
More information about the lldb-commits
mailing list