fix(gdb): fix style prop getting (#7088)

Co-authored-by: Parallels <parallels@kali-linux-2022-2.localdomain>
This commit is contained in:
Benign X
2024-10-17 17:15:47 +08:00
committed by GitHub
parent b20035d68d
commit 18008fd84d

View File

@@ -138,7 +138,7 @@ class LVObject(gdb.Value):
gdb.lookup_type("lv_style_const_prop_t").pointer() gdb.lookup_type("lv_style_const_prop_t").pointer()
) )
for j in range(prop_cnt): for j in range(prop_cnt):
prop = values_and_props[j]["prop_ptr"] prop = values_and_props[j]["prop"]
if prop == LV_STYLE_PROP_INV or prop == LV_STYLE_PROP_ANY: if prop == LV_STYLE_PROP_INV or prop == LV_STYLE_PROP_ANY:
continue continue
yield values_and_props[j] yield values_and_props[j]
@@ -210,7 +210,7 @@ def dump_obj_info(obj: LVObject):
# Dump lv_style_const_prop_t # Dump lv_style_const_prop_t
def dump_style_info(style: gdb.Value): def dump_style_info(style: gdb.Value):
prop = int(style["prop_ptr"]) prop = int(style["prop"])
value = style["value"] value = style["value"]
print(f"{prop} = {value}") print(f"{prop} = {value}")