Navigate a project

glaurung xrefs

List recorded references to or from an address.

does not write by default 2 worked examples

use it for

Cross-references may be calls, jumps, reads, or writes. Indirect references can be missing.

Run glaurung xrefs --help on your installed version before putting the command in a script. Glaurung is still pre-1.0.

input
A project and virtual address. The binary is needed when the command must recover missing instruction context.
output
Recorded calls, jumps, reads, and writes that point to or leave the address.
mode
read only. The examples leave the input unchanged.

command shape

syntax

short form
$ glaurung xrefs PROJECT VA --binary PATH [--direction to|from|both]

The installed parser is authoritative: glaurung 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

Find callers of print_sum

The function begins at 0x11d0 in the checked-in debug fixture.

run

from the engine checkout
$ glaurung xrefs hello.glaurung 0x11d0 --binary samples/binaries/platforms/linux/amd64/export/native/clang/debug/hello-c-clang-debug --direction to

output

captured result captured fixture output
dir   src_va       kind          function    snippet
--------------------------------------------------------
to    0x11bd       call          main        call 0x11d0

captured fixture output.

Read the result: The source VA is the call site, not the start of main. Open 0x11bd with view to inspect the surrounding argument setup.

Inspect both sides of main

Both is useful when an address may be called and may itself call helpers.

run

from the engine checkout
$ glaurung xrefs hello.glaurung 0x1150 --binary samples/binaries/platforms/linux/amd64/export/native/clang/debug/hello-c-clang-debug --direction both --json

output

captured result captured fixture output, 2026-08-31
(no both xrefs at 0x1150)

captured fixture output, 2026-08-31.

Read the result: The project has no recorded edge directly on main's entry address. Query a call site or callee such as 0x11d0 when you need a populated result.

used above

important options

--direction to|from|both
Choose incoming, outgoing, or both directions.
--kind KIND
Keep one xref kind.
--binary PATH
Add decoded instruction snippets from the original binary.
--json
Return xrefs as structured data.

These are the flags used by the examples. Run glaurung xrefs --help for the complete parser help.

keep working

related commands

← all 40 commands