aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/codesearch/codesearch.go
Commit message (Collapse)AuthorAgeFilesLines
* pkg/aflow/tool/codesearcher: add end-to-end testsDmitry Vyukov2026-02-191-0/+7
| | | | Update #6811
* pkg/codesearch: remove check for invalid C which is not expected at this pointTamas Koczka2026-01-281-1/+1
| | | | Also fixes a lint error.
* pkg/codesearch: expose struct layout in codesearchTamas Koczka2026-01-281-1/+47
| | | | | | | | | | - 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-3/+9
|
* pkg/codesearch: reduce memory consumption a bit moreDmitry Vyukov2026-01-221-4/+5
| | | | | Use uint32 instead of int for line numbers (2G lines should be enough for everyone). Reorder fields to remove unnecessary paddings.
* pkg/codesearch: reduce memory consumption moreDmitry Vyukov2026-01-221-4/+4
| | | | | Use uint8 enums instead of strings to store entity/reference kind. String is 16 bytes and is slower to work with.
* pkg/codesearch: fix resolving of static functions declared in headersDmitry Vyukov2026-01-211-9/+16
| | | | Update #6469
* pkg/codesearch: support searching for referencesDmitry Vyukov2026-01-211-1/+87
| | | | | | | | | 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/aflow/action/kernel: keep build files that codesearch will needDmitry Vyukov2026-01-201-2/+13
| | | | | We currently duplicate list of source extensions in the build action and codesearch tool. Unify the lists.
* pkg/aflow: add BadCallErrorDmitry Vyukov2026-01-201-32/+35
| | | | | | | | | | The error allows tools to communicate that an error is not an infrastructure error that must fail the whole workflow, but rather a bad tool invocation by an LLM (e.g. asking for a non-existent file contents). Previously in the codesearcher tool we used a separate Missing bool to communicate that. With the error everything just becomes cleaner and nicer. The errors also allows all other tools to communicate any errors to the LLM when the normal results cannot be provided and don't make sense.
* pkg/codesearch: add read-file commandDmitry Vyukov2026-01-201-0/+28
| | | | Just provides full file contents as last resort.
* pkg/codesearch: add dir-index commandDmitry Vyukov2026-01-201-0/+80
| | | | | dir-index provides a list of subdirectories and files in the given directory in the source tree.
* pkg/codesearch: add skeleton for code searching toolDmitry Vyukov2025-11-201-0/+190
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.