aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorPotharla, Rupesh <Rupesh.Potharla@amd.com>2022-10-04 09:39:53 +0200
committerJan Beulich <jbeulich@suse.com>2022-10-04 09:39:53 +0200
commit09fbd1cf93bac1fe02860184f0a0bceedb40ff33 (patch)
tree5411eeb6e3c2796ce99e2f9daa737fe6bd685c2e /bfd
parentcf0136a276e0b9c5ff08e04cf92e738de5de9529 (diff)
downloadgdb-09fbd1cf93bac1fe02860184f0a0bceedb40ff33.zip
gdb-09fbd1cf93bac1fe02860184f0a0bceedb40ff33.tar.gz
gdb-09fbd1cf93bac1fe02860184f0a0bceedb40ff33.tar.bz2
ignore DWARF debug information for -gsplit-dwarf with dwarf-5
Skip dwo_id for split dwarf. * dwarf2.c (parse_comp_unit): Skip DWO_id for DW_UT_skeleton.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/dwarf2.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 4a6a1e4..364cc9a 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))