mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-28 22:30:49 +08:00
chore(gdb): add LVTimer wrapper with freq column and dump timers command
This commit is contained in:
@@ -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",
|
||||
]
|
||||
|
||||
@@ -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())
|
||||
Reference in New Issue
Block a user