All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Douglas Raillard <douglas.raillard@arm.com>
Cc: acme@redhat.com, dwarves@vger.kernel.org
Subject: Re: [PATCH v1 0/2] Anonymous inner struct
Date: Mon, 22 Nov 2021 21:36:32 -0300	[thread overview]
Message-ID: <YZw3kD9Sm3SkuDKW@kernel.org> (raw)
In-Reply-To: <5bf579b2-aafc-2ce2-7c84-e06eb2b4d78c@arm.com>

Em Tue, Nov 16, 2021 at 02:09:44PM +0000, Douglas Raillard escreveu:
> Hi Arnaldo,
> 
> Any opinion on this series ?

I'll try and get back to processing pahole patches tomorrow,

- Arnaldo
 
> Cheers,
> Douglas
> 
> On 10/19/21 11:07 AM, Douglas RAILLARD wrote:
> > From: Douglas Raillard <douglas.raillard@arm.com>
> > 
> > Add an --inner_anonymous pahole CLI option to make inner
> > struct/enum/union anonymous. This allows turning this:
> > 
> >      struct foo { ... };
> >      struct bar {
> >          struct foo {
> >           ....
> >          } a;
> >      };
> > into this:
> > 
> >      struct foo { ... };
> >      struct bar {
> >          struct /* foo */ {
> >           ....
> >          } a;
> >      };
> > 
> > This avoids any conflict between the two definitions of struct foo. The
> > case arises when dumping multiple types at once with -E, all depending
> > on a same inner struct:
> > 
> >      struct bar {
> >          struct foo {
> >           ....
> >          } a;
> >      };
> >      struct bar2 {
> >          struct foo {
> >           ....
> >          } b;
> >      };
> > 
> > 
> > On top of that, struct foo could already be defined in a public header
> > already imported in the compilation unit, leading to a redefinition
> > error, while another nested struct is private and would still need -E
> > for the type to be usable.
> > 
> > Douglas Raillard (2):
> >    fprintf: Allow making struct/enum/union anonymous
> >    pahole.c: Add --inner_anonymous option
> > 
> >   dwarves.h         |  4 +++-
> >   dwarves_emit.c    |  2 +-
> >   dwarves_fprintf.c | 52 ++++++++++++++++++++++++++++++-----------------
> >   pahole.c          |  8 ++++++++
> >   4 files changed, 45 insertions(+), 21 deletions(-)
> > 

-- 

- Arnaldo

      reply	other threads:[~2021-11-23  0:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19 10:07 [PATCH v1 0/2] Anonymous inner struct Douglas RAILLARD
2021-10-19 10:07 ` [PATCH v1 1/2] fprintf: Allow making struct/enum/union anonymous Douglas RAILLARD
2021-11-26 18:27   ` Arnaldo Carvalho de Melo
2021-11-30 16:42     ` Douglas Raillard
2021-11-30 18:49       ` Arnaldo Carvalho de Melo
2021-12-01 10:56         ` Douglas Raillard
2021-12-01 12:01           ` Arnaldo Carvalho de Melo
2021-12-06 10:28             ` Douglas Raillard
2021-12-06 20:32               ` Arnaldo Carvalho de Melo
2021-10-19 10:07 ` [PATCH v1 2/2] pahole.c: Add --inner_anonymous option Douglas RAILLARD
2021-11-16 14:09 ` [PATCH v1 0/2] Anonymous inner struct Douglas Raillard
2021-11-23  0:36   ` Arnaldo Carvalho de Melo [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=YZw3kD9Sm3SkuDKW@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=douglas.raillard@arm.com \
    --cc=dwarves@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.