2011-05-10 Tristan Gingold <gingold@adacore.com>
authorTristan Gingold <gingold@adacore.com>
Tue, 10 May 2011 09:08:37 +0000 (09:08 +0000)
committerTristan Gingold <gingold@adacore.com>
Tue, 10 May 2011 09:08:37 +0000 (09:08 +0000)
* dwarf.c (process_extended_line_op): Dump unknown records.

binutils/ChangeLog
binutils/dwarf.c

index bd591b0586ceb5978853753f2e934e28e5617197..e49ec3839a982064d3d8d2d20e09db33a65f55d8 100644 (file)
@@ -1,3 +1,7 @@
+2011-05-10  Tristan Gingold  <gingold@adacore.com>
+
+       * dwarf.c (process_extended_line_op): Dump unknown records.
+
 2011-05-07  Alan Modra  <amodra@gmail.com>
 
        PR binutils/12632
index b240af69c7ef28210c1eec49efd3c7a67e963ff8..5102aec27e83fc61e79c67445010669b9d4b8289 100644 (file)
@@ -376,14 +376,22 @@ process_extended_line_op (unsigned char *data, int is_stmt)
       break;
 
     default:
-      if (op_code >= DW_LNE_lo_user
-         /* The test against DW_LNW_hi_user is redundant due to
-            the limited range of the unsigned char data type used
-            for op_code.  */
-         /*&& op_code <= DW_LNE_hi_user*/)
-       printf (_("user defined: length %d\n"), len - bytes_read);
-      else
-       printf (_("UNKNOWN: length %d\n"), len - bytes_read);
+      {
+        unsigned int rlen = len - bytes_read - 1;
+
+        if (op_code >= DW_LNE_lo_user
+            /* The test against DW_LNW_hi_user is redundant due to
+               the limited range of the unsigned char data type used
+               for op_code.  */
+            /*&& op_code <= DW_LNE_hi_user*/)
+          printf (_("user defined: "));
+        else
+          printf (_("UNKNOWN: "));
+        printf (_("length %d ["), rlen);
+        for (; rlen; rlen--)
+          printf (" %02x", *data++);
+        printf ("]\n");
+      }
       break;
     }