nuttx-mirror/tools/gdb
xuxingliang 84c66505aa tools/gdb: add function to convert C enum to python Enum class
Usage:
(gdb) py NX_INITSTATE = utils.enum("enum nx_initstate_e")
(gdb) py print(list(NX_INITSTATE))
[<NX_INITSTATE_E.POWERUP: 0>, <NX_INITSTATE_E.BOOT: 1>, <NX_INITSTATE_E.TASKLISTS: 2>, <NX_INITSTATE_E.MEMORY: 3>, <NX_INITSTATE_E.HARDWARE: 4>, <NX_INITSTATE_E.OSREADY: 5>, <NX_INITSTATE_E.IDLELOOP: 6>, <NX_INITSTATE_E.PANIC: 7>]
(gdb) py print(NX_INITSTATE.POWERUP)
NX_INITSTATE_E.POWERUP
(gdb) py print(NX_INITSTATE.POWERUP.value)
0
(gdb) py print(NX_INITSTATE(1))

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-11-24 03:03:40 +08:00
..
nuttxgdb tools/gdb: add function to convert C enum to python Enum class 2024-11-24 03:03:40 +08:00
.gitignore tools/gdb: add pyproject.toml to build as a package 2024-11-23 13:09:16 +08:00
gdbinit.py tools/gdb: add pyproject.toml to build as a package 2024-11-23 13:09:16 +08:00
pyproject.toml tools/gdb: add pyproject.toml to build as a package 2024-11-23 13:09:16 +08:00
requirements.txt memleak:use global symbol to search all global variables 2024-11-21 23:08:55 +08:00