"""
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.GetFrameID()
    obj.GetPC()
    obj.SetPC(0xffffffff)
    obj.GetSP()
    obj.GetFP()
    obj.GetPCAddress()
    obj.GetSymbolContext(0)
    obj.GetModule()
    obj.GetCompileUnit()
    obj.GetFunction()
    obj.GetSymbol()
    obj.GetBlock()
    obj.GetFunctionName()
    obj.IsInlined()
    obj.EvaluateExpression("x + y")
    obj.EvaluateExpression("x + y", lldb.eDynamicCanRunTarget)
    obj.GetFrameBlock()
    obj.GetLineEntry()
    obj.GetThread()
    obj.Disassemble()
    obj.GetVariables(True, True, True, True)
    obj.GetVariables(True, True, True, False, lldb.eDynamicCanRunTarget)
    obj.GetRegisters()
    obj.FindVariable("my_var")
    obj.FindVariable("my_var", lldb.eDynamicCanRunTarget)
    obj.GetDescription(lldb.SBStream())
    obj.Clear()

"""
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.GetFrameID()
    obj.GetPC()
    obj.SetPC(0xffffffff)
    obj.GetSP()
    obj.GetFP()
    obj.GetPCAddress()
    obj.GetSymbolContext(0)
    obj.GetModule()
    obj.GetCompileUnit()
    obj.GetFunction()
    obj.GetSymbol()
    obj.GetBlock()
    obj.GetFunctionName()
    obj.IsInlined()
    obj.EvaluateExpression("x + y")
    obj.EvaluateExpression("x + y", lldb.eDynamicCanRunTarget)
    obj.GetFrameBlock()
    obj.GetLineEntry()
    obj.GetThread()
    obj.Disassemble()
    obj.GetVariables(True, True, True, True)
    obj.GetVariables(True, True, True, False, lldb.eDynamicCanRunTarget)
    obj.GetRegisters()
    obj.FindVariable("my_var")
    obj.FindVariable("my_var", lldb.eDynamicCanRunTarget)
    obj.FindValue("your_var", lldb.eValueTypeVariableGlobal)
    obj.FindValue("your_var", lldb.eValueTypeVariableStatic, lldb.eDynamicCanRunTarget)
    obj.WatchValue("global_var", lldb.eValueTypeVariableGlobal, lldb.LLDB_WATCH_TYPE_READ)
    obj.GetDescription(lldb.SBStream())
    obj.Clear()

Add FindValue() and WatchValue() fuzz calls to the mix.
Add FindValue() and WatchValue() fuzz calls to the mix.


git-svn-id: b33bab8abb5b18c12ee100cd7761ab452d00b2b0@140439 91177308-0d34-0410-b5e6-96231b3b80d8
