mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-28 13:36:27 +08:00
docs(gdb): update info style usage for new CLI interface
This commit is contained in:
@@ -39,7 +39,7 @@ Example of usage:
|
|||||||
The plugin provides the following commands.
|
The plugin provides the following commands.
|
||||||
|
|
||||||
- ``dump obj``: Dump the object tree.
|
- ``dump obj``: Dump the object tree.
|
||||||
- ``info style``: Show the object's style.
|
- ``info style``: Inspect style properties of an ``lv_style_t`` or an ``lv_obj_t``.
|
||||||
- ``info draw_unit``: Display all current drawing unit information.
|
- ``info draw_unit``: Display all current drawing unit information.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
@@ -61,28 +61,34 @@ Dump Obj Tree
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Show Obj's Style
|
Inspect Style
|
||||||
****************
|
*************
|
||||||
|
|
||||||
This command can dump the object's local style, since style value is a union, it's
|
``info style <style_var>``: Inspect a single ``lv_style_t`` variable. Properties are
|
||||||
displayed in all possible formats.
|
displayed with resolved names and formatted values (colors shown as hex).
|
||||||
|
|
||||||
``info style address_of_obj``: Show the object's style.
|
|
||||||
|
|
||||||
|
``info style --obj <obj_var>``: Inspect all styles of an ``lv_obj_t``, grouped by
|
||||||
|
style slot with selector and flags.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
.. code:: bash
|
.. code:: bash
|
||||||
|
|
||||||
(gdb) info style 0x60700000dd10
|
(gdb) info style my_style
|
||||||
32 = {num = 90, ptr = 0x5a, color = {blue = 90 'Z', green = 0 '\000', red = 0 '\000'}}
|
+-----------+---------+
|
||||||
158 = {num = 32767, ptr = 0x7fff, color = {blue = 255 '\377', green = 127 '\177', red = 0 '\000'}}
|
| prop | value |
|
||||||
(gdb) p lv_global->disp_default->act_scr
|
+-----------+---------+
|
||||||
$4 = (lv_obj_t *) 0x60700000dd10
|
| BG_COLOR | #ff0000 |
|
||||||
(gdb) info style $4
|
| BG_OPA | 255 |
|
||||||
32 = {num = 90, ptr = 0x5a, color = {blue = 90 'Z', green = 0 '\000', red = 0 '\000'}}
|
+-----------+---------+
|
||||||
158 = {num = 32767, ptr = 0x7fff, color = {blue = 255 '\377', green = 127 '\177', red = 0 '\000'}}
|
|
||||||
(gdb)
|
(gdb) info style --obj lv_global->disp_default->act_scr
|
||||||
|
[0] MAIN|DEFAULT local
|
||||||
|
+-----------+---------+
|
||||||
|
| prop | value |
|
||||||
|
+-----------+---------+
|
||||||
|
| BG_COLOR | #ff0000 |
|
||||||
|
+-----------+---------+
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,12 @@ py import lvglgdb
|
|||||||
dump obj
|
dump obj
|
||||||
dump cache image
|
dump cache image
|
||||||
dump cache image_header
|
dump cache image_header
|
||||||
|
|
||||||
|
# Inspect a single lv_style_t variable
|
||||||
|
info style my_style
|
||||||
|
|
||||||
|
# Inspect all styles of an lv_obj_t
|
||||||
|
info style --obj my_obj
|
||||||
```
|
```
|
||||||
|
|
||||||
# Structure
|
# Structure
|
||||||
|
|||||||
Reference in New Issue
Block a user