From 7e665af3af6fdf33dfcbecaa95ccdaa34b285008 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 10 May 2011 09:08:37 +0000 Subject: [PATCH] 2011-05-10 Tristan Gingold * dwarf.c (process_extended_line_op): Dump unknown records. --- binutils/ChangeLog | 4 ++++ binutils/dwarf.c | 24 ++++++++++++++++-------- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index bd591b0586c..e49ec3839a9 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2011-05-10 Tristan Gingold + + * dwarf.c (process_extended_line_op): Dump unknown records. + 2011-05-07 Alan Modra PR binutils/12632 diff --git a/binutils/dwarf.c b/binutils/dwarf.c index b240af69c7e..5102aec27e8 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; } -- 2.30.2