NationalSecurityAgency/ghidra · error · RuntimeError
Usage: ghidra trace info-lcsp
Error message
Usage: ghidra trace info-lcsp
What it means
`ghidra trace info-lcsp` prints the Ghidra language/compiler-spec pair that `arch.compute_ghidra_lcsp()` will select for the current target. It takes no arguments — the pair is auto-detected, not supplied.
Source
Thrown at Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py:503
print("Trace active")
return result
@convert_errors
def ghidra_trace_info_lcsp(debugger: lldb.SBDebugger, command: str,
result: lldb.SBCommandReturnObject,
internal_dict: Dict[str, Any]) -> None:
"""Get the selected Ghidra language-compiler-spec pair.
Usage: ghidra trace info-lcsp
For diagnostics, shows the Ghidra language-compiler-spec pair that will be
selected when starting the trace.
"""
args = shlex.split(command)
if len(args) != 0:
raise RuntimeError("Usage: ghidra trace info-lcsp")
language, compiler = arch.compute_ghidra_lcsp()
print(f"Selected Ghidra language: {language}")
print(f"Selected Ghidra compiler: {compiler}")
@convert_errors
def ghidra_trace_txstart(debugger: lldb.SBDebugger, command: str,
result: lldb.SBCommandReturnObject,
internal_dict: Dict[str, Any]) -> None:
"""Start a transaction on the trace.
Usage: ghidra trace tx-start DESCRIPTION
DESCRIPTION must be in quotes if it contains spaces
"""
args = shlex.split(command)
if len(args) != 1:View on GitHub (pinned to d5f144c24d)
Solutions
- Call it with no arguments: `ghidra trace info-lcsp` — the pair is computed from the current target
Example fix
// before ghidra trace info-lcsp arm // after ghidra trace info-lcsp
Defensive patterns
Strategy: validation
Validate before calling
import shlex
def no_args(command: str) -> bool:
return len(shlex.split(command)) == 0 Try / catch
try:
ghidra_trace_info_lcsp(debugger, command, result, internal_dict)
except RuntimeError as e:
if str(e).startswith('Usage: ghidra trace info-lcsp'):
# drop arguments and retry
...
raise Prevention
- info-lcsp takes no arguments; the pair is auto-detected from the target
- Load/select a target first so the arch detection has something to read
When it happens
Trigger: `ghidra trace info-lcsp x86`; `ghidra trace info-lcsp aarch64`.
Common situations: Expecting to pass or override an architecture argument.
Related errors
- Usage: ghidra trace connect ADDRESS
- ADDRESS must be HOST:PORT
- port must be numeric
- ADDRESS must be PORT or HOST:PORT
- Usage: ghidra trace listen [ADDRESS]
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/c8bfb3d7c93d0288.
Report an issue: GitHub.