From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Alan Maguire <alan.maguire@oracle.com>
Cc: dwarves@vger.kernel.org, eddyz87@gmail.com
Subject: Re: [PATCH dwarves 1/2] btf_loader: send warnings to stderr
Date: Thu, 17 Oct 2024 17:27:04 -0300 [thread overview]
Message-ID: <ZxFzGNrgeFMSswGe@x1> (raw)
In-Reply-To: <20241017092433.690192-1-alan.maguire@oracle.com>
On Thu, Oct 17, 2024 at 10:24:32AM +0100, Alan Maguire wrote:
> Among other things, this helps simplify tests/btf_functions.sh.
Thanks, applied both patches.
- Arnaldo
> Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
> ---
> btf_loader.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/btf_loader.c b/btf_loader.c
> index c70b67f..4814f29 100644
> --- a/btf_loader.c
> +++ b/btf_loader.c
> @@ -449,7 +449,7 @@ static int create_new_tag(struct cu *cu, int type, const struct btf_type *tp, ui
> case BTF_KIND_TYPE_TAG: tag->tag = DW_TAG_LLVM_annotation; break;
> default:
> free(tag);
> - printf("%s: Unknown type %d\n\n", __func__, type);
> + fprintf(stderr, "%s: Unknown type %d\n\n", __func__, type);
> return 0;
> }
>
> @@ -470,7 +470,7 @@ static int process_decl_tag(struct cu *cu, const struct btf_type *tp)
> tag = cu__tag(cu, tp->type);
>
> if (tag == NULL) {
> - printf("WARNING: BTF_KIND_DECL_TAG for unknown BTF id %d\n", tp->type);
> + fprintf(stderr, "WARNING: BTF_KIND_DECL_TAG for unknown BTF id %d\n", tp->type);
> return 0;
> }
>
> @@ -478,7 +478,8 @@ static int process_decl_tag(struct cu *cu, const struct btf_type *tp)
>
> if (tag->attribute != NULL) {
> char bf[128];
> - printf("WARNING: still unsuported BTF_KIND_DECL_TAG(%s) for %s already with attribute (%s), ignoring\n",
> +
> + fprintf(stderr, "WARNING: still unsuported BTF_KIND_DECL_TAG(%s) for %s already with attribute (%s), ignoring\n",
> attribute, tag__name(tag, cu, bf, sizeof(bf), NULL), tag->attribute);
> } else {
> tag->attribute = attribute;
> --
> 2.43.5
next prev parent reply other threads:[~2024-10-17 20:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-17 9:24 [PATCH dwarves 1/2] btf_loader: send warnings to stderr Alan Maguire
2024-10-17 9:24 ` [PATCH dwarves 2/2] tests/btf_functions: redirect stderr for pfunct --format_path=btf Alan Maguire
2024-10-17 20:27 ` Arnaldo Carvalho de Melo [this message]
2024-10-23 11:41 ` [PATCH dwarves 1/2] btf_loader: send warnings to stderr Alan Maguire
2024-10-23 14:28 ` 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=ZxFzGNrgeFMSswGe@x1 \
--to=acme@kernel.org \
--cc=alan.maguire@oracle.com \
--cc=dwarves@vger.kernel.org \
--cc=eddyz87@gmail.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