Windows analysis

glaurung locks

Inventory lock state in one recovered function.

does not write by default 2 worked examples

use it for

The command reads function facts and symbols from an existing project. A function name or virtual address selects the target.

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

input
A .glaurung project, one function name or VA, and optionally its binary path.
output
Intraprocedural acquire/release sites, held-lock sets, lock objects, coverage, unresolved calls, and caveats.
mode
read only. The examples leave the input unchanged.

command shape

syntax

short form
$ glaurung locks [PATH] --db PROJECT --function NAME|VA

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

Confirm a function has no lock operations

The small Linux fixture is a useful negative control.

run

from the engine checkout
$ glaurung locks samples/binaries/platforms/linux/amd64/export/native/clang/debug/hello-c-clang-debug --db hello.glaurung --function 0x1150

output

captured result captured 2026-08-31, shortened
; lock-state: main  0x1150-0x11cf  (CFG: 4 blocks, 4 edges)
; acquire/release sites: 0

--- coverage (lock-state) ---
instructions: 33
cfg blocks: 4
cfg edges: 4
acquire sites: 0
release sites: 0
lock primitives modeled: (none found)
indirect calls unresolved: 0

captured 2026-08-31, shortened.

Read the result: The report is intraprocedural. A caller may hold a lock before entering this function, and that state is outside this result.

Inspect a driver entry point

Use a project name when symbols or prior annotations resolved the function.

run

from the engine checkout
$ glaurung locks samples/binaries/platforms/windows/vendor/realworld/win8-pciidex.sys --db driver.glaurung --function DriverEntry --json

output

captured result captured after bootstrap-project-facts, 2026-08-31
Error: 'function not found: DriverEntry'

captured after bootstrap-project-facts, 2026-08-31.

Read the result: The project did not resolve DriverEntry by that name. List or search functions, then retry with a recovered name or VA; do not guess an entry-point label.

used above

important options

--db PROJECT
Read symbols and function facts from this project.
--function NAME|VA
Select exactly one function.
PATH
Supply the binary when the project cannot resolve it.
--json
Return lock events and coverage as JSON.

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

keep working

related commands

← all 40 commands