Search
lxdream.org :: lxdream :: r1190:2e66e9053037
lxdream 0.9.1
released Jun 29
Download Now
changeset1190:2e66e9053037
parent1189:1540105786c8
child1191:12fdf3aafcd4
authornkeynes
dateFri Dec 02 18:14:27 2011 +1000 (8 years ago)
Handle calls to sh4_disasm_instruction when the memory isn't mapped
(as can happen if we try to print a translated block that's been unmapped)
src/sh4/sh4dasm.in
1.1 --- a/src/sh4/sh4dasm.in Thu Dec 01 08:02:13 2011 +1000
1.2 +++ b/src/sh4/sh4dasm.in Fri Dec 02 18:14:27 2011 +1000
1.3 @@ -27,6 +27,13 @@
1.4 {
1.5 sh4addr_t addr = mmu_vma_to_phys_disasm(pc);
1.6 uint32_t tmp;
1.7 +
1.8 + if( addr == MMU_VMA_ERROR ) {
1.9 + sprintf( opcode, "?? ??" );
1.10 + snprintf( buf, len, "???" );
1.11 + return pc+2;
1.12 + }
1.13 +
1.14 uint16_t ir = ext_address_space[addr>>12]->read_word(addr);
1.15
1.16 #define UNDEF(ir) snprintf( buf, len, "???? " );
.