* objdump.c (disassemble_bytes): If the disassembler returns an
authorIan Lance Taylor <ian@airs.com>
Sun, 13 Jun 1999 19:02:25 +0000 (19:02 +0000)
committerIan Lance Taylor <ian@airs.com>
Sun, 13 Jun 1999 19:02:25 +0000 (19:02 +0000)
error, print out anything it may have printed to the buffer.  From
H.J. Lu <hjl@gnu.org>.

binutils/ChangeLog
binutils/objdump.c

index 8e7ba4a618a86f79973d0a1bbab5669905ad65ad..42aafaaf3b11e05f16ea680001f256a55a475092 100644 (file)
@@ -1,5 +1,9 @@
 1999-06-13  Ian Lance Taylor  <ian@zembu.com>
 
+       * objdump.c (disassemble_bytes): If the disassembler returns an
+       error, print out anything it may have printed to the buffer.  From
+       H.J. Lu <hjl@gnu.org>.
+
        * defparse.y (explist): Remove separate expline to eliminate
        shift/reduce conflict.
 
index 5baf235ebb88fbf9f84c2e5bbb7c8355493d8bf4..40c68cc3b3303be1888ee8f59fdd67c145e46d59 100644 (file)
@@ -1305,7 +1305,12 @@ disassemble_bytes (info, disassemble_fn, insns, data, start, stop, relppp,
              if (info->bytes_per_line != 0)
                bytes_per_line = info->bytes_per_line;
              if (bytes < 0)
-               break;
+               {
+                 if (sfile.current != sfile.buffer)
+                   printf ("%s\n", sfile.buffer);
+                 free (sfile.buffer);
+                 break;
+               }
            }
          else
            {