]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
When printing code and an insane instruction is encountered, ugly-print (giving
authorNicholas Nethercote <n.nethercote@gmail.com>
Sun, 18 Apr 2004 15:20:43 +0000 (15:20 +0000)
committerNicholas Nethercote <n.nethercote@gmail.com>
Sun, 18 Apr 2004 15:20:43 +0000 (15:20 +0000)
full details) it as well as pretty-printing it.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2375

coregrind/vg_to_ucode.c

index 8a94a0b412786186f6bb975c16187b436b2f64bd..2d20b66871c63d065c69fa6b990d672988435412 100644 (file)
@@ -7299,10 +7299,10 @@ static Addr disInstr ( UCodeBlock* cb, Addr eip, Bool* isEnd )
    DIP("\n");
    for (; first_uinstr < cb->used; first_uinstr++) {
       Bool sane = VG_(saneUInstr)(True, True, &cb->instrs[first_uinstr]);
-      if (VG_(print_codegen)) 
+      if (!sane)
+         VG_(up_UInstr)(first_uinstr, &cb->instrs[first_uinstr]);
+      else if (VG_(print_codegen)) 
          VG_(pp_UInstr)(first_uinstr, &cb->instrs[first_uinstr]);
-      else if (!sane)
-         VG_(up_UInstr)(-1, &cb->instrs[first_uinstr]);
       vg_assert(sane);
    }
    return eip;