[Skiboot] [PATCH] external/mambo: Add di command to decode instructions
Michael Neuling
mikey at neuling.org
Tue Apr 24 22:36:36 AEST 2018
> > +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"
> > + }
> > +}
> > +
>
> Doesn't disasm_mem mysim $location $count achieve the same thing?
Oh nice.. I didn't know that, thanks.
I might make di wrapper around that instead
Mikey
More information about the Skiboot
mailing list