From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Eduard Zingerman <eddyz87@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 11:05:13 -0300 [thread overview]
Message-ID: <98E797CF-3C40-48F7-895F-46DF9D57E3BC@gmail.com> (raw)
In-Reply-To: <f044179e39ec9e7665232eb5abad959ef5e19119.camel@gmail.com>
On March 31, 2023 10:35:52 AM GMT-03:00, Eduard Zingerman <eddyz87@gmail.com> wrote:
>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.
Right, thanks for clarifying, I'll add this as a comment above the skip llvm function.
This patch is already in the 'next' branch, will move to 'master' later today.
- Arnaldo
>
>> [...]
prev parent reply other threads:[~2023-03-31 14:05 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
2023-03-31 14:05 ` 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=98E797CF-3C40-48F7-895F-46DF9D57E3BC@gmail.com \
--to=arnaldo.melo@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=dwarves@vger.kernel.org \
--cc=eddyz87@gmail.com \
--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