ignore DWARF debug information for -gsplit-dwarf with dwarf-5
authorPotharla, Rupesh <Rupesh.Potharla@amd.com>
Tue, 4 Oct 2022 07:39:53 +0000 (09:39 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 4 Oct 2022 07:39:53 +0000 (09:39 +0200)
Skip dwo_id for split dwarf.

* dwarf2.c (parse_comp_unit): Skip DWO_id for DW_UT_skeleton.

bfd/dwarf2.c

index 4a6a1e40185bff7363c8b9f5148341561b61b24b..364cc9a64809b134a2c9334e7a32507111c687a1 100644 (file)
@@ -4411,13 +4411,23 @@ parse_comp_unit (struct dwarf2_debug *stash,
   if (version < 5)
     addr_size = read_1_byte (abfd, &info_ptr, end_ptr);
 
-  if (unit_type == DW_UT_type)
+  switch (unit_type)
     {
+    case DW_UT_type:
       /* Skip type signature.  */
       info_ptr += 8;
 
       /* Skip type offset.  */
       info_ptr += offset_size;
+      break;
+
+    case DW_UT_skeleton:
+      /* Skip DWO_id field.  */
+      info_ptr += 8;
+      break;
+
+    default:
+      break;
     }
 
   if (addr_size > sizeof (bfd_vma))