This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Add discriminator support to readelf/objdump


Here's the readelf/objdump patch. I'll do this one first and I moved
include/elf/dwarf2.h into this patch so that I can include a new test
with the gas patch.

-cary


include/elf/

	 * dwarf2.h (DW_LNE_set_discriminator): New enum value.

binutils/

	* dwarf.c (process_extended_line_op): Add DW_LNE_set_discriminator.
	Add missing newlines to HP extensions.


Index: include/elf/dwarf2.h
===================================================================
RCS file: /cvs/src/src/include/elf/dwarf2.h,v
retrieving revision 1.24
diff -u -p -r1.24 dwarf2.h
--- include/elf/dwarf2.h	24 Sep 2008 23:21:04 -0000	1.24
+++ include/elf/dwarf2.h	21 Apr 2009 18:20:52 -0000
@@ -709,6 +709,7 @@ enum dwarf_line_number_x_ops
     DW_LNE_end_sequence = 1,
     DW_LNE_set_address = 2,
     DW_LNE_define_file = 3,
+    DW_LNE_set_discriminator = 4,
     /* HP extensions.  */
     DW_LNE_HP_negate_is_UV_update      = 0x11,
     DW_LNE_HP_push_context             = 0x12,
Index: binutils/dwarf.c
===================================================================
RCS file: /cvs/src/src/binutils/dwarf.c,v
retrieving revision 1.44
diff -u -p -r1.44 dwarf.c
--- binutils/dwarf.c	27 Mar 2009 14:27:02 -0000	1.44
+++ binutils/dwarf.c	21 Apr 2009 18:20:53 -0000
@@ -328,36 +328,41 @@ process_extended_line_op (unsigned char
       printf (_("%s\n\n"), name);
       break;

+    case DW_LNE_set_discriminator:
+      printf (_("set Discriminator to %lu\n"),
+              read_leb128 (data, & bytes_read, 0));
+      break;
+
     /* HP extensions.  */
     case DW_LNE_HP_negate_is_UV_update:
-      printf ("DW_LNE_HP_negate_is_UV_update");
+      printf ("DW_LNE_HP_negate_is_UV_update\n");
       break;
     case DW_LNE_HP_push_context:
-      printf ("DW_LNE_HP_push_context");
+      printf ("DW_LNE_HP_push_context\n");
       break;
     case DW_LNE_HP_pop_context:
-      printf ("DW_LNE_HP_pop_context");
+      printf ("DW_LNE_HP_pop_context\n");
       break;
     case DW_LNE_HP_set_file_line_column:
-      printf ("DW_LNE_HP_set_file_line_column");
+      printf ("DW_LNE_HP_set_file_line_column\n");
       break;
     case DW_LNE_HP_set_routine_name:
-      printf ("DW_LNE_HP_set_routine_name");
+      printf ("DW_LNE_HP_set_routine_name\n");
       break;
     case DW_LNE_HP_set_sequence:
-      printf ("DW_LNE_HP_set_sequence");
+      printf ("DW_LNE_HP_set_sequence\n");
       break;
     case DW_LNE_HP_negate_post_semantics:
-      printf ("DW_LNE_HP_negate_post_semantics");
+      printf ("DW_LNE_HP_negate_post_semantics\n");
       break;
     case DW_LNE_HP_negate_function_exit:
-      printf ("DW_LNE_HP_negate_function_exit");
+      printf ("DW_LNE_HP_negate_function_exit\n");
       break;
     case DW_LNE_HP_negate_front_end_logical:
-      printf ("DW_LNE_HP_negate_front_end_logical");
+      printf ("DW_LNE_HP_negate_front_end_logical\n");
       break;
     case DW_LNE_HP_define_proc:
-      printf ("DW_LNE_HP_define_proc");
+      printf ("DW_LNE_HP_define_proc\n");
       break;

     default:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]