{"record":{"id":"c8bfb3d7c93d0288","repo":"NationalSecurityAgency/ghidra","slug":"usage-ghidra-trace-info-lcsp","errorCode":null,"errorMessage":"Usage: ghidra trace info-lcsp","messagePattern":"Usage: ghidra trace info-lcsp","errorType":"validation","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py","lineNumber":503,"sourceCode":"    print(\"Trace active\")\n    return result\n\n\n@convert_errors\ndef ghidra_trace_info_lcsp(debugger: lldb.SBDebugger, command: str,\n                           result: lldb.SBCommandReturnObject,\n                           internal_dict: Dict[str, Any]) -> None:\n    \"\"\"Get the selected Ghidra language-compiler-spec pair.\n\n    Usage: ghidra trace info-lcsp\n\n    For diagnostics, shows the Ghidra language-compiler-spec pair that will be\n    selected when starting the trace.\n    \"\"\"\n\n    args = shlex.split(command)\n    if len(args) != 0:\n        raise RuntimeError(\"Usage: ghidra trace info-lcsp\")\n\n    language, compiler = arch.compute_ghidra_lcsp()\n    print(f\"Selected Ghidra language: {language}\")\n    print(f\"Selected Ghidra compiler: {compiler}\")\n\n\n@convert_errors\ndef ghidra_trace_txstart(debugger: lldb.SBDebugger, command: str,\n                         result: lldb.SBCommandReturnObject,\n                         internal_dict: Dict[str, Any]) -> None:\n    \"\"\"Start a transaction on the trace.\n\n    Usage: ghidra trace tx-start DESCRIPTION\n        DESCRIPTION must be in quotes if it contains spaces\n    \"\"\"\n\n    args = shlex.split(command)\n    if len(args) != 1:","sourceCodeStart":485,"sourceCodeEnd":521,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py#L485-L521","documentation":"`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.","triggerScenarios":"`ghidra trace info-lcsp x86`; `ghidra trace info-lcsp aarch64`.","commonSituations":"Expecting to pass or override an architecture argument.","solutions":["Call it with no arguments: `ghidra trace info-lcsp` — the pair is computed from the current target"],"exampleFix":"// before\nghidra trace info-lcsp arm\n// after\nghidra trace info-lcsp","handlingStrategy":"validation","validationCode":"import shlex\ndef no_args(command: str) -> bool:\n    return len(shlex.split(command)) == 0","typeGuard":null,"tryCatchPattern":"try:\n    ghidra_trace_info_lcsp(debugger, command, result, internal_dict)\nexcept RuntimeError as e:\n    if str(e).startswith('Usage: ghidra trace info-lcsp'):\n        # drop arguments and retry\n        ...\n    raise","preventionTips":["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"],"tags":["ghidra","lldb","cli","validation","arch"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}