Skip to content

Symbols

Symbolicate native stack addresses to function, file and line from DWARF and PDB debug info

Connector software
Free and open source
Service credentials
Not needed
Use with an agent

Install the Orchard skill in your project to help your agent find connectors, configure them, and verify SQL results.

npx skills add Query-farm/vgi-skills --skill orchard

Copy this request into your coding agent to get started.

Use https://query.farm/products/orchard/connectors/symbols/index.md to help me query Symbols with DuckDB or Haybarn 2.0.1 and VGI protocol 3.4. Ask only for missing details about the result I need or whether I want local execution, self-hosting or Query Farm hosting. Check the connector's actual hosting availability, credentials and input requirements. Read one format of each needed reference and the exact object declarations before writing SQL. Use a released connector, and distinguish a saved example result from anything you actually execute. If you cannot run the query, tell me what remains to verify.

Turn C++ symbols into readable function names

Example output · captured
Connector release
v0.5.0
Engine
2.0.1
VGI protocol
3.4.0
SELECT symbol, symbols.main.demangle(symbol) AS function_name
FROM (VALUES ('_ZN3foo3barEv'), ('_Z3fooi')) AS input(symbol);
Result
symbol function_name
_ZN3foo3barEv foo::bar
_Z3fooi foo

Quick start

Choose where to run Symbols, then follow the steps below.

The connector runs alongside DuckDB or Haybarn. No Query Farm account is needed.

1. Install the vgi extension

Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.

setup.sql
SET allow_extension_repositories = 'allowed';

CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
    WITH PREFIX 'https://duckdb-extensions.query.farm';

INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;

2. Attach the connector

Attach the release directly

Downloads the latest release for your platform and caches it locally.

ATTACH 'symbols' AS symbols (
  TYPE vgi,
  LOCATION 'github-auto://Query-farm/vgi-symbols'
);

3. Run a query

query.sql
SELECT symbol, symbols.main.demangle(symbol) AS function_name
FROM (VALUES ('_ZN3foo3barEv'), ('_Z3fooi')) AS input(symbol);
More example queries →
Technical details
Verified connector release
v0.5.0
Engine
2.0.1
VGI protocol
3.4.0
Verified on
December 1, 2026
Release notes on GitHub
Pin a version for production

When running the connector yourself, keep a specific release until you’re ready to upgrade. Replace the ATTACH statement above with this one and follow the same extension and credential setup.

Attach the release directly

Uses the verified release each time you attach the connector.

ATTACH 'symbols' AS symbols (
  TYPE vgi,
  LOCATION 'github-auto://Query-farm/[email protected]'
);

Overview

Native (DWARF/PDB) symbolication as a bulk SQL JOIN over (build_id, address) frames, backed by a persistent build-id-keyed debug-info cache.

Catalog

Everything symbols exposes once attached — read straight from the worker's released build.

symbols 1 schema
main 1 view · 10 functions

Symbolication functions: symbolicate frames, demangle names, inspect modules, manage the debug-info cache and symbol sources.

Schema examples (6)
Examples (6)

Register a local, zero-egress directory of debug files and capture its source_id.

SELECT source_id FROM symbols.main.add_source('dir', path => '/srv/debug');

Symbolicate one module-relative frame to its function name and resolution status.

SELECT (symbols.main.symbolicate('e4c1f2b9', 303600)).function AS function,
  (symbols.main.symbolicate('e4c1f2b9', 303600)).status AS status;

Bulk-symbolicate a frame column: resolve each (build_id, address) to its innermost function name for a flamegraph or GROUP BY key.

SELECT f.build_id, f.address,
  symbols.main.function_name(f.build_id, f.address) AS function
FROM stack_frames f;

Demangle a raw Itanium C++ linkage name to its readable form.

SELECT symbols.main.demangle('_ZN3foo3barEv') AS name;
2 more examples

Watch the build-id-keyed cache: the hottest resident debug modules first.

SELECT debug_id, name, bytes_resident
FROM symbols.main.cache_status()
ORDER BY bytes_resident DESC;

Find the local, zero-egress source kinds that are not registered yet (source_kinds anti-joined to sources()), with the add_source argument each one needs; returns dir and glob on a fresh worker, and only glob once a dir source is added.

SELECT k.kind, k.locator_arg
FROM symbols.main.source_kinds AS k
WHERE k.egress = false AND k.kind NOT IN (SELECT s.kind FROM symbols.main.sources() AS s)
ORDER BY k.kind;
Views
source_kinds 3 examples5 cols

