summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2011-05-10 09:07:53 +0000
committerTristan Gingold <gingold@adacore.com>2011-05-10 09:07:53 +0000
commit119e7b901f82a5a3aa87c4949475e7fafc3e036b (patch)
tree09ffbea27b5c6dbae6ac81a027b6e11879accba0
parenta29689aa7601b12f2a07df452785eb300c2066f4 (diff)
downloadbinutils-redhat-119e7b901f82a5a3aa87c4949475e7fafc3e036b.tar.gz
2011-05-10 Tristan Gingold <gingold@adacore.com>
* dwarf.c (process_extended_line_op): Dump unknown records.
-rw-r--r--binutils/ChangeLog4
-rw-r--r--binutils/dwarf.c24
2 files changed, 20 insertions, 8 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index bd591b0586..e49ec3839a 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -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
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index b240af69c7..5102aec27e 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -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;
}