From: Eduard Zingerman <eddyz87@gmail.com>
To: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Cc: dwarves@vger.kernel.org, bpf@vger.kernel.org, kernel-team@fb.com,
ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
yhs@fb.com
Subject: Re: [PATCH dwarves] fprintf: Fix `*` not being printed for pointers with btf_type_tag
Date: Fri, 31 Mar 2023 16:35:52 +0300 [thread overview]
Message-ID: <f044179e39ec9e7665232eb5abad959ef5e19119.camel@gmail.com> (raw)
In-Reply-To: <ZCbOdWCKKzLlprIs@kernel.org>
On Fri, 2023-03-31 at 09:13 -0300, Arnaldo Carvalho de Melo wrote:
> [...]
> >
> > +static type_id_t skip_llvm_annotations(const struct cu *cu, type_id_t id)
> > +{
> > + struct tag *type;
> > +
> > + for (;;) {
> > + if (id == 0)
> > + break;
> > + type = cu__type(cu, id);
> > + if (type == NULL || type->tag != DW_TAG_LLVM_annotation || type->type == id)
> > + break;
> > + id = type->type;
> > + }
> > +
> > + return id;
> > +}
>
> This part I didn't understand, do you see any possibility of a
> DW_TAG_LLVM_annotation pointing to another DW_TAG_LLVM_annotation?
Not at the moment, but it is no illegal, it is possible to write
something like this:
#define __t1 __attribute__((btf_type_tag("t1")))
#define __t2 __attribute__((btf_type_tag("t2")))
int __t1 __t2 *g;
And to get BTF like ptr --> __t2 --> __t1 --> int.
> [...]
next prev parent reply other threads:[~2023-03-31 13:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-30 21:27 [PATCH dwarves] fprintf: Fix `*` not being printed for pointers with btf_type_tag Eduard Zingerman
2023-03-31 12:13 ` Arnaldo Carvalho de Melo
2023-03-31 12:14 ` Arnaldo Carvalho de Melo
2023-03-31 12:20 ` Arnaldo Carvalho de Melo
2023-03-31 14:12 ` Eduard Zingerman
2023-03-31 18:33 ` Arnaldo Carvalho de Melo
2023-03-31 13:35 ` Eduard Zingerman [this message]
2023-03-31 14:05 ` Arnaldo Carvalho de Melo
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=f044179e39ec9e7665232eb5abad959ef5e19119.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=andrii@kernel.org \
--cc=arnaldo.melo@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=dwarves@vger.kernel.org \
--cc=kernel-team@fb.com \
--cc=yhs@fb.com \
/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