public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
From: jkratoch@sourceware.org
To: archer-commits@sourceware.org
Subject: [SCM]  users/jkratoch/dwarf5gcc-gdb: .
Date: Tue, 15 Nov 2016 21:48:00 -0000	[thread overview]
Message-ID: <20161115214838.57662.qmail@sourceware.org> (raw)

The branch, users/jkratoch/dwarf5gcc-gdb has been updated
       via  8aa283e8758ef15b2f4d3fd53371b865de6f0ba9 (commit)
       via  7ea4d982c44088b89ce4366d3f48f2067d518948 (commit)
      from  5081154c2e916bbfd514f991bf0a0dc468c81fa7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 8aa283e8758ef15b2f4d3fd53371b865de6f0ba9
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Nov 15 22:48:18 2016 +0100

    .

commit 7ea4d982c44088b89ce4366d3f48f2067d518948
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Nov 15 22:34:21 2016 +0100

    .

-----------------------------------------------------------------------

Summary of changes:
 binutils/dwarf.c |   56 +++++++++++++++++++-------------------
 gdb/dwarf2read.c |   78 +++++++++++++++++++++++++++--------------------------
 2 files changed, 68 insertions(+), 66 deletions(-)

First 500 lines of diff:
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 5253f0b..b778014 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -4508,9 +4508,9 @@ display_debug_macro (struct dwarf_section *section,
       unsigned char **extended_ops = NULL;
 
       SAFE_BYTE_GET_AND_INC (version, curr, 2, end);
-      if (version != 4)
+      if (version != 4 && version != 5)
 	{
-	  error (_("Only GNU extension to DWARF 4 of %s is currently supported.\n"),
+	  error (_("Only GNU extension to DWARF 4 or 5 of %s is currently supported.\n"),
 		 section->name);
 	  return 0;
 	}
@@ -4547,10 +4547,10 @@ display_debug_macro (struct dwarf_section *section,
 		  nargs = read_uleb128 (curr, &bytes_read, end);
 		  curr += bytes_read;
 		  if (nargs == 0)
-		    printf (_("    DW_MACRO_GNU_%02x has no arguments\n"), op);
+		    printf (_("    DW_MACRO_%02x has no arguments\n"), op);
 		  else
 		    {
-		      printf (_("    DW_MACRO_GNU_%02x arguments: "), op);
+		      printf (_("    DW_MACRO_%02x arguments: "), op);
 		      for (n = 0; n < nargs; n++)
 			{
 			  unsigned int form;
@@ -4603,7 +4603,7 @@ display_debug_macro (struct dwarf_section *section,
 
 	  switch (op)
 	    {
-	    case DW_MACRO_GNU_start_file:
+	    case DW_MACRO_start_file:
 	      {
 		unsigned int filenum;
 		unsigned char *file_name = NULL, *dir_name = NULL;
@@ -4614,87 +4614,87 @@ display_debug_macro (struct dwarf_section *section,
 		curr += bytes_read;
 
 		if ((flags & 2) == 0)
-		  error (_("DW_MACRO_GNU_start_file used, but no .debug_line offset provided.\n"));
+		  error (_("DW_MACRO_start_file used, but no .debug_line offset provided.\n"));
 		else
 		  file_name
 		    = get_line_filename_and_dirname (line_offset, filenum,
 						     &dir_name);
 		if (file_name == NULL)
-		  printf (_(" DW_MACRO_GNU_start_file - lineno: %d filenum: %d\n"),
+		  printf (_(" DW_MACRO_start_file - lineno: %d filenum: %d\n"),
 			  lineno, filenum);
 		else
-		  printf (_(" DW_MACRO_GNU_start_file - lineno: %d filenum: %d filename: %s%s%s\n"),
+		  printf (_(" DW_MACRO_start_file - lineno: %d filenum: %d filename: %s%s%s\n"),
 			  lineno, filenum,
 			  dir_name != NULL ? (const char *) dir_name : "",
 			  dir_name != NULL ? "/" : "", file_name);
 	      }
 	      break;
 
-	    case DW_MACRO_GNU_end_file:
-	      printf (_(" DW_MACRO_GNU_end_file\n"));
+	    case DW_MACRO_end_file:
+	      printf (_(" DW_MACRO_end_file\n"));
 	      break;
 
-	    case DW_MACRO_GNU_define:
+	    case DW_MACRO_define:
 	      lineno = read_uleb128 (curr, &bytes_read, end);
 	      curr += bytes_read;
 	      string = curr;
 	      curr += strnlen ((char *) string, end - string) + 1;
-	      printf (_(" DW_MACRO_GNU_define - lineno : %d macro : %s\n"),
+	      printf (_(" DW_MACRO_define - lineno : %d macro : %s\n"),
 		      lineno, string);
 	      break;
 
-	    case DW_MACRO_GNU_undef:
+	    case DW_MACRO_undef:
 	      lineno = read_uleb128 (curr, &bytes_read, end);
 	      curr += bytes_read;
 	      string = curr;
 	      curr += strnlen ((char *) string, end - string) + 1;
-	      printf (_(" DW_MACRO_GNU_undef - lineno : %d macro : %s\n"),
+	      printf (_(" DW_MACRO_undef - lineno : %d macro : %s\n"),
 		      lineno, string);
 	      break;
 
-	    case DW_MACRO_GNU_define_indirect:
+	    case DW_MACRO_define_strp:
 	      lineno = read_uleb128 (curr, &bytes_read, end);
 	      curr += bytes_read;
 	      SAFE_BYTE_GET_AND_INC (offset, curr, offset_size, end);
 	      string = fetch_indirect_string (offset);
-	      printf (_(" DW_MACRO_GNU_define_indirect - lineno : %d macro : %s\n"),
+	      printf (_(" DW_MACRO_define_strp - lineno : %d macro : %s\n"),
 		      lineno, string);
 	      break;
 
-	    case DW_MACRO_GNU_undef_indirect:
+	    case DW_MACRO_undef_strp:
 	      lineno = read_uleb128 (curr, &bytes_read, end);
 	      curr += bytes_read;
 	      SAFE_BYTE_GET_AND_INC (offset, curr, offset_size, end);
 	      string = fetch_indirect_string (offset);
-	      printf (_(" DW_MACRO_GNU_undef_indirect - lineno : %d macro : %s\n"),
+	      printf (_(" DW_MACRO_undef_strp - lineno : %d macro : %s\n"),
 		      lineno, string);
 	      break;
 
-	    case DW_MACRO_GNU_transparent_include:
+	    case DW_MACRO_import:
 	      SAFE_BYTE_GET_AND_INC (offset, curr, offset_size, end);
-	      printf (_(" DW_MACRO_GNU_transparent_include - offset : 0x%lx\n"),
+	      printf (_(" DW_MACRO_import - offset : 0x%lx\n"),
 		      (unsigned long) offset);
 	      break;
 
-	    case DW_MACRO_GNU_define_indirect_alt:
+	    case DW_MACRO_define_sup:
 	      lineno = read_uleb128 (curr, &bytes_read, end);
 	      curr += bytes_read;
 	      SAFE_BYTE_GET_AND_INC (offset, curr, offset_size, end);
-	      printf (_(" DW_MACRO_GNU_define_indirect_alt - lineno : %d macro offset : 0x%lx\n"),
+	      printf (_(" DW_MACRO_define_sup - lineno : %d macro offset : 0x%lx\n"),
 		      lineno, (unsigned long) offset);
 	      break;
 
-	    case DW_MACRO_GNU_undef_indirect_alt:
+	    case DW_MACRO_undef_sup:
 	      lineno = read_uleb128 (curr, &bytes_read, end);
 	      curr += bytes_read;
 	      SAFE_BYTE_GET_AND_INC (offset, curr, offset_size, end);
-	      printf (_(" DW_MACRO_GNU_undef_indirect_alt - lineno : %d macro offset : 0x%lx\n"),
+	      printf (_(" DW_MACRO_undef_sup - lineno : %d macro offset : 0x%lx\n"),
 		      lineno, (unsigned long) offset);
 	      break;
 
-	    case DW_MACRO_GNU_transparent_include_alt:
+	    case DW_MACRO_import_sup:
 	      SAFE_BYTE_GET_AND_INC (offset, curr, offset_size, end);
-	      printf (_(" DW_MACRO_GNU_transparent_include_alt - offset : 0x%lx\n"),
+	      printf (_(" DW_MACRO_import_sup - offset : 0x%lx\n"),
 		      (unsigned long) offset);
 	      break;
 
@@ -4713,10 +4713,10 @@ display_debug_macro (struct dwarf_section *section,
 		  desc += bytes_read;
 		  if (nargs == 0)
 		    {
-		      printf (_(" DW_MACRO_GNU_%02x\n"), op);
+		      printf (_(" DW_MACRO_%02x\n"), op);
 		      break;
 		    }
-		  printf (_(" DW_MACRO_GNU_%02x -"), op);
+		  printf (_(" DW_MACRO_%02x -"), op);
 		  for (n = 0; n < nargs; n++)
 		    {
 		      int val;
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 61c948a..714253b 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -9326,12 +9326,14 @@ read_file_scope (struct die_info *die, struct dwarf2_cu *cu)
      refers to information in the line number info statement program
      header, so we can only read it if we've read the header
      successfully.  */
-  attr = dwarf2_attr (die, DW_AT_GNU_macros, cu);
+  attr = dwarf2_attr (die, DW_AT_macros, cu);
+  if (attr == NULL)
+    attr = dwarf2_attr (die, DW_AT_GNU_macros, cu);
   if (attr && cu->line_header)
     {
       if (dwarf2_attr (die, DW_AT_macro_info, cu))
 	complaint (&symfile_complaints,
-		   _("CU refers to both DW_AT_GNU_macros and DW_AT_macro_info"));
+		   _("CU refers to both DW_AT_macros and DW_AT_macro_info"));
 
       dwarf_decode_macros (cu, DW_UNSND (attr), 1);
     }
@@ -21691,7 +21693,7 @@ dwarf_parse_macro_header (const gdb_byte **opcode_definitions,
       unsigned int version, flags;
 
       version = read_2_bytes (abfd, mac_ptr);
-      if (version != 4)
+      if (version != 4 && version != 5)
 	{
 	  complaint (&symfile_complaints,
 		     _("unrecognized version `%d' in .debug_macro section"),
@@ -21734,7 +21736,7 @@ dwarf_parse_macro_header (const gdb_byte **opcode_definitions,
 }
 
 /* A helper for dwarf_decode_macros that handles the GNU extensions,
-   including DW_MACRO_GNU_transparent_include.  */
+   including DW_MACRO_import.  */
 
 static void
 dwarf_decode_macro_bytes (bfd *abfd,
@@ -21789,12 +21791,12 @@ dwarf_decode_macro_bytes (bfd *abfd,
 	case 0:
 	  break;
 
-        case DW_MACRO_GNU_define:
-        case DW_MACRO_GNU_undef:
-	case DW_MACRO_GNU_define_indirect:
-	case DW_MACRO_GNU_undef_indirect:
-	case DW_MACRO_GNU_define_indirect_alt:
-	case DW_MACRO_GNU_undef_indirect_alt:
+        case DW_MACRO_define:
+        case DW_MACRO_undef:
+	case DW_MACRO_define_strp:
+	case DW_MACRO_undef_strp:
+	case DW_MACRO_define_sup:
+	case DW_MACRO_undef_sup:
           {
             unsigned int bytes_read;
             int line;
@@ -21804,8 +21806,8 @@ dwarf_decode_macro_bytes (bfd *abfd,
 	    line = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read);
 	    mac_ptr += bytes_read;
 
-	    if (macinfo_type == DW_MACRO_GNU_define
-		|| macinfo_type == DW_MACRO_GNU_undef)
+	    if (macinfo_type == DW_MACRO_define
+		|| macinfo_type == DW_MACRO_undef)
 	      {
 		body = read_direct_string (abfd, mac_ptr, &bytes_read);
 		mac_ptr += bytes_read;
@@ -21817,8 +21819,8 @@ dwarf_decode_macro_bytes (bfd *abfd,
 		str_offset = read_offset_1 (abfd, mac_ptr, offset_size);
 		mac_ptr += offset_size;
 
-		if (macinfo_type == DW_MACRO_GNU_define_indirect_alt
-		    || macinfo_type == DW_MACRO_GNU_undef_indirect_alt
+		if (macinfo_type == DW_MACRO_define_sup
+		    || macinfo_type == DW_MACRO_undef_sup
 		    || section_is_dwz)
 		  {
 		    struct dwz_file *dwz = dwarf2_get_dwz_file ();
@@ -21829,9 +21831,9 @@ dwarf_decode_macro_bytes (bfd *abfd,
 		  body = read_indirect_string_at_offset (abfd, str_offset);
 	      }
 
-	    is_define = (macinfo_type == DW_MACRO_GNU_define
-			 || macinfo_type == DW_MACRO_GNU_define_indirect
-			 || macinfo_type == DW_MACRO_GNU_define_indirect_alt);
+	    is_define = (macinfo_type == DW_MACRO_define
+			 || macinfo_type == DW_MACRO_define_strp
+			 || macinfo_type == DW_MACRO_define_sup);
             if (! current_file)
 	      {
 		/* DWARF violation as no main source is present.  */
@@ -21854,15 +21856,15 @@ dwarf_decode_macro_bytes (bfd *abfd,
 	      parse_macro_definition (current_file, line, body);
 	    else
 	      {
-		gdb_assert (macinfo_type == DW_MACRO_GNU_undef
-			    || macinfo_type == DW_MACRO_GNU_undef_indirect
-			    || macinfo_type == DW_MACRO_GNU_undef_indirect_alt);
+		gdb_assert (macinfo_type == DW_MACRO_undef
+			    || macinfo_type == DW_MACRO_undef_strp
+			    || macinfo_type == DW_MACRO_undef_sup);
 		macro_undef (current_file, line, body);
 	      }
           }
           break;
 
-        case DW_MACRO_GNU_start_file:
+        case DW_MACRO_start_file:
           {
             unsigned int bytes_read;
             int line, file;
@@ -21882,7 +21884,7 @@ dwarf_decode_macro_bytes (bfd *abfd,
 
 	    if (at_commandline)
 	      {
-		/* This DW_MACRO_GNU_start_file was executed in the
+		/* This DW_MACRO_start_file was executed in the
 		   pass one.  */
 		at_commandline = 0;
 	      }
@@ -21891,7 +21893,7 @@ dwarf_decode_macro_bytes (bfd *abfd,
           }
           break;
 
-        case DW_MACRO_GNU_end_file:
+        case DW_MACRO_end_file:
           if (! current_file)
 	    complaint (&symfile_complaints,
 		       _("macro debug info has an unmatched "
@@ -21930,8 +21932,8 @@ dwarf_decode_macro_bytes (bfd *abfd,
             }
           break;
 
-	case DW_MACRO_GNU_transparent_include:
-	case DW_MACRO_GNU_transparent_include_alt:
+	case DW_MACRO_import:
+	case DW_MACRO_import_sup:
 	  {
 	    LONGEST offset;
 	    void **slot;
@@ -21944,7 +21946,7 @@ dwarf_decode_macro_bytes (bfd *abfd,
 	    offset = read_offset_1 (abfd, mac_ptr, offset_size);
 	    mac_ptr += offset_size;
 
-	    if (macinfo_type == DW_MACRO_GNU_transparent_include_alt)
+	    if (macinfo_type == DW_MACRO_import_sup)
 	      {
 		struct dwz_file *dwz = dwarf2_get_dwz_file ();
 
@@ -21964,7 +21966,7 @@ dwarf_decode_macro_bytes (bfd *abfd,
 		/* This has actually happened; see
 		   http://sourceware.org/bugzilla/show_bug.cgi?id=13568.  */
 		complaint (&symfile_complaints,
-			   _("recursive DW_MACRO_GNU_transparent_include in "
+			   _("recursive DW_MACRO_import in "
 			     ".debug_macro section"));
 	      }
 	    else
@@ -22107,8 +22109,8 @@ dwarf_decode_macros (struct dwarf2_cu *cu, unsigned int offset,
         case 0:
 	  break;
 
-	case DW_MACRO_GNU_define:
-	case DW_MACRO_GNU_undef:
+	case DW_MACRO_define:
+	case DW_MACRO_undef:
 	  /* Only skip the data by MAC_PTR.  */
 	  {
 	    unsigned int bytes_read;
@@ -22120,7 +22122,7 @@ dwarf_decode_macros (struct dwarf2_cu *cu, unsigned int offset,
 	  }
 	  break;
 
-	case DW_MACRO_GNU_start_file:
+	case DW_MACRO_start_file:
 	  {
 	    unsigned int bytes_read;
 	    int line, file;
@@ -22134,14 +22136,14 @@ dwarf_decode_macros (struct dwarf2_cu *cu, unsigned int offset,
 	  }
 	  break;
 
-	case DW_MACRO_GNU_end_file:
+	case DW_MACRO_end_file:
 	  /* No data to skip by MAC_PTR.  */
 	  break;
 
-	case DW_MACRO_GNU_define_indirect:
-	case DW_MACRO_GNU_undef_indirect:
-	case DW_MACRO_GNU_define_indirect_alt:
-	case DW_MACRO_GNU_undef_indirect_alt:
+	case DW_MACRO_define_strp:
+	case DW_MACRO_undef_strp:
+	case DW_MACRO_define_sup:
+	case DW_MACRO_undef_sup:
 	  {
 	    unsigned int bytes_read;
 
@@ -22151,10 +22153,10 @@ dwarf_decode_macros (struct dwarf2_cu *cu, unsigned int offset,
 	  }
 	  break;
 
-	case DW_MACRO_GNU_transparent_include:
-	case DW_MACRO_GNU_transparent_include_alt:
+	case DW_MACRO_import:
+	case DW_MACRO_import_sup:
 	  /* Note that, according to the spec, a transparent include
-	     chain cannot call DW_MACRO_GNU_start_file.  So, we can just
+	     chain cannot call DW_MACRO_start_file.  So, we can just
 	     skip this opcode.  */
 	  mac_ptr += offset_size;
 	  break;


hooks/post-receive
--
Repository for Project Archer.


             reply	other threads:[~2016-11-15 21:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-15 21:48 jkratoch [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-11-13 19:17 jkratoch
2016-11-07 22:51 jkratoch
2016-11-03 18:32 jkratoch
2016-11-02 20:53 jkratoch
2016-11-02 20:46 jkratoch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161115214838.57662.qmail@sourceware.org \
    --to=jkratoch@sourceware.org \
    --cc=archer-commits@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).