Commit e612a1f7256bb3546cf3e9ae6cad3997c4153663

Authored by Blue Swirl
1 parent 0087375e

Fix disassembler memory accesses

Sparc disassembler wants to check previous addresses for some stuff
and this may actually cause faults to be generated to the guest if the
address is close to page start, because of the function used for the
memory access.

Fix by changing ldub_code to cpu_memory_rw_debug, which doesn't trigger
exceptions.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Showing 1 changed file with 1 additions and 4 deletions
... ... @@ -33,10 +33,7 @@ target_read_memory (bfd_vma memaddr,
33 33 int length,
34 34 struct disassemble_info *info)
35 35 {
36   - int i;
37   - for(i = 0; i < length; i++) {
38   - myaddr[i] = ldub_code(memaddr + i);
39   - }
  36 + cpu_memory_rw_debug(cpu_single_env, memaddr, myaddr, length, 0);
40 37 return 0;
41 38 }
42 39  
... ...