Navigate a project

glaurung frame

List, discover, rename, or retype stack-frame variables.

writes files or project state 2 worked examples

use it for

Offsets are stack-frame offsets. list and discover read the frame; rename and retype write analyst annotations.

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

input
A project, function VA, action, and usually the original binary.
output
Stack slots with offsets, names, C types, sizes, use counts, and provenance.
mode
writes state. rename, retype, and discover can update stack variables in the project.

command shape

syntax

short form
$ glaurung frame PROJECT FUNCTION_VA {list|discover|rename|retype}

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

List main's stack slots

Offsets are relative to the recovered frame base and can be negative.

run

from the engine checkout
$ glaurung frame hello.glaurung 0x1150 list --binary samples/binaries/platforms/linux/amd64/export/native/clang/debug/hello-c-clang-debug

output

captured result captured fixture output
offset  name      type       size  uses  set_by
--------------------------------------------------
-0x018  var_18    (unknown)           5  auto
-0x014  var_14    (unknown)      4    4  auto
-0x010  var_10    (unknown)      4    2  auto
-0x008  var_8     (unknown)      8    2  auto
-0x004  var_4     (unknown)      4    3  auto

captured fixture output.

Read the result: Unknown means the slot exists but its type is not yet supported by evidence. Rename and retype are manual project writes.

Name and type a slot

Make the smallest annotation you can defend, then inspect the pseudocode again.

run

from the engine checkout
$ glaurung frame hello.glaurung 0x1150 rename -8 argc_copy --binary samples/binaries/platforms/linux/amd64/export/native/clang/debug/hello-c-clang-debug

output

captured result captured fixture output, 2026-08-31
fn@0x1150 -0x008 -> argc_copy
note: -0x008 has no type, so this name will not appear in decompile --db yet.
Set one with:
  glaurung frame hello.glaurung 0x1150 retype -8 <c-type>

captured fixture output, 2026-08-31.

Read the result: The write succeeded, but the warning matters: a name without a supported type may not change the decompiler view. Add a type only when the evidence supports it.

used above

important options

list
Read the current stack frame.
discover
Recover slots from instructions and save them.
rename OFFSET NAME
Give one slot an analyst name.
retype OFFSET TYPE
Set one slot's C type.

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

before you rely on it

checks

keep working

related commands

← all 40 commands