From 280ea308c321115445df610f1a75b05bbadca5f3 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 17 Nov 2025 11:17:23 +0100 Subject: pkg/codesearch: add skeleton for code searching tool Add a clang tool that is used for code indexing (tools/clang/codesearch/). It follows conventions and build procedure of the declextract tool. Add pkg/codesearch package that aggregates the info exposed by the clang tools, and allows doing simple queries: - show source code of an entity (function, struct, etc) - show entity comment - show all entities defined in a source file Add tools/syz-codesearch wrapper tool that allows to create index for a kernel build, and then run code queries on it. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 65cd8082a..9e215b357 100644 --- a/Makefile +++ b/Makefile @@ -273,7 +273,8 @@ format_cpp: executor/android/android_seccomp.h \ tools/kcovtrace/*.c tools/kcovfuzzer/*.c tools/fops_probe/*.cc \ tools/clang/*.h \ - tools/clang/declextract/*.h tools/clang/declextract/*.cpp + tools/clang/declextract/*.h tools/clang/declextract/*.cpp \ + tools/clang/codesearch/*.h tools/clang/codesearch/*.cpp format_sys: bin/syz-fmt bin/syz-fmt all -- cgit mrf-deployment