aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/codesearch/testdata/source0.c.json
Commit message (Collapse)AuthorAgeFilesLines
* pkg/codesearch: expose struct layout in codesearchTamas Koczka2026-01-281-5/+65
| | | | | | | | | | - Extract struct field offsets and sizes in the C++ codesearch indexer. - Add 'fields' to the JSON definition output. - Update pkg/codesearch to parse and expose the new field information. - Add 'struct-layout' command to syz-codesearch for debugging. - Add 'codesearch-struct-layout' tool to pkg/aflow/tool/codesearcher/ to allow LLM agents to query struct memory layout and map byte offsets to fields. - Support pointer marshaling for optional JSON values (e.g. *uint)
* pkg/codesearch: support finding field reads/writesDmitry Vyukov2026-01-261-5/+84
|
* tools/clang/json: escape strings properlyFlorent Revest2026-01-251-20/+31
| | | | | | | | | | | | | When preparing a codesearch index, I encountered errors which I narrowed down to lines like the following in the json output of codesearch: "type": "void (void __attribute__((btf_type_tag("user")))*, const void *, size_t, size_t)", After this change, the line gets formatted like this: "type": "void (void __attribute__((btf_type_tag(\"user\")))*, const void *, size_t, size_t)", This fixes the errors I encountered
* pkg/codesearch: reduce memory consumption a bit moreDmitry Vyukov2026-01-221-20/+20
| | | | | Use uint32 instead of int for line numbers (2G lines should be enough for everyone). Reorder fields to remove unnecessary paddings.
* tools/clang/codesearch: index struct referencesDmitry Vyukov2026-01-221-0/+37
| | | | Update #6469
* pkg/codesearch: do indexing of struct/union/enumDmitry Vyukov2026-01-211-9/+113
| | | | Update #6469
* pkg/codesearch: fix resolving of static functions declared in headersDmitry Vyukov2026-01-211-0/+12
| | | | Update #6469
* pkg/codesearch: support searching for referencesDmitry Vyukov2026-01-211-1/+9
| | | | | | | | | Extend codesearch clang tool to export info about function references (calls, takes-address-of). Add pkg/codesearch command find-references. Export find-references in pkg/aflow/tools/codesearcher to LLMs. Update #6469
* pkg/codesearch: add skeleton for code searching toolDmitry Vyukov2025-11-201-0/+41
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.