Record your work
glaurung proto
Show or set a function prototype.
use it for
Prototypes are keyed by function name. --check-arity warns when the parameters do not match the recovered call shape.
Run glaurung proto --help on your installed version before putting the command in a script.
Glaurung is still pre-1.0.
- input
- A project, function name, return type, and zero or more name:type parameters.
- output
- A function prototype stored by name with provenance.
- mode
- writes state. Setting a prototype updates the project.
command shape
syntax
$ glaurung proto PROJECT NAME [RETURN_TYPE] [NAME:TYPE ...]
The installed parser is authoritative: glaurung proto --help
before the examples
project setup
The examples use the checked-in hello-c-clang-debug fixture and a
project named hello.glaurung.
$ glaurung kickoff samples/binaries/platforms/linux/amd64/export/native/clang/debug/hello-c-clang-debug --db hello.glaurung run it
examples
Type print_sum
The fixture calls print_sum with one integer value.
run
$ glaurung proto hello.glaurung print_sum void total:int --check-arity --binary samples/binaries/platforms/linux/amd64/export/native/clang/debug/hello-c-clang-debug output
void print_sum(int total) [manual] captured 2026-08-31.
Read the result: The arity check catches a prototype that decompile would otherwise ignore without a visible error.
Read the current prototype
Omit the return type and parameters for a read-only lookup.
run
$ glaurung proto hello.glaurung print_sum output
(no prototype for print_sum) captured from a fresh kickoff project, 2026-08-31.
Read the result: The function name exists, but kickoff did not infer a prototype for it. The preceding example records one only after checking the call shape.
used above
important options
These are the flags used by the examples. Run glaurung proto --help for the complete parser help.
before you rely on it
checks
keep working