Refactorings of watchpoint creation APIs so that SBTarget::WatchAddress(), SBValue::Watch(), and SBValue::WatchPointee() now take an additional 'SBError &error' parameter (at the end) to contain the reason if there is some failure in the operation. Update 'watchpoint set variable/expression' commands to take advantage of that. Update existing test cases to reflect the API change and add test cases to verify that the SBError mechanism works for SBTarget::WatchAddress() by passing an invalid watch_size. llvm-svn: 157964
22 lines
502 B
Python
22 lines
502 B
Python
"""
|
|
Fuzz tests an object after the default construction to make sure it does not crash lldb.
|
|
"""
|
|
|
|
import sys
|
|
import lldb
|
|
|
|
def fuzz_obj(obj):
|
|
obj.GetID()
|
|
obj.IsValid()
|
|
obj.GetHardwareIndex()
|
|
obj.GetWatchAddress()
|
|
obj.GetWatchSize()
|
|
obj.SetEnabled(True)
|
|
obj.IsEnabled()
|
|
obj.GetHitCount()
|
|
obj.GetIgnoreCount()
|
|
obj.SetIgnoreCount(5)
|
|
obj.GetDescription(lldb.SBStream(), lldb.eDescriptionLevelVerbose)
|
|
obj.SetCondition("shouldWeStop()")
|
|
obj.GetCondition()
|