Remove ppc860, ppc750cl, ppc7450 insns from common ppc.
[binutils-gdb.git] / binutils / dwarf.c
index dad381f34943b0ddb388dd35fb22094cb0f58963..c3dc814204f6589124423431a4023c3e90610365 100644 (file)
@@ -284,7 +284,7 @@ read_leb128 (unsigned char *data,
 
       /* PR 17512: file: 0ca183b8.
         FIXME: Should we signal this error somehow ?  */
-      if (shift >= sizeof (result))
+      if (shift >= sizeof (result) * 8)
        break;
     }
 
@@ -2006,6 +2006,8 @@ read_and_display_attr_value (unsigned long attribute,
        case DW_ATE_HP_floathpintel:    printf ("(HP_floathpintel)"); break;
        case DW_ATE_HP_imaginary_float80:       printf ("(HP_imaginary_float80)"); break;
        case DW_ATE_HP_imaginary_float128:      printf ("(HP_imaginary_float128)"); break;
+         /* DWARF 4 values:  */
+       case DW_ATE_UTF:                printf ("(unicode string)"); break;
 
        default:
          if (uvalue >= DW_ATE_lo_user
@@ -2759,18 +2761,20 @@ read_debug_line_header (struct dwarf_section * section,
 
   if (linfo->li_length + initial_length_size > section->size)
     {
-      /* If the length is just a bias against the initial_length_size then
-        this means that the field has a relocation against it which has not
-        been applied.  (Ie we are dealing with an object file, not a linked
-        binary).  Do not complain but instead assume that the rest of the
-        section applies to this particular header.  */
-      if (linfo->li_length == - initial_length_size)
+      /* If the length field has a relocation against it, then we should
+        not complain if it is inaccurate (and probably negative).  This
+        happens in object files when the .debug_line section is actually
+        comprised of several different .debug_line.* sections, (some of
+        which may be removed by linker garbage collection), and a relocation
+        is used to compute the correct length once that is done.  */
+      if (reloc_at (section, (hdrptr - section->start) - offset_size))
        {
-         linfo->li_length = section->size - initial_length_size;
+         linfo->li_length = (end - data) - initial_length_size;
        }
       else
        {
-         warn (_("The line info appears to be corrupt - the section is too small\n"));
+         warn (_("The length field (0x%lx) in the debug_line header is wrong - the section is too small\n"),
+               (long) linfo->li_length);
          return NULL;
        }
     }
@@ -4365,6 +4369,8 @@ display_loc_list (struct dwarf_section *section,
 
   while (1)
     {
+      unsigned long off = offset + (start - *start_ptr);
+
       if (start + 2 * pointer_size > section_end)
        {
          warn (_("Location list starting at offset 0x%lx is not terminated.\n"),
@@ -4372,7 +4378,7 @@ display_loc_list (struct dwarf_section *section,
          break;
        }
 
-      printf ("    %8.8lx ", offset + (start - *start_ptr));
+      printf ("    %8.8lx ", off);
 
       /* Note: we use sign extension here in order to be sure that we can detect
         the -1 escape value.  Sign extension into the top 32 bits of a 32-bit
@@ -4383,8 +4389,18 @@ display_loc_list (struct dwarf_section *section,
 
       if (begin == 0 && end == 0)
        {
-         printf (_("<End of list>\n"));
-         break;
+         /* PR 18374: In a object file we can have a location list that
+            starts with a begin and end of 0 because there are relocations
+            that need to be applied to the addresses.  Actually applying
+            the relocations now does not help as they will probably resolve
+            to 0, since the object file has not been fully linked.  Real
+            end of list markers will not have any relocations against them.  */
+         if (! reloc_at (section, off)
+             && ! reloc_at (section, off + pointer_size))
+           {
+             printf (_("<End of list>\n"));
+             break;
+           }
        }
 
       /* Check base address specifiers.  */
@@ -4605,7 +4621,6 @@ display_debug_loc (struct dwarf_section *section, void *file)
   unsigned int first = 0;
   unsigned int i;
   unsigned int j;
-  unsigned int k;
   int seen_first_offset = 0;
   int locs_sorted = 1;
   unsigned char *next;
@@ -4681,13 +4696,16 @@ display_debug_loc (struct dwarf_section *section, void *file)
   if (!locs_sorted)
     array = (unsigned int *) xcmalloc (num_loc_list, sizeof (unsigned int));
   printf (_("Contents of the %s section:\n\n"), section->name);
-  printf (_("    Offset   Begin    End      Expression\n"));
+  if (reloc_at (section, 0))
+    printf (_(" Warning: This section has relocations - addresses seen here may not be accurate.\n\n"));
+  printf (_("    Offset   Begin            End              Expression\n"));
 
   seen_first_offset = 0;
   for (i = first; i < num_debug_info_entries; i++)
     {
       unsigned long offset;
       unsigned long base_address;
+      unsigned int k;
       int has_frame_base;
 
       if (!locs_sorted)
@@ -4719,11 +4737,11 @@ display_debug_loc (struct dwarf_section *section, void *file)
              if (start < next)
                warn (_("There is a hole [0x%lx - 0x%lx] in .debug_loc section.\n"),
                      (unsigned long) (start - section_begin),
-                     (unsigned long) (next - section_begin));
+                     (unsigned long) offset);
              else if (start > next)
                warn (_("There is an overlap [0x%lx - 0x%lx] in .debug_loc section.\n"),
                      (unsigned long) (start - section_begin),
-                     (unsigned long) (next - section_begin));
+                     (unsigned long) offset);
            }
          start = next;
 
@@ -4923,7 +4941,13 @@ display_debug_aranges (struct dwarf_section *section,
       if (excess)
        addr_ranges += (2 * address_size) - excess;
 
-      start += arange.ar_length + initial_length_size;
+      hdrptr = start + arange.ar_length + initial_length_size;
+      if (hdrptr < start || hdrptr > end)
+       {
+         error (_("Excessive header length: %lx\n"), (long) arange.ar_length);
+         break;
+       }
+      start = hdrptr;
 
       while (addr_ranges + 2 * address_size <= start)
        {
@@ -5238,7 +5262,7 @@ typedef struct Frame_Chunk
   dwarf_vma pc_begin;
   dwarf_vma pc_range;
   int cfa_reg;
-  int cfa_offset;
+  dwarf_vma cfa_offset;
   unsigned int ra;
   unsigned char fde_encoding;
   unsigned char cfa_exp;
@@ -5330,6 +5354,27 @@ static const char *const dwarf_regnames_i386[] =
   "k0", "k1", "k2", "k3", "k4", "k5", "k6", "k7"  /* 93 - 100  */
 };
 
+static const char *const dwarf_regnames_iamcu[] =
+{
+  "eax", "ecx", "edx", "ebx",                    /* 0 - 3  */
+  "esp", "ebp", "esi", "edi",                    /* 4 - 7  */
+  "eip", "eflags", NULL,                         /* 8 - 10  */
+  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 11 - 18  */
+  NULL, NULL,                                    /* 19 - 20  */
+  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 21 - 28  */
+  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 29 - 36  */
+  NULL, NULL, NULL,                              /* 37 - 39  */
+  "es", "cs", "ss", "ds", "fs", "gs", NULL, NULL, /* 40 - 47  */
+  "tr", "ldtr",                                          /* 48 - 49  */
+  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 50 - 57  */
+  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 58 - 65  */
+  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 66 - 73  */
+  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 74 - 81  */
+  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 82 - 89  */
+  NULL, NULL, NULL,                              /* 90 - 92  */
+  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL  /* 93 - 100  */
+};
+
 void
 init_dwarf_regnames_i386 (void)
 {
@@ -5337,6 +5382,13 @@ init_dwarf_regnames_i386 (void)
   dwarf_regnames_count = ARRAY_SIZE (dwarf_regnames_i386);
 }
 
+void
+init_dwarf_regnames_iamcu (void)
+{
+  dwarf_regnames = dwarf_regnames_iamcu;
+  dwarf_regnames_count = ARRAY_SIZE (dwarf_regnames_iamcu);
+}
+
 static const char *const dwarf_regnames_x86_64[] =
 {
   "rax", "rdx", "rcx", "rbx",
@@ -5405,10 +5457,13 @@ init_dwarf_regnames (unsigned int e_machine)
   switch (e_machine)
     {
     case EM_386:
-    case EM_486:
       init_dwarf_regnames_i386 ();
       break;
 
+    case EM_IAMCU:
+      init_dwarf_regnames_iamcu ();
+      break;
+
     case EM_X86_64:
     case EM_L1OM:
     case EM_K1OM:
@@ -5475,7 +5530,7 @@ frame_display_row (Frame_Chunk *fc, int *need_col_headers, unsigned int *max_reg
   if (fc->cfa_exp)
     strcpy (tmp, "exp");
   else
-    sprintf (tmp, "%s%+d", regname (fc->cfa_reg, 1), fc->cfa_offset);
+    sprintf (tmp, "%s%+d", regname (fc->cfa_reg, 1), (int) fc->cfa_offset);
   printf ("%-8s ", tmp);
 
   for (r = 0; r < fc->ncols; r++)
@@ -5915,7 +5970,15 @@ display_debug_frames (struct dwarf_section *section,
 
          segment_selector = 0;
          if (fc->segment_size)
-           SAFE_BYTE_GET_AND_INC (segment_selector, start, fc->segment_size, end);
+           {
+             if (fc->segment_size > sizeof (segment_selector))
+               {
+                 /* PR 17512: file: 9e196b3e.  */
+                 warn (_("Probably corrupt segment size: %d - using 4 instead\n"), fc->segment_size);
+                 fc->segment_size = 4;
+               }
+             SAFE_BYTE_GET_AND_INC (segment_selector, start, fc->segment_size, end);
+           }
 
          fc->pc_begin = get_encoded_value (&start, fc->fde_encoding, section, end);
 
@@ -6117,7 +6180,7 @@ display_debug_frames (struct dwarf_section *section,
          unsigned char * tmp;
          unsigned op, opa;
          unsigned long ul, reg, roffs;
-         long l;
+         dwarf_vma l;
          dwarf_vma ofs;
          dwarf_vma vma;
          const char *reg_prefix = "";
@@ -6369,7 +6432,7 @@ display_debug_frames (struct dwarf_section *section,
              fc->cfa_exp = 0;
              if (! do_debug_frames_interp)
                printf ("  DW_CFA_def_cfa: %s ofs %d\n",
-                       regname (fc->cfa_reg, 0), fc->cfa_offset);
+                       regname (fc->cfa_reg, 0), (int) fc->cfa_offset);
              break;
 
            case DW_CFA_def_cfa_register:
@@ -6383,7 +6446,7 @@ display_debug_frames (struct dwarf_section *section,
            case DW_CFA_def_cfa_offset:
              fc->cfa_offset = LEB ();
              if (! do_debug_frames_interp)
-               printf ("  DW_CFA_def_cfa_offset: %d\n", fc->cfa_offset);
+               printf ("  DW_CFA_def_cfa_offset: %d\n", (int) fc->cfa_offset);
              break;
 
            case DW_CFA_nop:
@@ -6467,7 +6530,7 @@ display_debug_frames (struct dwarf_section *section,
              if (! do_debug_frames_interp || *reg_prefix != '\0')
                printf ("  DW_CFA_offset_extended_sf: %s%s at cfa%+ld\n",
                        reg_prefix, regname (reg, 0),
-                       l * fc->data_factor);
+                       (long)(l * fc->data_factor));
              if (*reg_prefix == '\0')
                {
                  fc->col_type[reg] = DW_CFA_offset;
@@ -6483,7 +6546,7 @@ display_debug_frames (struct dwarf_section *section,
              if (! do_debug_frames_interp || *reg_prefix != '\0')
                printf ("  DW_CFA_val_offset_sf: %s%s at cfa%+ld\n",
                        reg_prefix, regname (reg, 0),
-                       l * fc->data_factor);
+                       (long)(l * fc->data_factor));
              if (*reg_prefix == '\0')
                {
                  fc->col_type[reg] = DW_CFA_val_offset;
@@ -6498,14 +6561,14 @@ display_debug_frames (struct dwarf_section *section,
              fc->cfa_exp = 0;
              if (! do_debug_frames_interp)
                printf ("  DW_CFA_def_cfa_sf: %s ofs %d\n",
-                       regname (fc->cfa_reg, 0), fc->cfa_offset);
+                       regname (fc->cfa_reg, 0), (int) fc->cfa_offset);
              break;
 
            case DW_CFA_def_cfa_offset_sf:
              fc->cfa_offset = SLEB ();
-             fc->cfa_offset = fc->cfa_offset * fc->data_factor;
+             fc->cfa_offset *= fc->data_factor;
              if (! do_debug_frames_interp)
-               printf ("  DW_CFA_def_cfa_offset_sf: %d\n", fc->cfa_offset);
+               printf ("  DW_CFA_def_cfa_offset_sf: %d\n", (int) fc->cfa_offset);
              break;
 
            case DW_CFA_MIPS_advance_loc8:
@@ -6540,7 +6603,7 @@ display_debug_frames (struct dwarf_section *section,
              if (! do_debug_frames_interp || *reg_prefix != '\0')
                printf ("  DW_CFA_GNU_negative_offset_extended: %s%s at cfa%+ld\n",
                        reg_prefix, regname (reg, 0),
-                       l * fc->data_factor);
+                       (long)(l * fc->data_factor));
              if (*reg_prefix == '\0')
                {
                  fc->col_type[reg] = DW_CFA_offset;
@@ -7020,7 +7083,7 @@ process_cu_tu_index (struct dwarf_section *section, int do_display)
 
       /* PR 17531: file: 0dd159bf.
         Check for wraparound with an overlarge ncols value.  */
-      if ((unsigned int) ((poffsets - ppool) / 4) != ncols)
+      if (poffsets < ppool || (unsigned int) ((poffsets - ppool) / 4) != ncols)
        {
          warn (_("Overlarge number of columns: %x\n"), ncols);
          return 0;
@@ -7084,7 +7147,14 @@ process_cu_tu_index (struct dwarf_section *section, int do_display)
                memcpy (&this_set[row - 1].signature, ph, sizeof (uint64_t));
 
              prow = poffsets + (row - 1) * ncols * 4;
-
+             /* PR 17531: file: b8ce60a8.  */
+             if (prow < poffsets || prow > limit)
+               {
+                 warn (_("Row index (%u) * num columns (%u) > space remaining in section\n"),
+                       row, ncols);
+                 return 0;
+               }
              if (do_display)
                printf (_("  [%3d] 0x%s"),
                        i, dwarf_vmatoa64 (signature_high, signature_low,
@@ -7507,76 +7577,76 @@ dwarf_select_sections_all (void)
 
 struct dwarf_section_display debug_displays[] =
 {
-  { { ".debug_abbrev",     ".zdebug_abbrev",   NULL, NULL, 0, 0, 0, NULL },
-    display_debug_abbrev,   &do_debug_abbrevs, 0 },
-  { { ".debug_aranges",            ".zdebug_aranges",  NULL, NULL, 0, 0, 0, NULL },
-    display_debug_aranges,  &do_debug_aranges, 1 },
-  { { ".debug_frame",       ".zdebug_frame",   NULL, NULL, 0, 0, 0, NULL },
-    display_debug_frames,   &do_debug_frames,  1 },
-  { { ".debug_info",       ".zdebug_info",     NULL, NULL, 0, 0, abbrev, NULL },
-    display_debug_info,            &do_debug_info,     1 },
-  { { ".debug_line",       ".zdebug_line",     NULL, NULL, 0, 0, 0, NULL },
-    display_debug_lines,    &do_debug_lines,   1 },
-  { { ".debug_pubnames",    ".zdebug_pubnames",        NULL, NULL, 0, 0, 0, NULL },
-    display_debug_pubnames, &do_debug_pubnames,        0 },
-  { { ".debug_gnu_pubnames", ".zdebug_gnu_pubnames", NULL, NULL, 0, 0, 0, NULL },
-    display_debug_gnu_pubnames, &do_debug_pubnames, 0 },
-  { { ".eh_frame",         "",                 NULL, NULL, 0, 0, 0, NULL },
-    display_debug_frames,   &do_debug_frames,  1 },
-  { { ".debug_macinfo",            ".zdebug_macinfo",  NULL, NULL, 0, 0, 0, NULL },
-    display_debug_macinfo,  &do_debug_macinfo, 0 },
-  { { ".debug_macro",      ".zdebug_macro",    NULL, NULL, 0, 0, 0, NULL },
-    display_debug_macro,    &do_debug_macinfo, 1 },
-  { { ".debug_str",        ".zdebug_str",      NULL, NULL, 0, 0, 0, NULL },
-    display_debug_str,     &do_debug_str,      0 },
-  { { ".debug_loc",        ".zdebug_loc",      NULL, NULL, 0, 0, 0, NULL },
-    display_debug_loc,     &do_debug_loc,      1 },
-  { { ".debug_pubtypes",    ".zdebug_pubtypes",        NULL, NULL, 0, 0, 0, NULL },
-    display_debug_pubnames, &do_debug_pubtypes,        0 },
-  { { ".debug_gnu_pubtypes", ".zdebug_gnu_pubtypes", NULL, NULL, 0, 0, 0, NULL },
-    display_debug_gnu_pubnames, &do_debug_pubtypes, 0 },
-  { { ".debug_ranges",     ".zdebug_ranges",   NULL, NULL, 0, 0, 0, NULL },
-    display_debug_ranges,   &do_debug_ranges,  1 },
-  { { ".debug_static_func", ".zdebug_static_func", NULL, NULL, 0, 0, 0, NULL },
-    display_debug_not_supported, NULL,         0 },
-  { { ".debug_static_vars", ".zdebug_static_vars", NULL, NULL, 0, 0, 0, NULL },
-    display_debug_not_supported, NULL,         0 },
-  { { ".debug_types",      ".zdebug_types",    NULL, NULL, 0, 0, abbrev, NULL },
-    display_debug_types,    &do_debug_info,    1 },
-  { { ".debug_weaknames",   ".zdebug_weaknames", NULL, NULL, 0, 0, 0, NULL },
-    display_debug_not_supported, NULL,         0 },
-  { { ".gdb_index",        "",                 NULL, NULL, 0, 0, 0, NULL },
-    display_gdb_index,      &do_gdb_index,     0 },
-  { { ".trace_info",       "",                 NULL, NULL, 0, 0, trace_abbrev, NULL },
-    display_trace_info,            &do_trace_info,     1 },
-  { { ".trace_abbrev",     "",                 NULL, NULL, 0, 0, 0, NULL },
-    display_debug_abbrev,   &do_trace_abbrevs, 0 },
-  { { ".trace_aranges",            "",                 NULL, NULL, 0, 0, 0, NULL },
-    display_debug_aranges,  &do_trace_aranges, 0 },
-  { { ".debug_info.dwo",    ".zdebug_info.dwo",        NULL, NULL, 0, 0, abbrev_dwo, NULL },
-    display_debug_info,            &do_debug_info,     1 },
-  { { ".debug_abbrev.dwo",  ".zdebug_abbrev.dwo", NULL, NULL, 0, 0, 0, NULL },
-    display_debug_abbrev,   &do_debug_abbrevs, 0 },
-  { { ".debug_types.dwo",   ".zdebug_types.dwo", NULL, NULL, 0, 0, abbrev_dwo, NULL },
-    display_debug_types,    &do_debug_info,    1 },
-  { { ".debug_line.dwo",    ".zdebug_line.dwo", NULL, NULL, 0, 0, 0, NULL },
-    display_debug_lines,    &do_debug_lines,   1 },
-  { { ".debug_loc.dwo",            ".zdebug_loc.dwo",  NULL, NULL, 0, 0, 0, NULL },
-    display_debug_loc,     &do_debug_loc,      1 },
-  { { ".debug_macro.dwo",   ".zdebug_macro.dwo", NULL, NULL, 0, 0, 0, NULL },
-    display_debug_macro,    &do_debug_macinfo, 1 },
-  { { ".debug_macinfo.dwo", ".zdebug_macinfo.dwo", NULL, NULL, 0, 0, 0, NULL },
-    display_debug_macinfo,  &do_debug_macinfo, 0 },
-  { { ".debug_str.dwo",     ".zdebug_str.dwo",  NULL, NULL, 0, 0, 0, NULL },
-    display_debug_str,      &do_debug_str,     1 },
-  { { ".debug_str_offsets", ".zdebug_str_offsets", NULL, NULL, 0, 0, 0, NULL },
-    display_debug_str_offsets, NULL,           0 },
-  { { ".debug_str_offsets.dwo", ".zdebug_str_offsets.dwo", NULL, NULL, 0, 0, 0, NULL },
-    display_debug_str_offsets, NULL,           0 },
-  { { ".debug_addr",       ".zdebug_addr",     NULL, NULL, 0, 0, 0, NULL },
-    display_debug_addr,     &do_debug_addr,    1 },
-  { { ".debug_cu_index",    "",                        NULL, NULL, 0, 0, 0, NULL },
-    display_cu_index,       &do_debug_cu_index,        0 },
-  { { ".debug_tu_index",    "",                        NULL, NULL, 0, 0, 0, NULL },
-    display_cu_index,       &do_debug_cu_index,        0 },
+  { { ".debug_abbrev",     ".zdebug_abbrev",   NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_abbrev,   &do_debug_abbrevs, FALSE },
+  { { ".debug_aranges",            ".zdebug_aranges",  NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_aranges,  &do_debug_aranges, TRUE },
+  { { ".debug_frame",       ".zdebug_frame",   NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_frames,   &do_debug_frames,  TRUE },
+  { { ".debug_info",       ".zdebug_info",     NULL, NULL, 0, 0, abbrev, NULL, 0, NULL },
+    display_debug_info,            &do_debug_info,     TRUE },
+  { { ".debug_line",       ".zdebug_line",     NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_lines,    &do_debug_lines,   TRUE },
+  { { ".debug_pubnames",    ".zdebug_pubnames",        NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_pubnames, &do_debug_pubnames,        FALSE },
+  { { ".debug_gnu_pubnames", ".zdebug_gnu_pubnames", NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_gnu_pubnames, &do_debug_pubnames, FALSE },
+  { { ".eh_frame",         "",                 NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_frames,   &do_debug_frames,  TRUE },
+  { { ".debug_macinfo",            ".zdebug_macinfo",  NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_macinfo,  &do_debug_macinfo, FALSE },
+  { { ".debug_macro",      ".zdebug_macro",    NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_macro,    &do_debug_macinfo, TRUE },
+  { { ".debug_str",        ".zdebug_str",      NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_str,     &do_debug_str,      FALSE },
+  { { ".debug_loc",        ".zdebug_loc",      NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_loc,     &do_debug_loc,      TRUE },
+  { { ".debug_pubtypes",    ".zdebug_pubtypes",        NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_pubnames, &do_debug_pubtypes,        FALSE },
+  { { ".debug_gnu_pubtypes", ".zdebug_gnu_pubtypes", NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_gnu_pubnames, &do_debug_pubtypes, FALSE },
+  { { ".debug_ranges",     ".zdebug_ranges",   NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_ranges,   &do_debug_ranges,  TRUE },
+  { { ".debug_static_func", ".zdebug_static_func", NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_not_supported, NULL,         FALSE },
+  { { ".debug_static_vars", ".zdebug_static_vars", NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_not_supported, NULL,         FALSE },
+  { { ".debug_types",      ".zdebug_types",    NULL, NULL, 0, 0, abbrev, NULL, 0, NULL },
+    display_debug_types,    &do_debug_info,    TRUE },
+  { { ".debug_weaknames",   ".zdebug_weaknames", NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_not_supported, NULL,         FALSE },
+  { { ".gdb_index",        "",                 NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_gdb_index,      &do_gdb_index,     FALSE },
+  { { ".trace_info",       "",                 NULL, NULL, 0, 0, trace_abbrev, NULL, 0, NULL },
+    display_trace_info,            &do_trace_info,     TRUE },
+  { { ".trace_abbrev",     "",                 NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_abbrev,   &do_trace_abbrevs, FALSE },
+  { { ".trace_aranges",            "",                 NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_aranges,  &do_trace_aranges, FALSE },
+  { { ".debug_info.dwo",    ".zdebug_info.dwo",        NULL, NULL, 0, 0, abbrev_dwo, NULL, 0, NULL },
+    display_debug_info,            &do_debug_info,     TRUE },
+  { { ".debug_abbrev.dwo",  ".zdebug_abbrev.dwo", NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_abbrev,   &do_debug_abbrevs, FALSE },
+  { { ".debug_types.dwo",   ".zdebug_types.dwo", NULL, NULL, 0, 0, abbrev_dwo, NULL, 0, NULL },
+    display_debug_types,    &do_debug_info,    TRUE },
+  { { ".debug_line.dwo",    ".zdebug_line.dwo", NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_lines,    &do_debug_lines,   TRUE },
+  { { ".debug_loc.dwo",            ".zdebug_loc.dwo",  NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_loc,     &do_debug_loc,      TRUE },
+  { { ".debug_macro.dwo",   ".zdebug_macro.dwo", NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_macro,    &do_debug_macinfo, TRUE },
+  { { ".debug_macinfo.dwo", ".zdebug_macinfo.dwo", NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_macinfo,  &do_debug_macinfo, FALSE },
+  { { ".debug_str.dwo",     ".zdebug_str.dwo",  NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_str,      &do_debug_str,     TRUE },
+  { { ".debug_str_offsets", ".zdebug_str_offsets", NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_str_offsets, NULL,           FALSE },
+  { { ".debug_str_offsets.dwo", ".zdebug_str_offsets.dwo", NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_str_offsets, NULL,           FALSE },
+  { { ".debug_addr",       ".zdebug_addr",     NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_debug_addr,     &do_debug_addr,    TRUE },
+  { { ".debug_cu_index",    "",                        NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_cu_index,       &do_debug_cu_index,        FALSE },
+  { { ".debug_tu_index",    "",                        NULL, NULL, 0, 0, 0, NULL, 0, NULL },
+    display_cu_index,       &do_debug_cu_index,        FALSE },
 };