Files
Robin AveryandClaude Opus 5.5 02c58abe32 Implement initial dat file annotations and tooling (#3587)
See tools/dat-cli/README.md.

The macros in dat_macros.h write annotations into the DWARF built by the
ppc-dwarf CMake preset (melee-dwarf in nix). The tool is AI-assisted and
incomplete; tools/dat-cli/TODO.md lists what's missing. It will
eventually hook into objdiff and generate its own coverage/progress
metrics.

The annotations are parsed by tools/dat-cli/src/interop/dwarf/
annotation.rs and expr.rs. The expressions are a bit complex because
they need to describe conditionals that reference struct fields, but
wouldn't be that hard to implement for downstream tooling in other
languages. This makes the DWARF valuable to ports and other use cases
for reading dat files.

In the DWARF build, the archive loaders record which type each symbol
is loaded as: the lbArchive loaders through DAT_ROOTS, and
HSD_ArchiveGetPublicAs, a typed HSD_ArchiveGetPublicAddress that
replaces most call sites. Checking those types against the archives
turned up wrong ones, which are fixed here: DynamicsTemplate is split
from DynamicsDesc, UnkStageDat's shadow materials, HSD_AObjDesc.obj_id,
the particle banks, the item throw table, and a number of void*
destinations. placeholder.h and m2c_macros.h move to
libs/doldecomp/include alongside dat_macros.h.

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-09-29 22:52:07 -04:00
..
2023-03-20 02:20:15 -04:00
2023-03-20 02:20:15 -04:00