chore(gdb): add LVTimer wrapper with freq column and dump timers command

This commit is contained in:
Benign X
2026-03-06 00:22:01 +08:00
committed by VIFEX
parent 372b39a422
commit 9c77d49793
8 changed files with 100 additions and 0 deletions
+2
View File
@@ -9,6 +9,7 @@ from .misc import (
CheckPrefix,
CheckCache,
DumpAnim,
DumpTimer,
)
from .debugger import Debugger
from .drivers import Lvglobal
@@ -32,6 +33,7 @@ DumpCache()
CheckPrefix()
CheckCache()
DumpAnim()
DumpTimer()
DumpDrawTask()
# Infos
@@ -1,6 +1,7 @@
from .lv_style import InfoStyle
from .lv_cache import DumpCache, CheckPrefix, CheckCache
from .lv_anim import DumpAnim
from .lv_timer import DumpTimer
__all__ = [
"InfoStyle",
@@ -8,4 +9,5 @@ __all__ = [
"CheckPrefix",
"CheckCache",
"DumpAnim",
"DumpTimer",
]
+16
View File
@@ -0,0 +1,16 @@
import gdb
from lvglgdb.lvgl import curr_inst
from lvglgdb.lvgl.misc.lv_timer import LVTimer
class DumpTimer(gdb.Command):
"""dump all active timers"""
def __init__(self):
super(DumpTimer, self).__init__(
"dump timers", gdb.COMMAND_USER, gdb.COMPLETE_EXPRESSION
)
def invoke(self, args, from_tty):
LVTimer.print_entries(curr_inst().timers())