external/mambo: simplify implementation of di
We've got a great disassembly function built-in, reuse
that to implement di (as in xmon).
Improves (external/mambo: Add di command to decode instructions)
Acked-By: Michael Neuling
@@ -160,13 +160,7 @@ proc ex { ea { size 8 } } {
proc di { location { count 16 } } {
set addr [expr $location & 0xfffffffffffffff0]
- set top [expr $addr + ($count * 4)]
- for { set i $addr } { $i < $top } { incr i 4 } {
- set pc_laddr [mysim cpu 0 util itranslate $i]
- set inst [mysim cpu 0 memory display $pc_laddr 4]
- set disasm [mysim cpu 0 util ppc_disasm $inst $i]
- puts "$pc_laddr: Enc:$inst : $disasm"
- }
+ disasm_mem mysim $addr $count
}
proc hexdump { location count } {
