Navigate a project
glaurung strings-xrefs
Join recovered strings to the instructions and functions that read them.
use it for
Run kickoff first. Add --index-data-xrefs when the project does not yet contain the data references you need.
Run glaurung strings-xrefs --help on your installed version before putting the command in a script.
Glaurung is still pre-1.0.
- input
- A project created by kickoff and its original binary.
- output
- Strings joined to recovered data-read sites and enclosing functions.
- mode
- read only. The examples leave the input unchanged.
command shape
syntax
$ glaurung strings-xrefs PROJECT --binary PATH [--used-only]
The installed parser is authoritative: glaurung strings-xrefs --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
Show strings that code reads
Use the indexed project to move from text to the instruction that touches it.
run
$ glaurung strings-xrefs hello.glaurung --binary samples/binaries/platforms/linux/amd64/export/native/clang/debug/hello-c-clang-debug --used-only --limit 20 output
offset enc len uses text → used_at
---------------------------------------------------------------
8196 ascii 20 1 Hello, World from C! → main@0x1166
8218 ascii 25 1 Total argument length: %d → print_sum@0x11de
8245 ascii 31 1 Static function called %d times → static_function@0x1219 captured 2026-08-31 after indexing data xrefs.
Read the result: If every uses count is zero, rerun with --index-data-xrefs. That step writes recovered data references into the project.
Build a JSON strings window
JSON keeps each text value, address, and use site separate for a UI or notebook.
run
$ glaurung strings-xrefs hello.glaurung --binary samples/binaries/platforms/linux/amd64/export/native/clang/debug/hello-c-clang-debug --index-data-xrefs --json output
[
{
"offset":8196,
"encoding":"ascii",
"text":"Hello, World from C!",
"uses":1,
"used_at":[{"src_va":4454,"src_function_va":4432,"src_function":"main"}]
},
{
"offset":8218,
"text":"Total argument length: %d",
"uses":1,
"used_at":[{"src_va":4574,"src_function":"print_sum"}]
}
] captured fixture output; selected used strings.
Read the result: The JSON preserves both file offsets and source VAs. Do not substitute one address space for the other in a script.
used above
important options
These are the flags used by the examples. Run glaurung strings-xrefs --help for the complete parser help.
before you rely on it
checks
- Indexing data references can take longer on large binaries.
keep working