1446ccaa81e42b089b6245a950cb4fca05cce12ddJohnny Chen"""
2446ccaa81e42b089b6245a950cb4fca05cce12ddJohnny ChenFuzz tests an object after the default construction to make sure it does not crash lldb.
3446ccaa81e42b089b6245a950cb4fca05cce12ddJohnny Chen"""
4446ccaa81e42b089b6245a950cb4fca05cce12ddJohnny Chen
5446ccaa81e42b089b6245a950cb4fca05cce12ddJohnny Chenimport sys
6446ccaa81e42b089b6245a950cb4fca05cce12ddJohnny Chenimport lldb
7446ccaa81e42b089b6245a950cb4fca05cce12ddJohnny Chen
8446ccaa81e42b089b6245a950cb4fca05cce12ddJohnny Chendef fuzz_obj(obj):
9446ccaa81e42b089b6245a950cb4fca05cce12ddJohnny Chen    obj.GetName()
10446ccaa81e42b089b6245a950cb4fca05cce12ddJohnny Chen    obj.GetByteSize()
11446ccaa81e42b089b6245a950cb4fca05cce12ddJohnny Chen    #obj.GetEncoding(5)
12446ccaa81e42b089b6245a950cb4fca05cce12ddJohnny Chen    obj.GetNumberChildren(True)
13446ccaa81e42b089b6245a950cb4fca05cce12ddJohnny Chen    member = lldb.SBTypeMember()
14446ccaa81e42b089b6245a950cb4fca05cce12ddJohnny Chen    obj.GetChildAtIndex(True, 0, member)
15446ccaa81e42b089b6245a950cb4fca05cce12ddJohnny Chen    obj.GetChildIndexForName(True, "_member_field")
16446ccaa81e42b089b6245a950cb4fca05cce12ddJohnny Chen    obj.IsAPointerType()
17446ccaa81e42b089b6245a950cb4fca05cce12ddJohnny Chen    obj.GetPointeeType()
18446ccaa81e42b089b6245a950cb4fca05cce12ddJohnny Chen    obj.GetDescription(lldb.SBStream())
1988f699690a48bc9e204c561443a53ca03dcf1ae6Johnny Chen    obj.IsPointerType(None)
2088f699690a48bc9e204c561443a53ca03dcf1ae6Johnny Chen    lldb.SBType.IsPointerType(None)
21a70c157b98bc6e9c8d1853e54473c3bd5a349a77Johnny Chen    for child_type in obj:
22a70c157b98bc6e9c8d1853e54473c3bd5a349a77Johnny Chen        print child_type
23