mirror of https://github.com/Desuuuu/klipper.git
checkstack: Be more flexible in finding the timer irq function
If __vector_13 doesn't exist then try __vector_17. If neither exists then handle that gracefully. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
565861f680
commit
74e15b2eb5
|
@ -193,7 +193,7 @@ def main():
|
|||
funcsbyname[funcnameroot] = info
|
||||
mainfunc = funcsbyname.get('sched_main')
|
||||
cmdfunc = funcsbyname.get('command_task')
|
||||
eventfunc = funcsbyname.get('__vector_13')
|
||||
eventfunc = funcsbyname.get('__vector_13', funcsbyname.get('__vector_17'))
|
||||
for funcnameroot, info in funcsbyname.items():
|
||||
if (funcnameroot.startswith('_DECL_taskfuncs_')
|
||||
or funcnameroot.startswith('_DECL_initfuncs_')
|
||||
|
@ -207,7 +207,7 @@ def main():
|
|||
numparams = int(datalines[info.funcaddr][2], 16)
|
||||
stackusage = cmdfunc.basic_stack_usage + 2 + numparams * 4
|
||||
cmdfunc.noteCall(0, f.funcaddr, stackusage)
|
||||
if funcnameroot.endswith('_event'):
|
||||
if funcnameroot.endswith('_event') and eventfunc is not None:
|
||||
eventfunc.noteCall(0, info.funcaddr, eventfunc.basic_stack_usage + 2)
|
||||
|
||||
# Calculate maxstackusage
|
||||
|
|
Loading…
Reference in New Issue