public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "Potharla, Rupesh" <Rupesh.Potharla@amd.com>
Cc: "George, Jini Susan" <JiniSusan.George@amd.com>,
	"Parasuraman, Hariharan" <Hariharan.Parasuraman@amd.com>,
	"Kumar N, Bhuvanendra" <Bhuvanendra.KumarN@amd.com>,
	"Potharla, Rupesh via Binutils" <binutils@sourceware.org>
Subject: Re: [PATCH] Ignore DWARF debug information for -gsplit-dwarf with dwarf-5.
Date: Fri, 30 Sep 2022 07:53:23 +0200	[thread overview]
Message-ID: <af67e8b6-3e4d-69c7-4d65-7331f664c0d6@suse.com> (raw)
In-Reply-To: <DM6PR12MB4219A66148F9BAAC06D63394E7579@DM6PR12MB4219.namprd12.prod.outlook.com>

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

      reply	other threads:[~2022-09-30  5:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29 12:43 Potharla, Rupesh
2022-09-29 15:00 ` Jan Beulich
2022-09-29 15:54   ` Potharla, Rupesh
2022-09-29 16:03     ` Jan Beulich
2022-09-29 16:39       ` Potharla, Rupesh
2022-09-30  5:53         ` Jan Beulich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=af67e8b6-3e4d-69c7-4d65-7331f664c0d6@suse.com \
    --to=jbeulich@suse.com \
    --cc=Bhuvanendra.KumarN@amd.com \
    --cc=Hariharan.Parasuraman@amd.com \
    --cc=JiniSusan.George@amd.com \
    --cc=Rupesh.Potharla@amd.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).