public inbox for dwarves@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH dwarves 1/2] btf_loader: send warnings to stderr
@ 2024-10-17  9:24 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 ` [PATCH dwarves 1/2] btf_loader: send warnings to stderr Arnaldo Carvalho de Melo
  0 siblings, 2 replies; 5+ messages in thread
From: Alan Maguire @ 2024-10-17  9:24 UTC (permalink / raw)
  To: acme; +Cc: dwarves, eddyz87, Alan Maguire

Among other things, this helps simplify tests/btf_functions.sh.

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-10-23 14:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH dwarves 1/2] btf_loader: send warnings to stderr Arnaldo Carvalho de Melo
2024-10-23 11:41   ` Alan Maguire
2024-10-23 14:28     ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox