From 0ce7d86d6a53b38ed75045173da33b277415254d Mon Sep 17 00:00:00 2001 From: Tamas Koczka Date: Wed, 28 Jan 2026 14:34:43 +0000 Subject: pkg/codesearch: expose struct layout in codesearch - 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/testdata/query-struct-layout-some-union | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 pkg/codesearch/testdata/query-struct-layout-some-union (limited to 'pkg/codesearch/testdata/query-struct-layout-some-union') diff --git a/pkg/codesearch/testdata/query-struct-layout-some-union b/pkg/codesearch/testdata/query-struct-layout-some-union new file mode 100644 index 000000000..a5891ae6b --- /dev/null +++ b/pkg/codesearch/testdata/query-struct-layout-some-union @@ -0,0 +1,6 @@ +struct-layout testdata/source0.h some_union + +struct some_union has 3 fields: +[0 - 32] x +[0 - 64] p +[0 - 64] s -- cgit mrf-deployment