public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [patch] More DWARF-4 support
@ 2009-08-20  1:38 Cary Coutant
  2009-08-28 18:48 ` Cary Coutant
  2009-08-28 19:32 ` Tom Tromey
  0 siblings, 2 replies; 15+ messages in thread
From: Cary Coutant @ 2009-08-20  1:38 UTC (permalink / raw)
  To: Binutils

[-- Attachment #1: Type: text/plain, Size: 1190 bytes --]

This patch adds support to objdump and readelf for most the new
DWARF-4 features that haven't already been added.

OK?

-cary


include/

	* dwarf2.h (DW_TAG_rvalue_reference_type, DW_TAG_template_alias):
	New tags.
	(DW_FORM_ref_sig8): New name for DW_FORM_sig8.
	(DW_AT_main_subprogram, DW_AT_data_bit_offset, DW_AT_const_expr,
	DW_AT_enum_class, DW_AT_linkage_name, DW_AT_GNU_guarded_by,
	DW_AT_GNU_pt_guarded_by, DW_AT_GNU_guarded, DW_AT_GNU_pt_guarded,
	DW_AT_GNU_locks_excluded, DW_AT_GNU_exclusive_locks_required,
	DW_AT_GNU_shared_locks_required, DW_AT_GNU_odr_signature): New
	attributes.
	(DW_LANG_Python): New language.

binutils/

	* dwarf.c (get_TAG_name): Add missing DWARF-3 and new DWARF-4 tags.
	(get_FORM_name): Add new DWARF-4 forms.
	(read_and_display_attr_value): Add DW_FORM_ref_sig8, DW_LANG_Python.
	(get_AT_name): Add new DWARF-4 and GNU-specific attributes.
	(process_debug_info): Add do_types parameter; change all callers.
	Add support for .debug_types sections.
	(display_debug_types): New function.
	(debug_displays): Add .debug_types section.
	* readelf.c (process_section_headers): Add .debug_types section.
	(display_debug_section): Simplify call to streq.

[-- Attachment #2: dwarf4-binutils-patch.txt --]
[-- Type: text/plain, Size: 12364 bytes --]

Index: include/dwarf2.h
===================================================================
RCS file: /cvs/src/src/include/dwarf2.h,v
retrieving revision 1.3
diff -u -p -r1.3 dwarf2.h
--- include/dwarf2.h	20 Jul 2009 20:57:39 -0000	1.3
+++ include/dwarf2.h	20 Aug 2009 00:09:59 -0000
@@ -196,6 +196,8 @@ enum dwarf_tag
     DW_TAG_shared_type = 0x40,
     /* DWARF 4.  */
     DW_TAG_type_unit = 0x41,
+    DW_TAG_rvalue_reference_type = 0x42,
+    DW_TAG_template_alias = 0x43,
 
     DW_TAG_lo_user = 0x4080,
     DW_TAG_hi_user = 0xffff,
@@ -251,7 +253,8 @@ enum dwarf_form
     DW_FORM_sec_offset = 0x17,
     DW_FORM_exprloc = 0x18,
     DW_FORM_flag_present = 0x19,
-    DW_FORM_sig8 = 0x20
+    DW_FORM_ref_sig8 = 0x20
+#define DW_FORM_sig8  DW_FORM_ref_sig8  /* Note: The use of DW_FORM_sig8 is deprecated.  */
   };
 
 /* Attribute names and codes.  */
@@ -350,7 +353,12 @@ enum dwarf_attribute
     DW_AT_pure          = 0x67,
     DW_AT_recursive     = 0x68,
     /* DWARF 4.  */
-    DW_AT_signature     = 0x69,
+    DW_AT_signature       = 0x69,
+    DW_AT_main_subprogram = 0x6a,
+    DW_AT_data_bit_offset = 0x6b,
+    DW_AT_const_expr      = 0x6c,
+    DW_AT_enum_class      = 0x6d,
+    DW_AT_linkage_name    = 0x6e,
 
     DW_AT_lo_user = 0x2000,	/* Implementation-defined range start.  */
     DW_AT_hi_user = 0x3ff0,	/* Implementation-defined range end.  */
@@ -390,6 +398,14 @@ enum dwarf_attribute
     DW_AT_body_begin = 0x2105,
     DW_AT_body_end   = 0x2106,
     DW_AT_GNU_vector = 0x2107,
+    DW_AT_GNU_guarded_by    = 0x2108,
+    DW_AT_GNU_pt_guarded_by = 0x2109,
+    DW_AT_GNU_guarded       = 0x210a,
+    DW_AT_GNU_pt_guarded    = 0x210b,
+    DW_AT_GNU_locks_excluded = 0x210c,
+    DW_AT_GNU_exclusive_locks_required = 0x210d,
+    DW_AT_GNU_shared_locks_required = 0x210e,
+    DW_AT_GNU_odr_signature = 0x210f,
     /* VMS extensions.  */
     DW_AT_VMS_rtnbeg_pd_address = 0x2201,
     /* UPC extension.  */
@@ -825,6 +841,7 @@ enum dwarf_source_language
     DW_LANG_ObjC_plus_plus = 0x0011,
     DW_LANG_UPC = 0x0012,
     DW_LANG_D = 0x0013,
+    DW_LANG_Python = 0x0014,
 
     DW_LANG_lo_user = 0x8000,	/* Implementation-defined range start.  */
     DW_LANG_hi_user = 0xffff,	/* Implementation-defined range start.  */
Index: binutils/dwarf.c
===================================================================
RCS file: /cvs/src/src/binutils/dwarf.c,v
retrieving revision 1.52
diff -u -p -r1.52 dwarf.c
--- binutils/dwarf.c	17 Jul 2009 15:19:21 -0000	1.52
+++ binutils/dwarf.c	20 Aug 2009 00:09:59 -0000
@@ -618,6 +618,12 @@ get_TAG_name (unsigned long tag)
     case DW_TAG_unspecified_type:	return "DW_TAG_unspecified_type";
     case DW_TAG_partial_unit:		return "DW_TAG_partial_unit";
     case DW_TAG_imported_unit:		return "DW_TAG_imported_unit";
+    case DW_TAG_condition:		return "DW_TAG_condition";
+    case DW_TAG_shared_type:		return "DW_TAG_shared_type";
+      /* DWARF 4 values.  */
+    case DW_TAG_type_unit:		return "DW_TAG_type_unit";
+    case DW_TAG_rvalue_reference_type:	return "DW_TAG_rvalue_reference_type";
+    case DW_TAG_template_alias:		return "DW_TAG_template_alias";
       /* UPC values.  */
     case DW_TAG_upc_shared_type:	return "DW_TAG_upc_shared_type";
     case DW_TAG_upc_strict_type:	return "DW_TAG_upc_strict_type";
@@ -658,6 +664,11 @@ get_FORM_name (unsigned long form)
     case DW_FORM_ref8:		return "DW_FORM_ref8";
     case DW_FORM_ref_udata:	return "DW_FORM_ref_udata";
     case DW_FORM_indirect:	return "DW_FORM_indirect";
+      /* DWARF 4 values.  */
+    case DW_FORM_sec_offset:	return "DW_FORM_sec_offset";
+    case DW_FORM_exprloc:	return "DW_FORM_exprloc";
+    case DW_FORM_flag_present:	return "DW_FORM_flag_present";
+    case DW_FORM_ref_sig8:	return "DW_FORM_ref_sig8";
     default:
       {
 	static char buffer[100];
@@ -1295,6 +1306,21 @@ read_and_display_attr_value (unsigned lo
       /* Handled above.  */
       break;
 
+    case DW_FORM_ref_sig8:
+      if (!do_loc)
+	{
+	  int i;
+	  printf (" signature: ");
+	  for (i = 0; i < 8; i++)
+	    {
+	      printf ("%02x", (unsigned) byte_get (data, 1));
+	      data += 1;
+	    }
+	}
+      else
+        data += 8;
+      break;
+
     default:
       warn (_("Unrecognized form: %lu\n"), form);
       break;
@@ -1422,6 +1448,8 @@ read_and_display_attr_value (unsigned lo
 	case DW_LANG_ObjC_plus_plus:	printf ("(Objective C++)"); break;
 	case DW_LANG_UPC:		printf ("(Unified Parallel C)"); break;
 	case DW_LANG_D:			printf ("(D)"); break;
+	  /* DWARF 4 values.  */
+	case DW_LANG_Python:		printf ("(Python)"); break;
 	  /* MIPS extension.  */
 	case DW_LANG_Mips_Assembler:	printf ("(MIPS assembler)"); break;
 	  /* UPC extension.  */
@@ -1578,6 +1606,9 @@ read_and_display_attr_value (unsigned lo
 
     case DW_AT_import:
       {
+        if (form == DW_FORM_ref_sig8)
+          break;
+
 	if (form == DW_FORM_ref1
 	    || form == DW_FORM_ref2
 	    || form == DW_FORM_ref4)
@@ -1706,6 +1737,13 @@ get_AT_name (unsigned long attribute)
     case DW_AT_elemental:		return "DW_AT_elemental";
     case DW_AT_pure:			return "DW_AT_pure";
     case DW_AT_recursive:		return "DW_AT_recursive";
+      /* DWARF 4 values.  */
+    case DW_AT_signature:		return "DW_AT_signature";
+    case DW_AT_main_subprogram:		return "DW_AT_main_subprogram";
+    case DW_AT_data_bit_offset:		return "DW_AT_data_bit_offset";
+    case DW_AT_const_expr:		return "DW_AT_const_expr";
+    case DW_AT_enum_class:		return "DW_AT_enum_class";
+    case DW_AT_linkage_name:		return "DW_AT_linkage_name";
 
       /* HP and SGI/MIPS extensions.  */
     case DW_AT_MIPS_loop_begin:			return "DW_AT_MIPS_loop_begin";
@@ -1738,13 +1776,21 @@ get_AT_name (unsigned long attribute)
     case DW_AT_MIPS_fde:			return "DW_AT_MIPS_fde or DW_AT_HP_unmodifiable";
 
       /* GNU extensions.  */
-    case DW_AT_sf_names:		return "DW_AT_sf_names";
-    case DW_AT_src_info:		return "DW_AT_src_info";
-    case DW_AT_mac_info:		return "DW_AT_mac_info";
-    case DW_AT_src_coords:		return "DW_AT_src_coords";
-    case DW_AT_body_begin:		return "DW_AT_body_begin";
-    case DW_AT_body_end:		return "DW_AT_body_end";
-    case DW_AT_GNU_vector:		return "DW_AT_GNU_vector";
+    case DW_AT_sf_names:			return "DW_AT_sf_names";
+    case DW_AT_src_info:			return "DW_AT_src_info";
+    case DW_AT_mac_info:			return "DW_AT_mac_info";
+    case DW_AT_src_coords:			return "DW_AT_src_coords";
+    case DW_AT_body_begin:			return "DW_AT_body_begin";
+    case DW_AT_body_end:			return "DW_AT_body_end";
+    case DW_AT_GNU_vector:			return "DW_AT_GNU_vector";
+    case DW_AT_GNU_guarded_by:			return "DW_AT_GNU_guarded_by";
+    case DW_AT_GNU_pt_guarded_by:		return "DW_AT_GNU_pt_guarded_by";
+    case DW_AT_GNU_guarded:			return "DW_AT_GNU_guarded";
+    case DW_AT_GNU_pt_guarded:			return "DW_AT_GNU_pt_guarded";
+    case DW_AT_GNU_locks_excluded:		return "DW_AT_GNU_locks_excluded";
+    case DW_AT_GNU_exclusive_locks_required:	return "DW_AT_GNU_exclusive_locks_required";
+    case DW_AT_GNU_shared_locks_required:	return "DW_AT_GNU_shared_locks_required";
+    case DW_AT_GNU_odr_signature:		return "DW_AT_GNU_odr_signature";
 
       /* UPC extension.  */
     case DW_AT_upc_threads_scaled:	return "DW_AT_upc_threads_scaled";
@@ -1791,12 +1837,14 @@ read_and_display_attr (unsigned long att
 
 /* Process the contents of a .debug_info section.  If do_loc is non-zero
    then we are scanning for location lists and we do not want to display
-   anything to the user.  */
+   anything to the user.  If do_types is non-zero, we are processing
+   a .debug_types section instead of a .debug_info section.  */
 
 static int
 process_debug_info (struct dwarf_section *section,
 		    void *file,
-		    int do_loc)
+		    int do_loc,
+		    int do_types)
 {
   unsigned char *start = section->start;
   unsigned char *end = start + section->size;
@@ -1805,7 +1853,8 @@ process_debug_info (struct dwarf_section
   unsigned int num_units = 0;
 
   if ((do_loc || do_debug_loc || do_debug_ranges)
-      && num_debug_info_entries == 0)
+      && num_debug_info_entries == 0
+      && ! do_types)
     {
       unsigned long length;
 
@@ -1883,6 +1932,8 @@ process_debug_info (struct dwarf_section
       unsigned long cu_offset;
       int offset_size;
       int initial_length_size;
+      unsigned char signature[8];
+      unsigned long type_offset = 0;
 
       hdrptr = start;
 
@@ -1913,8 +1964,24 @@ process_debug_info (struct dwarf_section
 
       compunit.cu_pointer_size = byte_get (hdrptr, 1);
       hdrptr += 1;
+
+      if (do_types)
+        {
+          int i;
+
+          for (i = 0; i < 8; i++)
+            {
+              signature[i] = byte_get (hdrptr, 1);
+              hdrptr += 1;
+            }
+
+          type_offset = byte_get (hdrptr, offset_size);
+          hdrptr += offset_size;
+        }
+
       if ((do_loc || do_debug_loc || do_debug_ranges)
-	  && num_debug_info_entries == 0)
+	  && num_debug_info_entries == 0
+	  && ! do_types)
 	{
 	  debug_information [unit].cu_offset = cu_offset;
 	  debug_information [unit].pointer_size
@@ -1937,6 +2004,15 @@ process_debug_info (struct dwarf_section
 	  printf (_("   Version:       %d\n"), compunit.cu_version);
 	  printf (_("   Abbrev Offset: %ld\n"), compunit.cu_abbrev_offset);
 	  printf (_("   Pointer Size:  %d\n"), compunit.cu_pointer_size);
+	  if (do_types)
+	    {
+	      int i;
+	      printf (_("   Signature:     "));
+	      for (i = 0; i < 8; i++)
+	        printf ("%02x", signature[i]);
+	      printf ("\n");
+	      printf (_("   Type Offset:   0x%lx\n"), type_offset);
+	    }
 	}
 
       if (cu_offset + compunit.cu_length + initial_length_size
@@ -2071,7 +2147,8 @@ process_debug_info (struct dwarf_section
   /* Set num_debug_info_entries here so that it can be used to check if
      we need to process .debug_loc and .debug_ranges sections.  */
   if ((do_loc || do_debug_loc || do_debug_ranges)
-      && num_debug_info_entries == 0)
+      && num_debug_info_entries == 0
+      && ! do_types)
     num_debug_info_entries = num_units;
 
   if (!do_loc)
@@ -2106,7 +2183,7 @@ load_debug_info (void * file)
     return num_debug_info_entries;
 
   if (load_debug_section (info, file)
-      && process_debug_info (&debug_displays [info].section, file, 1))
+      && process_debug_info (&debug_displays [info].section, file, 1, 0))
     return num_debug_info_entries;
 
   num_debug_info_entries = DEBUG_INFO_UNAVAILABLE;
@@ -3336,9 +3413,14 @@ display_debug_str (struct dwarf_section 
 static int
 display_debug_info (struct dwarf_section *section, void *file)
 {
-  return process_debug_info (section, file, 0);
+  return process_debug_info (section, file, 0, 0);
 }
 
+static int
+display_debug_types (struct dwarf_section *section, void *file)
+{
+  return process_debug_info (section, file, 0, 1);
+}
 
 static int
 display_debug_aranges (struct dwarf_section *section,
@@ -4910,7 +4992,7 @@ struct dwarf_section_display debug_displ
   { { ".debug_static_vars",	".zdebug_static_vars",	NULL,	NULL,	0,	0 },
     display_debug_not_supported,	NULL,			0 },
   { { ".debug_types",		".zdebug_types",	NULL,	NULL,	0,	0 },
-    display_debug_not_supported,	NULL,			0 },
+    display_debug_types,		&do_debug_info,		1 },
   { { ".debug_weaknames",	".zdebug_weaknames",	NULL,	NULL,	0,	0 },
     display_debug_not_supported,	NULL,			0 }
 };
Index: binutils/readelf.c
===================================================================
RCS file: /cvs/src/src/binutils/readelf.c,v
retrieving revision 1.454
diff -u -p -r1.454 readelf.c
--- binutils/readelf.c	17 Aug 2009 08:34:37 -0000	1.454
+++ binutils/readelf.c	20 Aug 2009 00:09:59 -0000
@@ -4232,6 +4232,7 @@ process_section_headers (FILE * file)
 
 	  if (do_debugging
 	      || (do_debug_info     && streq (name, "info"))
+	      || (do_debug_info     && streq (name, "types"))
 	      || (do_debug_abbrevs  && streq (name, "abbrev"))
 	      || (do_debug_lines    && streq (name, "line"))
 	      || (do_debug_pubnames && streq (name, "pubnames"))
@@ -8682,7 +8683,7 @@ display_debug_section (Elf_Internal_Shdr
 	if (secondary)
 	  free_debug_section (i);
 
-	if (streq (debug_displays[i].section.uncompressed_name, name))
+	if (streq (sec->uncompressed_name, name))
 	  sec->name = sec->uncompressed_name;
 	else
 	  sec->name = sec->compressed_name;

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [patch] More DWARF-4 support
  2009-08-20  1:38 [patch] More DWARF-4 support Cary Coutant
@ 2009-08-28 18:48 ` Cary Coutant
  2009-08-28 19:32 ` Tom Tromey
  1 sibling, 0 replies; 15+ messages in thread
From: Cary Coutant @ 2009-08-28 18:48 UTC (permalink / raw)
  To: Binutils

Ping...

-cary


On Wed, Aug 19, 2009 at 5:19 PM, Cary Coutant<ccoutant@google.com> wrote:
> This patch adds support to objdump and readelf for most the new
> DWARF-4 features that haven't already been added.
>
> OK?
>
> -cary
>
>
> include/
>
>        * dwarf2.h (DW_TAG_rvalue_reference_type, DW_TAG_template_alias):
>        New tags.
>        (DW_FORM_ref_sig8): New name for DW_FORM_sig8.
>        (DW_AT_main_subprogram, DW_AT_data_bit_offset, DW_AT_const_expr,
>        DW_AT_enum_class, DW_AT_linkage_name, DW_AT_GNU_guarded_by,
>        DW_AT_GNU_pt_guarded_by, DW_AT_GNU_guarded, DW_AT_GNU_pt_guarded,
>        DW_AT_GNU_locks_excluded, DW_AT_GNU_exclusive_locks_required,
>        DW_AT_GNU_shared_locks_required, DW_AT_GNU_odr_signature): New
>        attributes.
>        (DW_LANG_Python): New language.
>
> binutils/
>
>        * dwarf.c (get_TAG_name): Add missing DWARF-3 and new DWARF-4 tags.
>        (get_FORM_name): Add new DWARF-4 forms.
>        (read_and_display_attr_value): Add DW_FORM_ref_sig8, DW_LANG_Python.
>        (get_AT_name): Add new DWARF-4 and GNU-specific attributes.
>        (process_debug_info): Add do_types parameter; change all callers.
>        Add support for .debug_types sections.
>        (display_debug_types): New function.
>        (debug_displays): Add .debug_types section.
>        * readelf.c (process_section_headers): Add .debug_types section.
>        (display_debug_section): Simplify call to streq.
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [patch] More DWARF-4 support
  2009-08-20  1:38 [patch] More DWARF-4 support Cary Coutant
  2009-08-28 18:48 ` Cary Coutant
@ 2009-08-28 19:32 ` Tom Tromey
  2009-08-28 20:14   ` Cary Coutant
  1 sibling, 1 reply; 15+ messages in thread
From: Tom Tromey @ 2009-08-28 19:32 UTC (permalink / raw)
  To: Cary Coutant; +Cc: Binutils

>>>>> "Cary" == Cary Coutant <ccoutant@google.com> writes:

Cary> 	(DW_AT_main_subprogram, DW_AT_data_bit_offset, DW_AT_const_expr,
Cary> 	DW_AT_enum_class, DW_AT_linkage_name, DW_AT_GNU_guarded_by,
Cary> 	DW_AT_GNU_pt_guarded_by, DW_AT_GNU_guarded, DW_AT_GNU_pt_guarded,
Cary> 	DW_AT_GNU_locks_excluded, DW_AT_GNU_exclusive_locks_required,
Cary> 	DW_AT_GNU_shared_locks_required, DW_AT_GNU_odr_signature): New
Cary> 	attributes.

Where are these GNU extensions documented?

I think dwarf2.h should refer to the documentation for all extensions.
Undocumented extensions have already caused problems for people writing
new readers.

Tom

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [patch] More DWARF-4 support
  2009-08-28 19:32 ` Tom Tromey
@ 2009-08-28 20:14   ` Cary Coutant
  2009-08-29  0:12     ` Tom Tromey
  0 siblings, 1 reply; 15+ messages in thread
From: Cary Coutant @ 2009-08-28 20:14 UTC (permalink / raw)
  To: tromey; +Cc: Binutils

> Cary>   (DW_AT_main_subprogram, DW_AT_data_bit_offset, DW_AT_const_expr,
> Cary>   DW_AT_enum_class, DW_AT_linkage_name, DW_AT_GNU_guarded_by,
> Cary>   DW_AT_GNU_pt_guarded_by, DW_AT_GNU_guarded, DW_AT_GNU_pt_guarded,
> Cary>   DW_AT_GNU_locks_excluded, DW_AT_GNU_exclusive_locks_required,
> Cary>   DW_AT_GNU_shared_locks_required, DW_AT_GNU_odr_signature): New
> Cary>   attributes.
>
> Where are these GNU extensions documented?
>
> I think dwarf2.h should refer to the documentation for all extensions.
> Undocumented extensions have already caused problems for people writing
> new readers.

Good point. They're described in the following document:

   http://docs.google.com/Doc?id=dchhtd34_75dz7zbjgq

Is a pointer to that sufficient?

-cary

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [patch] More DWARF-4 support
  2009-08-28 20:14   ` Cary Coutant
@ 2009-08-29  0:12     ` Tom Tromey
  2009-08-29  0:40       ` Cary Coutant
  0 siblings, 1 reply; 15+ messages in thread
From: Tom Tromey @ 2009-08-29  0:12 UTC (permalink / raw)
  To: Cary Coutant; +Cc: Binutils

>>>>> "Cary" == Cary Coutant <ccoutant@google.com> writes:

>> I think dwarf2.h should refer to the documentation for all extensions.
>> Undocumented extensions have already caused problems for people writing
>> new readers.

Cary> Good point. They're described in the following document:
Cary>    http://docs.google.com/Doc?id=dchhtd34_75dz7zbjgq
Cary> Is a pointer to that sufficient?

I would prefer a GNU related site, like the GCC wiki, or even somewhere
in the source tree.

Tom

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [patch] More DWARF-4 support
  2009-08-29  0:12     ` Tom Tromey
@ 2009-08-29  0:40       ` Cary Coutant
  2009-08-31 22:30         ` Tom Tromey
  0 siblings, 1 reply; 15+ messages in thread
From: Cary Coutant @ 2009-08-29  0:40 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Binutils

> Cary> Good point. They're described in the following document:
> Cary>    http://docs.google.com/Doc?id=dchhtd34_75dz7zbjgq
> Cary> Is a pointer to that sufficient?
>
> I would prefer a GNU related site, like the GCC wiki, or even somewhere
> in the source tree.

http://gcc.gnu.org/wiki/ThreadSafetyAnnotation

How's this? It gives an overview of the whole thread-safety annotation
design, and points to the DWARF proposal in Google Docs.

-cary

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [patch] More DWARF-4 support
  2009-08-29  0:40       ` Cary Coutant
@ 2009-08-31 22:30         ` Tom Tromey
  2009-09-04  0:57           ` Cary Coutant
  0 siblings, 1 reply; 15+ messages in thread
From: Tom Tromey @ 2009-08-31 22:30 UTC (permalink / raw)
  To: Cary Coutant; +Cc: Binutils

>>>>> "Cary" == Cary Coutant <ccoutant@google.com> writes:

Cary> http://gcc.gnu.org/wiki/ThreadSafetyAnnotation

Cary> How's this? It gives an overview of the whole thread-safety annotation
Cary> design, and points to the DWARF proposal in Google Docs.

I think that for a GNU extension it would be best for the document to be
hosted on a GNU site.  That way we have some amount of control over the
existence and contents of the document.

Tom

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [patch] More DWARF-4 support
  2009-08-31 22:30         ` Tom Tromey
@ 2009-09-04  0:57           ` Cary Coutant
  2009-09-22 20:27             ` Cary Coutant
  0 siblings, 1 reply; 15+ messages in thread
From: Cary Coutant @ 2009-09-04  0:57 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Binutils

> Cary> http://gcc.gnu.org/wiki/ThreadSafetyAnnotation
>
> Cary> How's this? It gives an overview of the whole thread-safety annotation
> Cary> design, and points to the DWARF proposal in Google Docs.
>
> I think that for a GNU extension it would be best for the document to be
> hosted on a GNU site.  That way we have some amount of control over the
> existence and contents of the document.

OK.

I tried translating the document into the wiki markup language, but
gave up (there's too much non-semantic markup, and the wiki doesn't
seem to take any HTML markup), so it looks like the best solution will
be to export the doc as HTML and check it in under wwwdocs/htdocs.

(a) Should this go at the top level or should I create a debug or
dwarf directory?

(b) Should I link to it from anywhere other than the dwarf2.h header?

(c) Do I need to send the HTML file in the form of a patch for review?

-cary

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [patch] More DWARF-4 support
  2009-09-04  0:57           ` Cary Coutant
@ 2009-09-22 20:27             ` Cary Coutant
  2009-09-23 21:42               ` Cary Coutant
                                 ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Cary Coutant @ 2009-09-22 20:27 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Binutils

[-- Attachment #1: Type: text/plain, Size: 2072 bytes --]

>> I think that for a GNU extension it would be best for the document to be
>> hosted on a GNU site.  That way we have some amount of control over the
>> existence and contents of the document.

I've updated the patch so that dwarf2.h now points to the
ThreadSafetyAnnotation wiki page for the thread safety extensions, and
to the just-created DwarfSeparateTypeInfo wiki page for the
DW_AT_odr_signature attribute.

> I tried translating the document into the wiki markup language, but
> gave up (there's too much non-semantic markup, and the wiki doesn't
> seem to take any HTML markup), so it looks like the best solution will
> be to export the doc as HTML and check it in under wwwdocs/htdocs.

I've added the DWARF extensions document as an HTML page at
wwwdocs/htdocs/projects/thread-annotations.html, which I will send as
a separate patch, then I'll update the ThreadSafetyAnnotation wiki
page to point to that page instead of Google Docs.

OK?

-cary


include/

	* dwarf2.h (DW_TAG_rvalue_reference_type, DW_TAG_template_alias):
	New tags.
	(DW_FORM_ref_sig8): New name for DW_FORM_sig8.
	(DW_AT_main_subprogram, DW_AT_data_bit_offset, DW_AT_const_expr,
	DW_AT_enum_class, DW_AT_linkage_name, DW_AT_GNU_guarded_by,
	DW_AT_GNU_pt_guarded_by, DW_AT_GNU_guarded, DW_AT_GNU_pt_guarded,
	DW_AT_GNU_locks_excluded, DW_AT_GNU_exclusive_locks_required,
	DW_AT_GNU_shared_locks_required, DW_AT_GNU_odr_signature): New
	attributes.
	(DW_LANG_Python): New language.

binutils/

	* dwarf.c (get_TAG_name): Add missing DWARF-3 and new DWARF-4 tags.
	(get_FORM_name): Add new DWARF-4 forms.
	(read_and_display_attr_value): Add DW_FORM_ref_sig8, DW_LANG_Python.
	(get_AT_name): Add new DWARF-4 and GNU-specific attributes.
	(process_debug_info): Add do_types parameter; change all callers.
	Add support for .debug_types sections.
	(display_debug_types): New function.
	(debug_displays): Add .debug_types section.
	* readelf.c (process_section_headers): Add .debug_types section.
	(display_debug_section): Simplify call to streq.

[-- Attachment #2: dwarf4-binutils-patch.txt --]
[-- Type: text/plain, Size: 12654 bytes --]

Index: include/dwarf2.h
===================================================================
RCS file: /cvs/src/src/include/dwarf2.h,v
retrieving revision 1.4
diff -u -p -r1.4 dwarf2.h
--- include/dwarf2.h	31 Aug 2009 23:24:07 -0000	1.4
+++ include/dwarf2.h	22 Sep 2009 20:17:12 -0000
@@ -196,6 +196,8 @@ enum dwarf_tag
     DW_TAG_shared_type = 0x40,
     /* DWARF 4.  */
     DW_TAG_type_unit = 0x41,
+    DW_TAG_rvalue_reference_type = 0x42,
+    DW_TAG_template_alias = 0x43,
 
     DW_TAG_lo_user = 0x4080,
     DW_TAG_hi_user = 0xffff,
@@ -254,7 +256,8 @@ enum dwarf_form
     DW_FORM_sec_offset = 0x17,
     DW_FORM_exprloc = 0x18,
     DW_FORM_flag_present = 0x19,
-    DW_FORM_sig8 = 0x20
+    DW_FORM_ref_sig8 = 0x20
+#define DW_FORM_sig8  DW_FORM_ref_sig8  /* Note: The use of DW_FORM_sig8 is deprecated.  */
   };
 
 /* Attribute names and codes.  */
@@ -353,7 +356,12 @@ enum dwarf_attribute
     DW_AT_pure          = 0x67,
     DW_AT_recursive     = 0x68,
     /* DWARF 4.  */
-    DW_AT_signature     = 0x69,
+    DW_AT_signature       = 0x69,
+    DW_AT_main_subprogram = 0x6a,
+    DW_AT_data_bit_offset = 0x6b,
+    DW_AT_const_expr      = 0x6c,
+    DW_AT_enum_class      = 0x6d,
+    DW_AT_linkage_name    = 0x6e,
 
     DW_AT_lo_user = 0x2000,	/* Implementation-defined range start.  */
     DW_AT_hi_user = 0x3ff0,	/* Implementation-defined range end.  */
@@ -393,6 +401,18 @@ enum dwarf_attribute
     DW_AT_body_begin = 0x2105,
     DW_AT_body_end   = 0x2106,
     DW_AT_GNU_vector = 0x2107,
+    /* Thread-safety annotations.
+       See http://gcc.gnu.org/wiki/ThreadSafetyAnnotation .  */
+    DW_AT_GNU_guarded_by    = 0x2108,
+    DW_AT_GNU_pt_guarded_by = 0x2109,
+    DW_AT_GNU_guarded       = 0x210a,
+    DW_AT_GNU_pt_guarded    = 0x210b,
+    DW_AT_GNU_locks_excluded = 0x210c,
+    DW_AT_GNU_exclusive_locks_required = 0x210d,
+    DW_AT_GNU_shared_locks_required = 0x210e,
+    /* One-definition rule violation detection.
+       See http://gcc.gnu.org/wiki/DwarfSeparateTypeInfo .  */
+    DW_AT_GNU_odr_signature = 0x210f,
     /* Template template argument name.
        See http://gcc.gnu.org/wiki/TemplateParmsDwarf .  */
     DW_AT_GNU_template_name = 0x2110,
@@ -831,6 +851,7 @@ enum dwarf_source_language
     DW_LANG_ObjC_plus_plus = 0x0011,
     DW_LANG_UPC = 0x0012,
     DW_LANG_D = 0x0013,
+    DW_LANG_Python = 0x0014,
 
     DW_LANG_lo_user = 0x8000,	/* Implementation-defined range start.  */
     DW_LANG_hi_user = 0xffff,	/* Implementation-defined range start.  */
Index: binutils/dwarf.c
===================================================================
RCS file: /cvs/src/src/binutils/dwarf.c,v
retrieving revision 1.56
diff -u -p -r1.56 dwarf.c
--- binutils/dwarf.c	10 Sep 2009 13:40:44 -0000	1.56
+++ binutils/dwarf.c	22 Sep 2009 20:17:12 -0000
@@ -628,6 +628,12 @@ get_TAG_name (unsigned long tag)
     case DW_TAG_unspecified_type:	return "DW_TAG_unspecified_type";
     case DW_TAG_partial_unit:		return "DW_TAG_partial_unit";
     case DW_TAG_imported_unit:		return "DW_TAG_imported_unit";
+    case DW_TAG_condition:		return "DW_TAG_condition";
+    case DW_TAG_shared_type:		return "DW_TAG_shared_type";
+      /* DWARF 4 values.  */
+    case DW_TAG_type_unit:		return "DW_TAG_type_unit";
+    case DW_TAG_rvalue_reference_type:	return "DW_TAG_rvalue_reference_type";
+    case DW_TAG_template_alias:		return "DW_TAG_template_alias";
       /* UPC values.  */
     case DW_TAG_upc_shared_type:	return "DW_TAG_upc_shared_type";
     case DW_TAG_upc_strict_type:	return "DW_TAG_upc_strict_type";
@@ -668,6 +674,11 @@ get_FORM_name (unsigned long form)
     case DW_FORM_ref8:		return "DW_FORM_ref8";
     case DW_FORM_ref_udata:	return "DW_FORM_ref_udata";
     case DW_FORM_indirect:	return "DW_FORM_indirect";
+      /* DWARF 4 values.  */
+    case DW_FORM_sec_offset:	return "DW_FORM_sec_offset";
+    case DW_FORM_exprloc:	return "DW_FORM_exprloc";
+    case DW_FORM_flag_present:	return "DW_FORM_flag_present";
+    case DW_FORM_ref_sig8:	return "DW_FORM_ref_sig8";
     default:
       {
 	static char buffer[100];
@@ -1305,6 +1316,21 @@ read_and_display_attr_value (unsigned lo
       /* Handled above.  */
       break;
 
+    case DW_FORM_ref_sig8:
+      if (!do_loc)
+	{
+	  int i;
+	  printf (" signature: ");
+	  for (i = 0; i < 8; i++)
+	    {
+	      printf ("%02x", (unsigned) byte_get (data, 1));
+	      data += 1;
+	    }
+	}
+      else
+        data += 8;
+      break;
+
     default:
       warn (_("Unrecognized form: %lu\n"), form);
       break;
@@ -1432,6 +1458,8 @@ read_and_display_attr_value (unsigned lo
 	case DW_LANG_ObjC_plus_plus:	printf ("(Objective C++)"); break;
 	case DW_LANG_UPC:		printf ("(Unified Parallel C)"); break;
 	case DW_LANG_D:			printf ("(D)"); break;
+	  /* DWARF 4 values.  */
+	case DW_LANG_Python:		printf ("(Python)"); break;
 	  /* MIPS extension.  */
 	case DW_LANG_Mips_Assembler:	printf ("(MIPS assembler)"); break;
 	  /* UPC extension.  */
@@ -1588,6 +1616,9 @@ read_and_display_attr_value (unsigned lo
 
     case DW_AT_import:
       {
+        if (form == DW_FORM_ref_sig8)
+          break;
+
 	if (form == DW_FORM_ref1
 	    || form == DW_FORM_ref2
 	    || form == DW_FORM_ref4)
@@ -1716,6 +1747,13 @@ get_AT_name (unsigned long attribute)
     case DW_AT_elemental:		return "DW_AT_elemental";
     case DW_AT_pure:			return "DW_AT_pure";
     case DW_AT_recursive:		return "DW_AT_recursive";
+      /* DWARF 4 values.  */
+    case DW_AT_signature:		return "DW_AT_signature";
+    case DW_AT_main_subprogram:		return "DW_AT_main_subprogram";
+    case DW_AT_data_bit_offset:		return "DW_AT_data_bit_offset";
+    case DW_AT_const_expr:		return "DW_AT_const_expr";
+    case DW_AT_enum_class:		return "DW_AT_enum_class";
+    case DW_AT_linkage_name:		return "DW_AT_linkage_name";
 
       /* HP and SGI/MIPS extensions.  */
     case DW_AT_MIPS_loop_begin:			return "DW_AT_MIPS_loop_begin";
@@ -1748,13 +1786,21 @@ get_AT_name (unsigned long attribute)
     case DW_AT_MIPS_fde:			return "DW_AT_MIPS_fde or DW_AT_HP_unmodifiable";
 
       /* GNU extensions.  */
-    case DW_AT_sf_names:		return "DW_AT_sf_names";
-    case DW_AT_src_info:		return "DW_AT_src_info";
-    case DW_AT_mac_info:		return "DW_AT_mac_info";
-    case DW_AT_src_coords:		return "DW_AT_src_coords";
-    case DW_AT_body_begin:		return "DW_AT_body_begin";
-    case DW_AT_body_end:		return "DW_AT_body_end";
-    case DW_AT_GNU_vector:		return "DW_AT_GNU_vector";
+    case DW_AT_sf_names:			return "DW_AT_sf_names";
+    case DW_AT_src_info:			return "DW_AT_src_info";
+    case DW_AT_mac_info:			return "DW_AT_mac_info";
+    case DW_AT_src_coords:			return "DW_AT_src_coords";
+    case DW_AT_body_begin:			return "DW_AT_body_begin";
+    case DW_AT_body_end:			return "DW_AT_body_end";
+    case DW_AT_GNU_vector:			return "DW_AT_GNU_vector";
+    case DW_AT_GNU_guarded_by:			return "DW_AT_GNU_guarded_by";
+    case DW_AT_GNU_pt_guarded_by:		return "DW_AT_GNU_pt_guarded_by";
+    case DW_AT_GNU_guarded:			return "DW_AT_GNU_guarded";
+    case DW_AT_GNU_pt_guarded:			return "DW_AT_GNU_pt_guarded";
+    case DW_AT_GNU_locks_excluded:		return "DW_AT_GNU_locks_excluded";
+    case DW_AT_GNU_exclusive_locks_required:	return "DW_AT_GNU_exclusive_locks_required";
+    case DW_AT_GNU_shared_locks_required:	return "DW_AT_GNU_shared_locks_required";
+    case DW_AT_GNU_odr_signature:		return "DW_AT_GNU_odr_signature";
 
       /* UPC extension.  */
     case DW_AT_upc_threads_scaled:	return "DW_AT_upc_threads_scaled";
@@ -1801,12 +1847,14 @@ read_and_display_attr (unsigned long att
 
 /* Process the contents of a .debug_info section.  If do_loc is non-zero
    then we are scanning for location lists and we do not want to display
-   anything to the user.  */
+   anything to the user.  If do_types is non-zero, we are processing
+   a .debug_types section instead of a .debug_info section.  */
 
 static int
 process_debug_info (struct dwarf_section *section,
 		    void *file,
-		    int do_loc)
+		    int do_loc,
+		    int do_types)
 {
   unsigned char *start = section->start;
   unsigned char *end = start + section->size;
@@ -1815,7 +1863,8 @@ process_debug_info (struct dwarf_section
   unsigned int num_units = 0;
 
   if ((do_loc || do_debug_loc || do_debug_ranges)
-      && num_debug_info_entries == 0)
+      && num_debug_info_entries == 0
+      && ! do_types)
     {
       unsigned long length;
 
@@ -1893,6 +1942,8 @@ process_debug_info (struct dwarf_section
       unsigned long cu_offset;
       int offset_size;
       int initial_length_size;
+      unsigned char signature[8];
+      unsigned long type_offset = 0;
 
       hdrptr = start;
 
@@ -1923,8 +1974,24 @@ process_debug_info (struct dwarf_section
 
       compunit.cu_pointer_size = byte_get (hdrptr, 1);
       hdrptr += 1;
+
+      if (do_types)
+        {
+          int i;
+
+          for (i = 0; i < 8; i++)
+            {
+              signature[i] = byte_get (hdrptr, 1);
+              hdrptr += 1;
+            }
+
+          type_offset = byte_get (hdrptr, offset_size);
+          hdrptr += offset_size;
+        }
+
       if ((do_loc || do_debug_loc || do_debug_ranges)
-	  && num_debug_info_entries == 0)
+	  && num_debug_info_entries == 0
+	  && ! do_types)
 	{
 	  debug_information [unit].cu_offset = cu_offset;
 	  debug_information [unit].pointer_size
@@ -1947,6 +2014,15 @@ process_debug_info (struct dwarf_section
 	  printf (_("   Version:       %d\n"), compunit.cu_version);
 	  printf (_("   Abbrev Offset: %ld\n"), compunit.cu_abbrev_offset);
 	  printf (_("   Pointer Size:  %d\n"), compunit.cu_pointer_size);
+	  if (do_types)
+	    {
+	      int i;
+	      printf (_("   Signature:     "));
+	      for (i = 0; i < 8; i++)
+	        printf ("%02x", signature[i]);
+	      printf ("\n");
+	      printf (_("   Type Offset:   0x%lx\n"), type_offset);
+	    }
 	}
 
       if (cu_offset + compunit.cu_length + initial_length_size
@@ -2094,7 +2170,8 @@ process_debug_info (struct dwarf_section
   /* Set num_debug_info_entries here so that it can be used to check if
      we need to process .debug_loc and .debug_ranges sections.  */
   if ((do_loc || do_debug_loc || do_debug_ranges)
-      && num_debug_info_entries == 0)
+      && num_debug_info_entries == 0
+      && ! do_types)
     num_debug_info_entries = num_units;
 
   if (!do_loc)
@@ -2129,7 +2206,7 @@ load_debug_info (void * file)
     return num_debug_info_entries;
 
   if (load_debug_section (info, file)
-      && process_debug_info (&debug_displays [info].section, file, 1))
+      && process_debug_info (&debug_displays [info].section, file, 1, 0))
     return num_debug_info_entries;
 
   num_debug_info_entries = DEBUG_INFO_UNAVAILABLE;
@@ -3360,9 +3437,14 @@ display_debug_str (struct dwarf_section 
 static int
 display_debug_info (struct dwarf_section *section, void *file)
 {
-  return process_debug_info (section, file, 0);
+  return process_debug_info (section, file, 0, 0);
 }
 
+static int
+display_debug_types (struct dwarf_section *section, void *file)
+{
+  return process_debug_info (section, file, 0, 1);
+}
 
 static int
 display_debug_aranges (struct dwarf_section *section,
@@ -4937,7 +5019,7 @@ struct dwarf_section_display debug_displ
   { { ".debug_static_vars",	".zdebug_static_vars",	NULL,	NULL,	0,	0 },
     display_debug_not_supported,	NULL,			0 },
   { { ".debug_types",		".zdebug_types",	NULL,	NULL,	0,	0 },
-    display_debug_not_supported,	NULL,			0 },
+    display_debug_types,		&do_debug_info,		1 },
   { { ".debug_weaknames",	".zdebug_weaknames",	NULL,	NULL,	0,	0 },
     display_debug_not_supported,	NULL,			0 }
 };
Index: binutils/readelf.c
===================================================================
RCS file: /cvs/src/src/binutils/readelf.c,v
retrieving revision 1.459
diff -u -p -r1.459 readelf.c
--- binutils/readelf.c	14 Sep 2009 12:29:50 -0000	1.459
+++ binutils/readelf.c	22 Sep 2009 20:17:12 -0000
@@ -4274,6 +4274,7 @@ process_section_headers (FILE * file)
 
 	  if (do_debugging
 	      || (do_debug_info     && streq (name, "info"))
+	      || (do_debug_info     && streq (name, "types"))
 	      || (do_debug_abbrevs  && streq (name, "abbrev"))
 	      || (do_debug_lines    && streq (name, "line"))
 	      || (do_debug_pubnames && streq (name, "pubnames"))
@@ -8815,7 +8816,7 @@ display_debug_section (Elf_Internal_Shdr
 	if (secondary)
 	  free_debug_section ((enum dwarf_section_display_enum) i);
 
-	if (streq (debug_displays[i].section.uncompressed_name, name))
+	if (streq (sec->uncompressed_name, name))
 	  sec->name = sec->uncompressed_name;
 	else
 	  sec->name = sec->compressed_name;

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [patch] More DWARF-4 support
  2009-09-22 20:27             ` Cary Coutant
@ 2009-09-23 21:42               ` Cary Coutant
  2009-09-23 21:54               ` Tom Tromey
  2009-09-24 13:14               ` Nick Clifton
  2 siblings, 0 replies; 15+ messages in thread
From: Cary Coutant @ 2009-09-23 21:42 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Binutils

> I've added the DWARF extensions document as an HTML page at
> wwwdocs/htdocs/projects/thread-annotations.html, which I will send as
> a separate patch, then I'll update the ThreadSafetyAnnotation wiki
> page to point to that page instead of Google Docs.

Update... Cleaning up the HTML proved to be just as painful as marking
it up for the wiki, so I went ahead and put the document on the gcc
wiki:

   http://gcc.gnu.org/wiki/ThreadSafetyAnnotationsInDWARF

The patched dwarf2.h still points to the ThreadSafetyAnnotation page,
which now refers to the new DWARF page. I think that's still the
better starting point, so the patch is unchanged by this.

-cary

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [patch] More DWARF-4 support
  2009-09-22 20:27             ` Cary Coutant
  2009-09-23 21:42               ` Cary Coutant
@ 2009-09-23 21:54               ` Tom Tromey
  2009-09-24 13:14               ` Nick Clifton
  2 siblings, 0 replies; 15+ messages in thread
From: Tom Tromey @ 2009-09-23 21:54 UTC (permalink / raw)
  To: Cary Coutant; +Cc: Binutils

>>>>> "Cary" == Cary Coutant <ccoutant@google.com> writes:

>>> I think that for a GNU extension it would be best for the document to be
>>> hosted on a GNU site.  That way we have some amount of control over the
>>> existence and contents of the document.

Cary> I've updated the patch so that dwarf2.h now points to the
Cary> ThreadSafetyAnnotation wiki page for the thread safety extensions, and
Cary> to the just-created DwarfSeparateTypeInfo wiki page for the
Cary> DW_AT_odr_signature attribute.

Thanks, I appreciate this.

Someone else will have to approve the patch.  FWIW, though, the dwarf2.h
bits look unobjectionable to me.

Tom

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [patch] More DWARF-4 support
  2009-09-22 20:27             ` Cary Coutant
  2009-09-23 21:42               ` Cary Coutant
  2009-09-23 21:54               ` Tom Tromey
@ 2009-09-24 13:14               ` Nick Clifton
  2009-09-24 21:21                 ` Cary Coutant
  2 siblings, 1 reply; 15+ messages in thread
From: Nick Clifton @ 2009-09-24 13:14 UTC (permalink / raw)
  To: Cary Coutant; +Cc: Tom Tromey, Binutils

Hi Cary,

> include/
> 
> 	* dwarf2.h (DW_TAG_rvalue_reference_type, DW_TAG_template_alias):
> 	New tags.
> 	(DW_FORM_ref_sig8): New name for DW_FORM_sig8.
> 	(DW_AT_main_subprogram, DW_AT_data_bit_offset, DW_AT_const_expr,
> 	DW_AT_enum_class, DW_AT_linkage_name, DW_AT_GNU_guarded_by,
> 	DW_AT_GNU_pt_guarded_by, DW_AT_GNU_guarded, DW_AT_GNU_pt_guarded,
> 	DW_AT_GNU_locks_excluded, DW_AT_GNU_exclusive_locks_required,
> 	DW_AT_GNU_shared_locks_required, DW_AT_GNU_odr_signature): New
> 	attributes.
> 	(DW_LANG_Python): New language.
> 
> binutils/
> 
> 	* dwarf.c (get_TAG_name): Add missing DWARF-3 and new DWARF-4 tags.
> 	(get_FORM_name): Add new DWARF-4 forms.
> 	(read_and_display_attr_value): Add DW_FORM_ref_sig8, DW_LANG_Python.
> 	(get_AT_name): Add new DWARF-4 and GNU-specific attributes.
> 	(process_debug_info): Add do_types parameter; change all callers.
> 	Add support for .debug_types sections.
> 	(display_debug_types): New function.
> 	(debug_displays): Add .debug_types section.
> 	* readelf.c (process_section_headers): Add .debug_types section.
> 	(display_debug_section): Simplify call to streq.
> 

Approved - please apply.

Cheers
   Nick

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [patch] More DWARF-4 support
  2009-09-24 13:14               ` Nick Clifton
@ 2009-09-24 21:21                 ` Cary Coutant
  2009-09-25  5:10                   ` Ian Lance Taylor
  0 siblings, 1 reply; 15+ messages in thread
From: Cary Coutant @ 2009-09-24 21:21 UTC (permalink / raw)
  To: Nick Clifton; +Cc: Tom Tromey, Binutils

>> include/
>>
>>        * dwarf2.h (DW_TAG_rvalue_reference_type, DW_TAG_template_alias):
>>        New tags.
>>        (DW_FORM_ref_sig8): New name for DW_FORM_sig8.
>>        (DW_AT_main_subprogram, DW_AT_data_bit_offset, DW_AT_const_expr,
>>        DW_AT_enum_class, DW_AT_linkage_name, DW_AT_GNU_guarded_by,
>>        DW_AT_GNU_pt_guarded_by, DW_AT_GNU_guarded, DW_AT_GNU_pt_guarded,
>>        DW_AT_GNU_locks_excluded, DW_AT_GNU_exclusive_locks_required,
>>        DW_AT_GNU_shared_locks_required, DW_AT_GNU_odr_signature): New
>>        attributes.
>>        (DW_LANG_Python): New language.
>>
>> binutils/
>>
>>        * dwarf.c (get_TAG_name): Add missing DWARF-3 and new DWARF-4 tags.
>>        (get_FORM_name): Add new DWARF-4 forms.
>>        (read_and_display_attr_value): Add DW_FORM_ref_sig8,
>> DW_LANG_Python.
>>        (get_AT_name): Add new DWARF-4 and GNU-specific attributes.
>>        (process_debug_info): Add do_types parameter; change all callers.
>>        Add support for .debug_types sections.
>>        (display_debug_types): New function.
>>        (debug_displays): Add .debug_types section.
>>        * readelf.c (process_section_headers): Add .debug_types section.
>>        (display_debug_section): Simplify call to streq.
>>
>
> Approved - please apply.

What's the process for keeping include/dwarf2.h in sync with the gcc
tree? Does that happen automatically now, or should I send a patch to
gcc-patches as well?

-cary

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [patch] More DWARF-4 support
  2009-09-24 21:21                 ` Cary Coutant
@ 2009-09-25  5:10                   ` Ian Lance Taylor
  2009-09-25 16:33                     ` DJ Delorie
  0 siblings, 1 reply; 15+ messages in thread
From: Ian Lance Taylor @ 2009-09-25  5:10 UTC (permalink / raw)
  To: Cary Coutant; +Cc: Nick Clifton, Tom Tromey, Binutils, dj

Cary Coutant <ccoutant@google.com> writes:

> What's the process for keeping include/dwarf2.h in sync with the gcc
> tree? Does that happen automatically now, or should I send a patch to
> gcc-patches as well?

I've CC'ed DJ to ask whether it happens automatically--I can never
remember whether the automatic syncer covers files in include.

But if it does happen automatically, then it goes from the gcc side to
the binutils side, so you should send your patch to gcc-patches
anyhow.  I'll preapprove it on the gcc side, so you can send the
patch, report it as approved by me, and commit it.

Ian

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [patch] More DWARF-4 support
  2009-09-25  5:10                   ` Ian Lance Taylor
@ 2009-09-25 16:33                     ` DJ Delorie
  0 siblings, 0 replies; 15+ messages in thread
From: DJ Delorie @ 2009-09-25 16:33 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: ccoutant, nickc, tromey, binutils


> I've CC'ed DJ to ask whether it happens automatically--I can never
> remember whether the automatic syncer covers files in include.

It's semi-automatic from gcc to src, and includes include, intl,
libdecnumber, and libiberty.  The include/* rule is: if gcc has a
copy, that's the master copy.

The cron job does everything but the final commit, which is wrapped in
a script it generates.  I just run the script when it tells me to.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-09-25 16:33 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-20  1:38 [patch] More DWARF-4 support Cary Coutant
2009-08-28 18:48 ` Cary Coutant
2009-08-28 19:32 ` Tom Tromey
2009-08-28 20:14   ` Cary Coutant
2009-08-29  0:12     ` Tom Tromey
2009-08-29  0:40       ` Cary Coutant
2009-08-31 22:30         ` Tom Tromey
2009-09-04  0:57           ` Cary Coutant
2009-09-22 20:27             ` Cary Coutant
2009-09-23 21:42               ` Cary Coutant
2009-09-23 21:54               ` Tom Tromey
2009-09-24 13:14               ` Nick Clifton
2009-09-24 21:21                 ` Cary Coutant
2009-09-25  5:10                   ` Ian Lance Taylor
2009-09-25 16:33                     ` DJ Delorie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).