From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Cc: "Nick Clifton" <nickc@redhat.com>,
"Martin Liška" <mliska@suse.cz>, "Yonghong Song" <yhs@fb.com>,
"Andrii Nakryiko" <andrii.nakryiko@gmail.com>,
dwarves@vger.kernel.org
Subject: Re: Encountered error while encoding BTF due to Unsupported DW_TAG_unspecified_type(0x3b)
Date: Tue, 4 Oct 2022 18:13:56 -0300 [thread overview]
Message-ID: <YzyiFORKy6zk6EsL@kernel.org> (raw)
In-Reply-To: <Yzx2fcq4s3umw8WY@kernel.org>
Em Tue, Oct 04, 2022 at 03:07:57PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Tue, Oct 04, 2022 at 10:25:31AM -0300, Arnaldo Carvalho de Melo escreveu:
> > On October 4, 2022 9:33:05 AM GMT-03:00, Nick Clifton <nickc@redhat.com> wrote:
> > >Hi Arnaldo,
> > >
> > >>> <0><c>: Abbrev Number: 3 (DW_TAG_unspecified_type) <--- the problematic TAG
> > >
> > >>> <1><29>: Abbrev Number: 2 (DW_TAG_subprogram)
> > >>> <2a> DW_AT_name : (indirect string, offset: 0x2e): entry_ibpb
> > >>> <2e> DW_AT_type : <0xc>
> > >
> > >If it helps the tag is used to tell consumers like GDB that the return
> > >type of specific functions (eg entry_ibpb in the above example) is unknown.
>
> > Sure helps, thanks!
>
> > I noticed this is for assembly source code, I'll add it as a special
> > "type" and probably for BTF mask it to void.
>
> s/mask/map/g
I just committed the patch below, now to support
DW_TAG_unspecified_type...
- Arnaldo
commit 79d9a783ea74797aa4304009e0cf1bdb9235fcf4
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Tue Oct 4 18:09:33 2022 -0300
pahole: Support '--lang/--lang_exclude=asm'
It is disjoint from the other languages and then the first simple
implementation of language inclusion/exclusion didn't support it, add
an special case to test against 0x8001 (DW_LANG_Mips_Assembler) to cover
that.
This is needed as recently compilers started to add DWARF constructs to
represent asm CUs that broke pahole as it didn't support
DW_TAG_unspecified_type as a "type", so add it in case in the future we
want to exclude such CUs.
The DW_TAG_unspecified_type tag is going to be supported in the next
csets tho.
We also may want this to exclude new tags that aren't supported in BTF,
etc.
Cc: Martin Liška <mliska@suse.cz>
Cc: Nick Clifton <nickc@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
diff --git a/dwarves.c b/dwarves.c
index 9589747f49f8f3a7..0405592ce0a540a5 100644
--- a/dwarves.c
+++ b/dwarves.c
@@ -2240,6 +2240,9 @@ int lang__str2int(const char *lang)
[DW_LANG_UPC] = "upc",
};
+ if (strcasecmp(lang, "asm") == 0)
+ return DW_LANG_Mips_Assembler;
+
// c89 is the first, bliss is the last, see /usr/include/dwarf.h
for (int id = DW_LANG_C89; id <= DW_LANG_BLISS; ++id)
if (languages[id] && strcasecmp(lang, languages[id]) == 0)
diff --git a/man-pages/pahole.1 b/man-pages/pahole.1
index d752ccbeb297d9d7..45a21af500d94772 100644
--- a/man-pages/pahole.1
+++ b/man-pages/pahole.1
@@ -378,7 +378,7 @@ Only process compilation units built from source code written in the specified l
Supported languages:
- ada83, ada95, bliss, c, c89, c99, c11, c++, c++03, c++11, c++14, cobol74,
+ ada83, ada95, asm, bliss, c, c89, c99, c11, c++, c++03, c++11, c++14, cobol74,
cobol85, d, dylan, fortran77, fortran90, fortran95, fortran03, fortran08,
go, haskell, java, julia, modula2, modula3, objc, objc++, ocaml, opencl,
pascal83, pli, python, renderscript, rust, swift, upc
next prev parent reply other threads:[~2022-10-04 21:14 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-03 8:56 Encountered error while encoding BTF due to Unsupported DW_TAG_unspecified_type(0x3b) Martin Liška
2022-10-03 12:07 ` Nick Clifton
2022-10-04 12:15 ` Arnaldo Carvalho de Melo
2022-10-04 12:17 ` Arnaldo Carvalho de Melo
2022-10-04 12:31 ` Arnaldo Carvalho de Melo
2022-10-04 21:42 ` Arnaldo Carvalho de Melo
2022-10-05 8:41 ` Martin Liška
2022-10-04 12:33 ` Nick Clifton
2022-10-04 13:25 ` Arnaldo Carvalho de Melo
2022-10-04 18:07 ` Arnaldo Carvalho de Melo
2022-10-04 21:13 ` Arnaldo Carvalho de Melo [this message]
2022-10-04 21:44 ` Arnaldo Carvalho de Melo
2022-10-05 7:23 ` Martin Liška
2022-10-05 14:37 ` Arnaldo Carvalho de Melo
2022-10-05 15:43 ` Arnaldo Carvalho de Melo
2022-10-06 11:54 ` Martin Liška
[not found] ` <Yz7bevBJAm0JiLfp@kernel.org>
2022-10-06 14:00 ` Arnaldo Carvalho de Melo
2022-10-06 14:15 ` [PATCH/RFC pahole] btf_encoder: Encode DW_TAG_unspecified_type as BTF_KIND_CONST was: " Arnaldo Carvalho de Melo
2022-10-06 16:04 ` Andrii Nakryiko
2022-10-06 17:23 ` Arnaldo Carvalho de Melo
2022-10-07 20:21 ` Arnaldo Carvalho de Melo
2022-10-08 0:25 ` Yonghong Song
2022-10-10 12:06 ` Arnaldo Carvalho de Melo
2022-10-10 20:08 ` Arnaldo Carvalho de Melo
2022-10-10 20:19 ` Arnaldo Carvalho de Melo
2022-10-11 5:57 ` Yonghong Song
2022-10-11 13:45 ` Arnaldo Carvalho de Melo
2022-10-11 15:33 ` Yonghong Song
2022-10-11 17:16 ` Arnaldo Carvalho de Melo
2023-01-30 9:23 ` Martin Liška
2023-01-30 14:20 ` pahole 1.25 plans was: " Arnaldo Carvalho de Melo
2023-03-12 0:03 ` Dominique Martinet
2022-10-05 16:55 ` 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=YzyiFORKy6zk6EsL@kernel.org \
--to=acme@kernel.org \
--cc=andrii.nakryiko@gmail.com \
--cc=arnaldo.melo@gmail.com \
--cc=dwarves@vger.kernel.org \
--cc=mliska@suse.cz \
--cc=nickc@redhat.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 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.