diff options
Diffstat (limited to 'external/mambo')
-rw-r--r-- | external/mambo/mambo_utils.tcl | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/external/mambo/mambo_utils.tcl b/external/mambo/mambo_utils.tcl index f8f64eb..74417ea 100644 --- a/external/mambo/mambo_utils.tcl +++ b/external/mambo/mambo_utils.tcl @@ -169,6 +169,32 @@ proc s { {nr 1} } { } } +proc ftrace { {nr 1} } { + upvar #0 target_t t + upvar #0 target_c c + upvar #0 target_p p + + set pc [mysim cpu $p:$c:$t display spr pc] + set sym [lindex [split [addr2func $pc] {+}] 0] + set prev_pc $pc + + puts [ipc] + puts "$sym" + + for { set i 0 } { $i < $nr } { incr i 1 } { + set pc [mysim cpu $p:$c:$t display spr pc] + set sym2 [lindex [split [addr2func $pc] {+}] 0] + + if { $sym2 != $sym } { + puts "$sym2 \t\t(from [addr2func $prev_pc])" + set sym $sym2 + } + set prev_pc $pc + + mysim step 1 + } +} + proc S { {nr 1} } { upvar #0 target_t t upvar #0 target_c c |