Reference registry of the five symbol-source kinds add_source accepts, with each kind's locality, egress posture, and locator argument.

Columns
kind VARCHAR
The source kind token passed as add_source's first argument: dir / glob / debuginfod / s3 / http.
locality VARCHAR
'local' for zero-egress filesystem sources, 'remote' for opt-in network sources.
egress BOOLEAN
True when using the kind crosses the trust boundary (a remote source).
locator_arg VARCHAR
The add_source named argument that locates the source: path, url, or bucket.
description VARCHAR
A one-line explanation of the source kind.
Examples (3)

List the local, zero-egress source kinds and the add_source argument that locates each.

SELECT kind, locator_arg
FROM symbols.main.source_kinds
WHERE egress = false
ORDER BY kind;

Show every source kind with whether registering it crosses the trust boundary.

SELECT kind, locality, egress
FROM symbols.main.source_kinds
ORDER BY egress, kind;

Find the local, zero-egress source kinds that are not registered yet (source_kinds anti-joined to sources()), with the add_source argument each one needs; returns dir and glob on a fresh worker, and only glob once a dir source is added.

SELECT k.kind, k.locator_arg
FROM symbols.main.source_kinds AS k
WHERE k.egress = false AND k.kind NOT IN (SELECT s.kind FROM symbols.main.sources() AS s)
ORDER BY k.kind;
Link
Scalar functions
demangle (mangled ANY, lang VARCHAR) +1 overload 1 example

Demangle a raw linkage/symbol name into a readable function name (scheme auto-detected)

Arguments
mangled ANY
The raw mangled or linkage symbol name to demangle; a name that is not mangled is returned unchanged.
lang VARCHAR
Mangling scheme: 'auto' (default — detect from the string), 'cpp', 'rust', 'msvc', or 'swift'.
Overloads
demangle(mangled ANY) → VARCHARdemangle(mangled ANY, lang VARCHAR) → VARCHAR
ReturnsVARCHAR
Example

Demangle an Itanium C++ linkage name into its readable form ('foo::bar').

SELECT symbols.main.demangle('_ZN3foo3barEv') AS name;
Link
function_name (build_id VARCHAR, address UBIGINT) 1 example

Resolve a (build_id, address) frame to the innermost function name only

Arguments
build_id VARCHAR
The owning module's normalized debug-id, or the raw per-format build-id the extractor captured for it; the worker accepts and normalizes either form.
address UBIGINT
The MODULE-RELATIVE virtual address (the address within the module image, before ASLR slide / load bias). The caller — or the upstream minidump/pprof/perf extractor — subtracts the module base first.
ReturnsVARCHAR
Example

Resolve a frame (build-id 'e4c1f2b9', module-relative address 303600) to just its innermost function name; returns NULL until a symbol source for that build-id is registered with add_source.

SELECT symbols.main.function_name('e4c1f2b9', 303600) AS function;
Link
inline_frames (build_id VARCHAR, address UBIGINT) 1 example

Resolve a (build_id, address) frame to its inline chain only (a list of STRUCT(function, file, line))

Arguments
build_id VARCHAR
The module's normalized debug-id, or its raw per-format build-id hex.
address UBIGINT
The MODULE-RELATIVE virtual address (before ASLR slide / load bias).
ReturnsSTRUCT("function" VARCHAR, file VARCHAR, line INTEGER)[]
Example

Get the length of the inlined call chain (innermost-first, physical frame excluded) at module-relative address 303600 in build-id 'e4c1f2b9'; 0 until the address has both symbols and inlining.

SELECT length(symbols.main.inline_frames('e4c1f2b9', 303600)) AS inline_depth;
Link
symbolicate (build_id VARCHAR, address UBIGINT) 1 example

Resolve one (build_id, address) frame to a STRUCT with the inline chain collapsed into a list

Arguments
build_id VARCHAR
The module's normalized debug-id, or its raw per-format build-id hex. The worker normalizes either form.
address UBIGINT
The MODULE-RELATIVE virtual address (before ASLR slide / load bias). The caller subtracts the module base first (the address-model contract).
ReturnsSTRUCT of 7 fields
STRUCT 7 fields
  • functionVARCHAR
  • fileVARCHAR
  • lineINTEGER
  • inlinedSTRUCT[]
    STRUCT[] 3 fields
    • functionVARCHAR
    • fileVARCHAR
    • lineINTEGER
  • moduleVARCHAR
  • debug_idVARCHAR
  • statusVARCHAR
Example

