aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2022-10-04 18:19:46 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-10-04 18:19:46 -0300
commitd5012f7be79f1b81c9f7ac8855c11d3bf3488ea5 (patch)
tree2453885354bbd3116060c59c9fa4d6a486669cdc
parent79d9a783ea74797aa4304009e0cf1bdb9235fcf4 (diff)
downloadpahole-d5012f7be79f1b81c9f7ac8855c11d3bf3488ea5.tar.gz
btf_encoder: Add extra debug info for unsupported DWARF tags
Recently we got a report of DW_TAG_unspecified_type triggering this warning: [ 1413s] BTF .btf.vmlinux.bin.o [ 1413s] Unsupported DW_TAG_unspecified_type(0x3b) [ 1413s] Encountered error while encoding BTF. Probably tag->type is zero, but would be great to have this offhand, add that info to the error message. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--btf_encoder.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/btf_encoder.c b/btf_encoder.c
index 51d9897f..7ad3f29e 100644
--- a/btf_encoder.c
+++ b/btf_encoder.c
@@ -963,8 +963,8 @@ static int btf_encoder__encode_tag(struct btf_encoder *encoder, struct tag *tag,
case DW_TAG_subroutine_type:
return btf_encoder__add_func_proto(encoder, tag__ftype(tag), type_id_off);
default:
- fprintf(stderr, "Unsupported DW_TAG_%s(0x%x)\n",
- dwarf_tag_name(tag->tag), tag->tag);
+ fprintf(stderr, "Unsupported DW_TAG_%s(0x%x): type: 0x%x\n",
+ dwarf_tag_name(tag->tag), tag->tag, ref_type_id);
return -1;
}
}