abidw: make the --lt option support --btf

Message ID 87ikyut089.fsf@redhat.com
State New
Headers
Series abidw: make the --lt option support --btf |

Commit Message

Dodji Seketeli May 31, 2024, 4:28 p.m. UTC
  Hello,

When building the ABI for a Linux kernel that has BTF and DWARF debug
info, the --btf option doesn't select the BTF debug info if DWARF is
also present.

Fixed thus.

	* tools/abidw.cc (load_kernel_corpus_group_and_write_abixml):
	Support --btf.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Applying to the master branch.
---
 tools/abidw.cc | 3 +++
 1 file changed, 3 insertions(+)
  

Patch

diff --git a/tools/abidw.cc b/tools/abidw.cc
index 923caac9..14f2078c 100644
--- a/tools/abidw.cc
+++ b/tools/abidw.cc
@@ -1007,6 +1007,9 @@  load_kernel_corpus_group_and_write_abixml(char* argv[],
   corpus::origin requested_fe_kind =
 #ifdef WITH_CTF
     opts.use_ctf ? corpus::CTF_ORIGIN :
+#endif
+#ifdef WITH_BTF
+    opts.use_btf ? corpus::BTF_ORIGIN :
 #endif
     corpus::DWARF_ORIGIN;
   corpus_group_sptr group =