Use new %p format suffixes in gdb
[deliverable/binutils-gdb.git] / gdb / dwarf2read.c
index 5e71ded2039abb7f9326d9dc08cb1aa40a283175..53e7393a7c92b2fc0136777cbae18395a7ae35ca 100644 (file)
@@ -3584,14 +3584,14 @@ dwarf2_read_gdb_index
        return 0;
 
       if (!read_gdb_index_from_buffer (objfile,
-                                      bfd_get_filename (dwz->dwz_bfd), 1,
-                                      dwz_index_content, &dwz_map,
+                                      bfd_get_filename (dwz->dwz_bfd.get ()),
+                                      1, dwz_index_content, &dwz_map,
                                       &dwz_list, &dwz_list_elements,
                                       &dwz_types_ignore,
                                       &dwz_types_elements_ignore))
        {
          warning (_("could not read '.gdb_index' section from %s; skipping"),
-                  bfd_get_filename (dwz->dwz_bfd));
+                  bfd_get_filename (dwz->dwz_bfd.get ()));
          return 0;
        }
     }
@@ -5596,11 +5596,11 @@ dwarf2_read_debug_names (struct dwarf2_per_objfile *dwarf2_per_objfile)
   if (dwz != NULL)
     {
       if (!read_debug_names_from_section (objfile,
-                                         bfd_get_filename (dwz->dwz_bfd),
+                                         bfd_get_filename (dwz->dwz_bfd.get ()),
                                          &dwz->debug_names, dwz_map))
        {
          warning (_("could not read '.debug_names' section from %s; skipping"),
-                  bfd_get_filename (dwz->dwz_bfd));
+                  bfd_get_filename (dwz->dwz_bfd.get ()));
          return false;
        }
     }
@@ -9336,6 +9336,7 @@ skip_one_die (const struct die_reader_specs *reader, const gdb_byte *info_ptr,
        case DW_FORM_data1:
        case DW_FORM_ref1:
        case DW_FORM_flag:
+       case DW_FORM_strx1:
          info_ptr += 1;
          break;
        case DW_FORM_flag_present:
@@ -9343,10 +9344,15 @@ skip_one_die (const struct die_reader_specs *reader, const gdb_byte *info_ptr,
          break;
        case DW_FORM_data2:
        case DW_FORM_ref2:
+       case DW_FORM_strx2:
          info_ptr += 2;
          break;
+       case DW_FORM_strx3:
+         info_ptr += 3;
+         break;
        case DW_FORM_data4:
        case DW_FORM_ref4:
+       case DW_FORM_strx4:
          info_ptr += 4;
          break;
        case DW_FORM_data8:
@@ -10377,7 +10383,7 @@ process_full_comp_unit (struct dwarf2_per_cu_data *per_cu,
   if (cu->language == language_go)
     fixup_go_packaging (cu);
 
-  /* Now that we have processed all the DIEs in the CU, all the types 
+  /* Now that we have processed all the DIEs in the CU, all the types
      should be complete, and it should now be safe to compute all of the
      physnames.  */
   compute_delayed_physnames (cu);
@@ -10426,7 +10432,7 @@ process_full_comp_unit (struct dwarf2_per_cu_data *per_cu,
 
         Still one can confuse GDB by using non-standard GCC compilation
         options - this waits on GCC PR other/32998 (-frecord-gcc-switches).
-        */ 
+        */
       if (cu->has_loclist && gcc_4_minor >= 5)
        cust->locations_valid = 1;
 
@@ -10481,7 +10487,7 @@ process_full_type_unit (struct dwarf2_per_cu_data *per_cu,
   if (cu->language == language_go)
     fixup_go_packaging (cu);
 
-  /* Now that we have processed all the DIEs in the CU, all the types 
+  /* Now that we have processed all the DIEs in the CU, all the types
      should be complete, and it should now be safe to compute all of the
      physnames.  */
   compute_delayed_physnames (cu);
@@ -19759,11 +19765,11 @@ read_indirect_string_from_dwz (struct objfile *objfile, struct dwz_file *dwz,
   if (dwz->str.buffer == NULL)
     error (_("DW_FORM_GNU_strp_alt used without .debug_str "
             "section [in module %s]"),
-          bfd_get_filename (dwz->dwz_bfd));
+          bfd_get_filename (dwz->dwz_bfd.get ()));
   if (str_offset >= dwz->str.size)
     error (_("DW_FORM_GNU_strp_alt pointing outside of "
             ".debug_str section [in module %s]"),
-          bfd_get_filename (dwz->dwz_bfd));
+          bfd_get_filename (dwz->dwz_bfd.get ()));
   gdb_assert (HOST_CHAR_BIT == 8);
   if (dwz->str.buffer[str_offset] == '\0')
     return NULL;
@@ -20168,6 +20174,10 @@ dwarf2_string_attr (struct die_info *die, unsigned int name, struct dwarf2_cu *c
       if (attr->form == DW_FORM_strp || attr->form == DW_FORM_line_strp
          || attr->form == DW_FORM_string
          || attr->form == DW_FORM_strx
+         || attr->form == DW_FORM_strx1
+         || attr->form == DW_FORM_strx2
+         || attr->form == DW_FORM_strx3
+         || attr->form == DW_FORM_strx4
          || attr->form == DW_FORM_GNU_str_index
          || attr->form == DW_FORM_GNU_strp_alt)
        str = DW_STRING (attr);
@@ -23062,7 +23072,7 @@ dump_die_shallow (struct ui_file *f, int indent, struct die_info *die)
        case DW_FORM_indirect:
          /* The reader will have reduced the indirect form to
             the "base form" so this form should not occur.  */
-         fprintf_unfiltered (f, 
+         fprintf_unfiltered (f,
                              "unexpected attribute form: DW_FORM_indirect");
          break;
        case DW_FORM_implicit_const:
@@ -25163,7 +25173,7 @@ cu_debug_loc_section (struct dwarf2_cu *cu)
   if (cu->dwo_unit)
     {
       struct dwo_sections *sections = &cu->dwo_unit->dwo_file->sections;
-      
+
       return cu->header.version >= 5 ? &sections->loclists : &sections->loc;
     }
   return (cu->header.version >= 5 ? &dwarf2_per_objfile->loclists
This page took 0.037078 seconds and 4 git commands to generate.