summaryrefslogtreecommitdiffstats
path: root/external
diff options
context:
space:
mode:
authorBalbir singh <bsingharora@gmail.com>2018-05-02 20:51:39 +1000
committerStewart Smith <stewart@linux.ibm.com>2018-05-02 20:01:34 -0500
commitac59ecec5ca80bb4f2a8b98c3a256fccb93198d3 (patch)
tree516f560db77db925bee82fd7400b2b51d3c0f13d /external
parent973391504789efcab8e01c2b974f5ceb7f564bee (diff)
downloadblackbird-skiboot-ac59ecec5ca80bb4f2a8b98c3a256fccb93198d3.tar.gz
blackbird-skiboot-ac59ecec5ca80bb4f2a8b98c3a256fccb93198d3.zip
external/mambo: simplify implementation of di
We've got a great disassembly function built-in, reuse that to implement di (as in xmon). Improves 1bcd6d84: (external/mambo: Add di command to decode instructions) Signed-off-by: Balbir singh <bsingharora@gmail.com> Acked-By: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'external')
-rw-r--r--external/mambo/mambo_utils.tcl12
1 files changed, 3 insertions, 9 deletions
diff --git a/external/mambo/mambo_utils.tcl b/external/mambo/mambo_utils.tcl
index b503acbf..ce5bcccb 100644
--- a/external/mambo/mambo_utils.tcl
+++ b/external/mambo/mambo_utils.tcl
@@ -158,15 +158,9 @@ proc ex { ea { size 8 } } {
puts "$pa : $val"
}
-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"
- }
+proc di { location { count 16 } } {
+ set addr [expr $location & 0xfffffffffffffff0]
+ disasm_mem mysim $addr $count
}
proc hexdump { location count } {
OpenPOWER on IntegriCloud