[Skiboot] [PATCH] external/mambo: Add di command to decode instructions

Stewart Smith stewart at linux.vnet.ibm.com
Mon Apr 30 16:45:18 AEST 2018


Michael Neuling <mikey at neuling.org> writes:
>> > +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

Well, I merged this before I read the mail, so umm... boo to me?
Easy to patch around it I guess.
In master as of 1bcd6d84ec8061e3593bfca50e2a1f81006b16c0.

-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list