mirror of
https://git.rtems.org/rtems-tools/
synced 2025-10-18 13:43:56 +08:00
Fix wdticks command
- Type is Chain_Control - chain.node.next -> null
This commit is contained in:

committed by
Chris Johns

parent
a4d0739522
commit
1fcff75505
@@ -14,6 +14,7 @@ class infotables:
|
|||||||
|
|
||||||
tables_types = {
|
tables_types = {
|
||||||
'internal/time' : ('TOD_Control', '_TOD'),
|
'internal/time' : ('TOD_Control', '_TOD'),
|
||||||
|
'internal/wdticks' : ('Chain_Control', '_Watchdog_Ticks_chain'),
|
||||||
|
|
||||||
'classic/tasks' : ('Thread_Control', '_RTEMS_tasks_Information'),
|
'classic/tasks' : ('Thread_Control', '_RTEMS_tasks_Information'),
|
||||||
'classic/timers' : ('Timer_Control', '_Timer_Information'),
|
'classic/timers' : ('Timer_Control', '_Timer_Information'),
|
||||||
|
@@ -11,6 +11,7 @@ import re
|
|||||||
import objects
|
import objects
|
||||||
import threads
|
import threads
|
||||||
import chains
|
import chains
|
||||||
|
import watchdog
|
||||||
import supercore
|
import supercore
|
||||||
import classic
|
import classic
|
||||||
|
|
||||||
@@ -227,10 +228,14 @@ class rtems_watchdog_chain(gdb.Command):
|
|||||||
return
|
return
|
||||||
|
|
||||||
nd = inst.first()
|
nd = inst.first()
|
||||||
|
i = 0
|
||||||
|
print ' Ticks Chain'
|
||||||
while not nd.null():
|
while not nd.null():
|
||||||
wd = watchdog.control(nd.cast('Watchdog_Control'))
|
wd = watchdog.control(nd.cast('Watchdog_Control'))
|
||||||
wd.show()
|
print ' #'+str(i)
|
||||||
nd = nd.next()
|
print wd.to_string()
|
||||||
|
nd.next()
|
||||||
|
i += 1
|
||||||
|
|
||||||
class rtems_wdt(rtems_watchdog_chain):
|
class rtems_wdt(rtems_watchdog_chain):
|
||||||
|
|
||||||
|
@@ -52,10 +52,15 @@ class control:
|
|||||||
addr = self.ctrl['routine']
|
addr = self.ctrl['routine']
|
||||||
return str(addr)
|
return str(addr)
|
||||||
|
|
||||||
|
def to_string(self):
|
||||||
|
val = ""
|
||||||
|
val += " State:" + str(self.state())
|
||||||
|
val += "\n Intial Interval:" + str(self.initial())
|
||||||
|
val += "\n Delta Interval:"+ str(self.delta_interval())
|
||||||
|
val += "\n Start time:" + str(self.start_time())
|
||||||
|
val += "\n Stop time:" + str(self.stop_time())
|
||||||
|
val += "\n WD Routine:" + str(self.routine())
|
||||||
|
return val
|
||||||
|
|
||||||
def show(self):
|
def show(self):
|
||||||
print " State:", self.state()
|
print self.to_string()
|
||||||
print " Intial Interval:", self.initial()
|
|
||||||
print " Delta Interval:", self.delta_interval()
|
|
||||||
print " Start time:", self.start_time()
|
|
||||||
print " Stop time:", self.stop_time()
|
|
||||||
print " WD Routine:", self.routine()
|
|
Reference in New Issue
Block a user