Symbolicate one module-relative frame (build-id 'e4c1f2b9', address 303600) and read the resolved function name and status off the returned struct; status is 'not_found' until a matching symbol source is registered with add_source.

SELECT (symbols.main.symbolicate('e4c1f2b9', 303600)).function AS function,
  (symbols.main.symbolicate('e4c1f2b9', 303600)).status AS status;
Link
Table functions
add_source (kind VARCHAR, path := VARCHAR, url := VARCHAR, bucket := VARCHAR, enabled := BOOLEAN, secret := VARCHAR) 1 example

Register a symbol source (dir/glob/debuginfod/s3/http); returns its source_id

Positional arguments
kind VARCHAR
Source kind: 'dir' / 'glob' (local, zero-egress) or 'debuginfod' / 's3' / 'http' (remote, opt-in egress).
Named arguments
path := VARCHAR
Filesystem path (for `dir`) or recursive glob (for `glob`).
url := VARCHAR
Base URL for a `debuginfod` or `http` source.
bucket := VARCHAR
Bucket name for an `s3` source.
enabled := BOOLEAN
Whether the source is active. Local sources default true; remote sources default false (must be explicitly enabled to allow egress).
secret := VARCHAR
Name of the SDK secret carrying credentials for a remote source (never the secret value itself).
Returns columns
source_id VARCHAR
The id assigned to the new source (e.g. src0). Pass it to drop_source to remove it.
Example
SELECT source_id FROM symbols.main.add_source('dir', path => '/srv/debug');
Link
cache_evict (debug_id := VARCHAR) 1 example

Force-evict one module (or the whole resident set) from the cache; returns bytes freed

Named arguments
debug_id := VARCHAR
The normalized debug-id (or build-id alias) to evict. Omit to clear the whole resident set. The manifest entry is kept either way.
Returns columns
bytes_freed BIGINT
Resident bytes reclaimed by the eviction (0 if the module was not resident, or the cache was already empty).
Example

Clear the entire resident cache (keeping the manifest) and report the bytes reclaimed; 0 on a cold worker with nothing resident.

SELECT bytes_freed FROM symbols.main.cache_evict();
Link
cache_status (resident_only := BOOLEAN) 1 example

Report the parsed/resident debug modules (the build-id-keyed cache state)

Named arguments
resident_only := BOOLEAN
When true, return only modules currently resident in RAM and skip evicted / manifest-only (and proven-missing) entries. Defaults to false (every known debug-id).
Returns columns
debug_id VARCHAR
Normalized debug-id cache key.
name VARCHAR
Debug file name.
format VARCHAR
Container format (ELF / MachO / PE / PDB / …).
arch VARCHAR
CPU architecture.
bytes_resident BIGINT
Resident footprint in bytes (0 if evicted / manifest-only).
rows_resolved BIGINT
Cumulative addresses resolved against this module.
last_used TIMESTAMPTZ
Timestamp of last use, or NULL if never used.
origin VARCHAR
Provenance the module is (re)parsed from (dir / glob / …), or NULL.
resident BOOLEAN
True if the parsed module is currently resident in RAM.
Example
SELECT debug_id, name, bytes_resident, rows_resolved
FROM symbols.main.cache_status()
ORDER BY bytes_resident DESC;
Link
drop_source (source_id VARCHAR) 1 example

Remove a registered symbol source by id; returns whether one was removed

Arguments
source_id VARCHAR
The `source_id` returned by `add_source` to remove.
Returns columns
dropped BOOLEAN
True if a source with that source_id existed and was removed; false if no such source was registered.
Example

Deregister the symbol source with id 'src0'; dropped is false if no such source was registered.

SELECT dropped FROM symbols.main.drop_source('src0');
Link
module_info (blob BLOB) +1 overload 2 examples

Inspect a debug file given inline as a BLOB (format, debug-id, line info) without resolving

