[PATCH V2] Ignore DWARF debug information for -gsplit-dwarf with dwarf-5.

Potharla, Rupesh Rupesh.Potharla@amd.com
Fri Sep 30 11:41:37 GMT 2022


[AMD Official Use Only - General]

Hi,

Can you review the code changes and send in your comments/suggestions?

Patch Inline:
-----------------


Skip dwo_id for split dwarf.
* dwarf2.c (parse_comp_unit): Skip DWO_id for DW_UT_skeleton.
---
bfd/dwarf2.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 4a6a1e40185..364cc9a6480 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -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))
--
2.25.1

Regards,
Rupesh P

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Ignore-DWARF-debug-information-for-gsplit-dwarf-with.patch
Type: application/octet-stream
Size: 1087 bytes
Desc: 0001-Ignore-DWARF-debug-information-for-gsplit-dwarf-with.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20220930/ca6fa356/attachment.obj>


More information about the Binutils mailing list