disclosure: Claude wrote this for me.
Summary
When connecting ghidrasql 0.0.2 to LibGhidraHost extension version 12.1.2 (Ghidra 12.1.2), several core virtual tables return 0 rows despite a fully analyzed program being loaded. Decompiler-backed tables and a subset of metadata tables work correctly.
Environment
- ghidrasql: 0.0.2
- LibGhidraHost extension: 12.1.2 (createdOn 2/20/2026)
- Ghidra: 12.1.2
- Platform: macOS (Darwin 24.6.0, arm64)
- Binary under analysis: statically-linked MIPS BE 32-bit ELF (fully analyzed, ~80 functions)
Reproduction
# Launch from Ghidra GUI with LibGhidraHost running on port 18080
env -u GHIDRA_INSTALL_DIR ghidrasql --url http://127.0.0.1:18080 \
-q "SELECT COUNT(*) AS n FROM funcs;"
# Returns: 0
# Also reproduces in headless mode:
ghidrasql --ghidra /path/to/ghidra_12.1.2_PUBLIC \
--project ./proj --project-name test \
--binary sample.elf \
-q "SELECT COUNT(*) AS n FROM funcs;"
# Returns: 0 (after full analysis completes)
Tables affected
| Table |
Rows returned |
Expected |
funcs |
0 |
~80 |
strings |
0 |
>0 |
names |
0 |
>0 |
blocks |
0 |
>0 |
xrefs |
0 |
>0 |
instructions |
0 |
>0 |
imports |
0 |
>0 |
exports |
0 |
>0 |
Tables that work correctly
| Table |
Rows returned |
segments |
17 |
memory_blocks |
17 |
types |
22 |
pseudocode (with WHERE func_addr = X) |
1 |
decomp_lvars (with WHERE func_addr = X) |
correct |
decomp_tokens (with WHERE func_addr = X) |
correct |
comments |
correct |
Functions that work correctly
decompile(addr) — returns full pseudocode
save_database() — commits mutations
cache_stats() — shows valid freshness tokens and program path
program_revision() — returns correct revision number
Additional observations
db_info returns placeholder values for program_name and program_path ("active-program"), and empty strings for language_id, compiler_spec, md5, sha256. However cache_stats() shows correct program_id and program_path in the freshness token.
UPDATE funcs SET name = '...' WHERE address = 0xX succeeds (returns success: true) and the rename is reflected in subsequent decompile() output, despite SELECT on funcs returning 0 rows.
- The issue reproduces in both GUI-hosted (
--url) and headless (--ghidra) modes.
- Creating a fresh project with
--fresh --binary and letting full analysis complete does not resolve the issue.
disclosure: Claude wrote this for me.
Summary
When connecting ghidrasql 0.0.2 to LibGhidraHost extension version 12.1.2 (Ghidra 12.1.2), several core virtual tables return 0 rows despite a fully analyzed program being loaded. Decompiler-backed tables and a subset of metadata tables work correctly.
Environment
Reproduction
Tables affected
funcsstringsnamesblocksxrefsinstructionsimportsexportsTables that work correctly
segmentsmemory_blockstypespseudocode(withWHERE func_addr = X)decomp_lvars(withWHERE func_addr = X)decomp_tokens(withWHERE func_addr = X)commentsFunctions that work correctly
decompile(addr)— returns full pseudocodesave_database()— commits mutationscache_stats()— shows valid freshness tokens and program pathprogram_revision()— returns correct revision numberAdditional observations
db_inforeturns placeholder values forprogram_nameandprogram_path("active-program"), and empty strings forlanguage_id,compiler_spec,md5,sha256. Howevercache_stats()shows correctprogram_idandprogram_pathin the freshness token.UPDATE funcs SET name = '...' WHERE address = 0xXsucceeds (returnssuccess: true) and the rename is reflected in subsequentdecompile()output, despiteSELECTonfuncsreturning 0 rows.--url) and headless (--ghidra) modes.--fresh --binaryand letting full analysis complete does not resolve the issue.