SHA256
1
0
forked from pool/dwarves
dwarves/0002-btf_encoder-Add-extra-debug-info-for-unsupported-DWA.patch
Jan Engelhardt 5a86729946 Accepting request 1066397 from home:marxin:branches:devel:tools
- Add 0001-pahole-Support-lang-lang_exclude-asm.patch,
  0002-btf_encoder-Add-extra-debug-info-for-unsupported-DWA.patch,
  0003-btf_encoder-Store-the-CU-being-processed-to-avoid-ch.patch,
  0004-core-Add-DW_TAG_unspecified_type-to-tag__is_tag_type.patch,
  0005-core-Record-if-a-CU-has-a-DW_TAG_unspecified_type.patch,
  0006-btf_encoder-Encode-DW_TAG_unspecified_type-returning.patch,
  0007-dwarves-Zero-initialize-struct-cu-in-cu__new-to-prev.patch
  as in order to support DW_TAG_unspecified_type that is newly
  emitted by binutils 2.40+.

OBS-URL: https://build.opensuse.org/request/show/1066397
OBS-URL: https://build.opensuse.org/package/show/devel:tools/dwarves?expand=0&rev=89
2023-02-17 17:03:26 +00:00

40 lines
1.3 KiB
Diff

From 145fd522e786962dd00f946c574a8d59daf945b4 Mon Sep 17 00:00:00 2001
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Tue, 4 Oct 2022 18:19:46 -0300
Subject: [PATCH 2/7] 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>
---
btf_encoder.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/btf_encoder.c b/btf_encoder.c
index daa8e3b507d4a856..babeefa0dc51e62b 100644
--- a/btf_encoder.c
+++ b/btf_encoder.c
@@ -940,8 +940,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;
}
}
--
2.39.1