[PATCH] Ignore DWARF debug information for -gsplit-dwarf with dwarf-5.
Jan Beulich
jbeulich@suse.com
Fri Sep 30 05:53:23 GMT 2022
On 29.09.2022 18:39, Potharla, Rupesh wrote:
> I made the suggested changes. Can you review the latest code changes and send in your comments ?
As a general request - please send new versions as independent new
mails, with the version number bumped in the subject (e.g. here:
[PATCH v2]). This makes it easier to follow revisions, especially
when later looking at the list archives.
> --- 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)
> {
> - /* Skip type signature. */
> - info_ptr += 8;
> + case DW_UT_type:
> + /* Skip type signature. */
> + info_ptr += 8;
Please follow existing style, indenting the case labels the same as the
opening and closing braces. You'll note that this way the diff will be
smaller as well (which, besides patch size, also improves the results
of e.g. "git blame").
> - /* Skip type offset. */
> - info_ptr += offset_size;
> + /* 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))
> @@ -4441,6 +4451,7 @@ parse_comp_unit (struct dwarf2_debug *stash,
> return NULL;
> }
>
> +
> /* Read the abbrevs for this compilation unit into a table. */
> abbrevs = read_abbrevs (abfd, abbrev_offset, stash, file);
> if (! abbrevs)
Please don't introduce such a stray blank line.
Jan
More information about the Binutils
mailing list