Skip to contentSkip to conversation

[6619] Allow disassembling last addresses of the address space

Qemu-devel Blue Swirl 1 participant 1 message Feb 13, 2009

lore
Share & tools
lore

Blue Swirl

author
#0 lore raw

Revision: 6619

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6619
Author:   blueswir1
Date:     2009-02-13 21:44:41 +0000 (Fri, 13 Feb 2009)

Log Message:
-----------
Allow disassembling last addresses of the address space

Modified Paths:
--------------
trunk/disas.c

Modified: trunk/disas.c
===================================================================

disas.c +2 -2
@@ -204,7 +204,7 @@
     return;
 #endif
 
-    for (pc = code; pc < code + size; pc += count) {
+    for (pc = code; size > 0; pc += count, size -= count) {
 	fprintf(out, "0x" TARGET_FMT_lx ":  ", pc);
 	count = print_insn(pc, &disasm_info);
 #if 0
@@ -276,7 +276,7 @@
 	    (long) code);
     return;
 #endif
-    for (pc = (unsigned long)code; pc < (unsigned long)code + size; pc += count) {
+    for (pc = (unsigned long)code; size > 0; pc += count, size -= count) {
 	fprintf(out, "0x%08lx:  ", pc);
 #ifdef __arm__
         /* since data is included in the code, it is better to