mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-09 20:27:41 +08:00
2899149467
- Fix buttonmatrix map_p misparsed as 'const' (regex for const * const *) - Fix _get_spec_int returning 0 for missing fields (now returns None) - Fix struct parsing truncation on nested braces (brace-balanced matching) - Scan LVGL headers to distinguish enum/int-alias types from structs - Add safe_wrapper helper for known struct types (LVDrawBuf, LVList, LVAnim, LVArray) - Skip unknown struct types with TODO for Value.to_dict()
lvglgdb
GDB Python extension for inspecting and debugging LVGL internals. Works with live debugging sessions, core dumps, and other GDB-compatible targets.
Installation
pip install lvglgdb
Usage
In your GDB session:
py import lvglgdb
Dump Commands
dump obj # Dump widget tree
dump display -f png # Dump display framebuffer as PNG
dump cache image # Dump image cache entries
dump cache image_header # Dump image header cache entries
check cache image # Validate image cache integrity
dump anim # Dump active animations
dump timer # Dump registered timers
dump indev # Dump input devices
dump group # Dump focus groups
dump image_decoder # Dump registered image decoders
dump fs_drv # Dump filesystem drivers
dump draw_task <layer_expr> # Dump draw tasks for a layer
dump dashboard # Generate interactive HTML dashboard
dump dashboard -o out.html # Save dashboard to file
Info Commands
info style my_style # Inspect a single lv_style_t
info style --obj my_obj # Inspect all styles of an lv_obj_t
info draw_unit # Show draw unit information
info obj_class obj->class_p # Show object class hierarchy
info subject &my_subject # Show subject and its observers
Dashboard
dump dashboard generates a self-contained HTML file with an interactive 3D
layer view, widget tree, style inspector, cache stats, animation list, and
draw buffer previews (RGB565 / RGB888 / ARGB8888 / XRGB8888).
Structure
graph TD
lvgl["lvgl<br/>(mem → python objects)"]
cmds["cmds<br/>(GDB commands)"]
formatter["formatter<br/>(display logic)"]
dashboard["cmds/dashboard<br/>(HTML renderer)"]
cmds --> formatter
cmds --> lvgl
dashboard --> lvgl
formatter --> lvgl
classDef pkg fill:white,stroke:gray
class lvgl,cmds,formatter,dashboard pkg