[PATCH] Ignore DWARF debug information for -gsplit-dwarf with dwarf-5.
Potharla, Rupesh
Rupesh.Potharla@amd.com
Thu Sep 29 12:43:25 GMT 2022
[AMD Official Use Only - General]
Hi,
Bfd is throwing errors for programs compiled with -gsplit-dwarf with clang and dwarf-5. Made the code changes skipping DWO_id while reading debug_info header. Can you review the code changes and send in your comments/suggestions?
Inline Patch:
Skip dwo_id for split dwarf.
* dwarf2.c (parse_comp_unit): Skip DWO_id for DW_UT_skeleton.
---
bfd/dwarf2.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 4a6a1e40185..011bf886e16 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -4441,6 +4441,10 @@ parse_comp_unit (struct dwarf2_debug *stash,
return NULL;
}
+ /* Skip DWO_id field. */
+ if (unit_type == DW_UT_skeleton)
+ info_ptr += 8;
+
/* Read the abbrevs for this compilation unit into a table. */
abbrevs = read_abbrevs (abfd, abbrev_offset, stash, file);
if (! abbrevs)
--
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: 852 bytes
Desc: 0001-Ignore-DWARF-debug-information-for-gsplit-dwarf-with.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20220929/ddaae8af/attachment.obj>
More information about the Binutils
mailing list