{"record":{"id":"bdbb4c62dd0c0dad","repo":"NationalSecurityAgency/ghidra","slug":"usage-ghidra-trace-info","errorCode":null,"errorMessage":"Usage: ghidra trace info","messagePattern":"Usage: ghidra trace info","errorType":"validation","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py","lineNumber":474,"sourceCode":"    STATE.require_client()\n    if STATE.trace is not None:\n        STATE.trace.close()\n        STATE.reset_trace()\n    start_trace(name)\n\n\n@convert_errors\ndef ghidra_trace_info(debugger: lldb.SBDebugger, command: str,\n                      result: lldb.SBCommandReturnObject,\n                      internal_dict: Dict[str, Any]) -> None:\n    \"\"\"Get info about the Ghidra connection.\n\n    Usage: ghidra trace info\n    \"\"\"\n\n    args = shlex.split(command)\n    if len(args) != 0:\n        raise RuntimeError(\"Usage: ghidra trace info\")\n\n    result = {}\n    if STATE.client is None:\n        print(\"Not connected to Ghidra\")\n        return\n    host, port = STATE.client.s.getpeername()\n    print(f\"Connected to Ghidra at {host}:{port}\")\n    if STATE.trace is None:\n        print(\"No trace\")\n        return\n    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:","sourceCodeStart":456,"sourceCodeEnd":492,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py#L456-L492","documentation":"`ghidra trace info` prints connection and trace status and takes no arguments. Any extra token aborts before the status is printed.","triggerScenarios":"`ghidra trace info verbose`; `ghidra trace info all`.","commonSituations":"Expecting a verbosity flag or filter that this command does not support.","solutions":["Call it with no arguments: `ghidra trace info`"],"exampleFix":"// before\nghidra trace info all\n// after\nghidra trace info","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(debugger, command, result, internal_dict)\nexcept RuntimeError as e:\n    if str(e).startswith('Usage: ghidra trace info'):\n        # drop arguments and retry\n        ...\n    raise","preventionTips":["Info takes no arguments and has no verbosity flags","Use it to verify connection/trace state before other commands"],"tags":["ghidra","lldb","cli","validation"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}