Arguments
blob BLOB
The debug file's contents to inspect, passed as a constant (e.g. `getvariable('f')` after `SET VARIABLE f = (SELECT content FROM read_blob('<path or URL>'))`). Parsed header-only — no resolve, no cache insertion.
Overloads
module_info(blob BLOB)module_info(path VARCHAR)
Returns columns
format VARCHAR
Container format: ELF / MachO / PE / PDB / dSYM / Breakpad.
arch VARCHAR
CPU architecture, e.g. x86_64 / aarch64.
build_id VARCHAR
Raw per-format build identifier (hex), or NULL.
debug_id VARCHAR
Normalized debug-id cache key, or NULL.
code_id VARCHAR
Code-file identifier, or NULL.
has_dwarf BOOLEAN
True if the file carries DWARF debug info.
has_pdb BOOLEAN
True if the file is / carries a Windows PDB.
has_line_table BOOLEAN
True if line-number info is present.
symbol_count BIGINT
Number of symbols discovered.
file_count BIGINT
Number of source files referenced.
byte_size BIGINT
Size of the debug file in bytes.
image_base UBIGINT
The image's preferred load base.
Examples (2)
COPY (SELECT content FROM read_blob('https://raw.githubusercontent.com/Query-farm/vgi-symbols/v0.4.2/crates/symbols-core/tests/fixtures/macho_inline.dwarf')) TO 'macho_inline.dwarf' (FORMAT blob);
SELECT format, debug_id, has_line_table FROM symbols.main.module_info('macho_inline.dwarf');
SET VARIABLE symbols_debug_file = (SELECT content FROM read_blob('https://raw.githubusercontent.com/Query-farm/vgi-symbols/v0.4.2/crates/symbols-core/tests/fixtures/macho_inline.dwarf'));
SELECT crash.crash_module, coalesce(d.debug_id = crash.debug_id, false) AS matches, d.debug_id AS debug_file_debug_id, d.format, d.arch, d.has_line_table FROM (VALUES ('compute', '4930eb84c7b63ef6a97fbdcdd473f5a30'), ('inline', '76ff8518da153e64a8403892fcbf11250')) AS crash(crash_module, debug_id) LEFT JOIN symbols.main.module_info(getvariable('symbols_debug_file')) AS d ON true ORDER BY crash.crash_module;
Link
sources (enabled_only := BOOLEAN) 2 examples

List the registered symbol sources (source_id, kind, location, enabled, egress)

Named arguments
enabled_only := BOOLEAN
When true, return only sources that are currently enabled (active). Defaults to false (every registered source, enabled or not).
Returns columns
source_id VARCHAR
Opaque id from add_source.
kind VARCHAR
Source kind: dir / glob / debuginfod / s3 / http.
location VARCHAR
The source's locator: path / url / bucket.
enabled BOOLEAN
True if the source is active.
egress BOOLEAN
True if using the source crosses the trust boundary (remote).
Examples (2)

Find the local, zero-egress source kinds that are not registered yet (source_kinds anti-joined to sources()), with the add_source argument each one needs; returns dir and glob on a fresh worker, and only glob once a dir source is added.

SELECT k.kind, k.locator_arg
FROM symbols.main.source_kinds AS k
WHERE k.egress = false AND k.kind NOT IN (SELECT s.kind FROM symbols.main.sources() AS s)
ORDER BY k.kind;
SELECT source_id, kind, location, enabled, egress
FROM symbols.main.sources();
Link

Try these queries

Register a local, zero-egress directory of debug files and capture its source_id.

SELECT source_id FROM symbols.main.add_source('dir', path => '/srv/debug')

Uses add_source

Symbolicate one module-relative frame to its function name and resolution status.

SELECT (symbols.main.symbolicate('e4c1f2b9', 303600)).function AS function,
  (symbols.main.symbolicate('e4c1f2b9', 303600)).status AS status

Uses symbolicate

Bulk-symbolicate a frame column: resolve each (build_id, address) to its innermost function name for a flamegraph or GROUP BY key.

SELECT f.build_id, f.address,
  symbols.main.function_name(f.build_id, f.address) AS function
FROM stack_frames f

Uses function_name

Demangle a raw Itanium C++ linkage name to its readable form.

SELECT symbols.main.demangle('_ZN3foo3barEv') AS name

Uses demangle

Watch the build-id-keyed cache: the hottest resident debug modules first.

SELECT debug_id, name, bytes_resident
FROM symbols.main.cache_status()
ORDER BY bytes_resident DESC

Uses cache_status

Find the local, zero-egress source kinds that are not registered yet (source_kinds anti-joined to sources()), with the add_source argument each one needs; returns dir and glob on a fresh worker, and only glob once a dir source is added.

SELECT k.kind, k.locator_arg
FROM symbols.main.source_kinds AS k
WHERE k.egress = false AND k.kind NOT IN (SELECT s.kind FROM symbols.main.sources() AS s)
ORDER BY k.kind

Uses source_kindssources

10 more examples in the Catalog, each listed under the table or function it uses.

Symbols is an independent open-source connector from Query.Farm. It is not affiliated with, endorsed by or sponsored by the services, projects or organisations it works with. Product names, logos and trademarks belong to their respective owners.