revision 1190:2e66e9053037
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 1190:2e66e9053037 |
parent | 1189:1540105786c8 |
child | 1191:12fdf3aafcd4 |
author | nkeynes |
date | Fri Dec 02 18:14:27 2011 +1000 (12 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)
(as can happen if we try to print a translated block that's been unmapped)
1.1 --- a/src/sh4/sh4dasm.in Thu Dec 01 08:02:13 2011 +10001.2 +++ b/src/sh4/sh4dasm.in Fri Dec 02 18:14:27 2011 +10001.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.16 #define UNDEF(ir) snprintf( buf, len, "???? " );
.