Commit 7e000c2e3d0ace8912e677c698ee7eb17919832a

Authored by blueswir1
1 parent 17605071

Allow disassembling last addresses of the address space

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6619 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 2 additions and 2 deletions
... ... @@ -204,7 +204,7 @@ void target_disas(FILE *out, target_ulong code, target_ulong size, int flags)
204 204 return;
205 205 #endif
206 206  
207   - for (pc = code; pc < code + size; pc += count) {
  207 + for (pc = code; size > 0; pc += count, size -= count) {
208 208 fprintf(out, "0x" TARGET_FMT_lx ": ", pc);
209 209 count = print_insn(pc, &disasm_info);
210 210 #if 0
... ... @@ -276,7 +276,7 @@ void disas(FILE *out, void *code, unsigned long size)
276 276 (long) code);
277 277 return;
278 278 #endif
279   - for (pc = (unsigned long)code; pc < (unsigned long)code + size; pc += count) {
  279 + for (pc = (unsigned long)code; size > 0; pc += count, size -= count) {
280 280 fprintf(out, "0x%08lx: ", pc);
281 281 #ifdef __arm__
282 282 /* since data is included in the code, it is better to
... ...