{"record":{"id":"efc90124f605cbf3","repo":"NationalSecurityAgency/ghidra","slug":"usage-ghidra-trace-tx-commit","errorCode":null,"errorMessage":"Usage: ghidra trace tx-commit","messagePattern":"Usage: ghidra trace tx-commit","errorType":"validation","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py","lineNumber":540,"sourceCode":"        raise RuntimeError(\"Usage: ghidra trace tx-start DESCRIPTION\")\n    description = args[0]\n\n    STATE.require_no_tx()\n    STATE.tx = STATE.require_trace().start_tx(description, undoable=False)\n\n\n@convert_errors\ndef ghidra_trace_txcommit(debugger: lldb.SBDebugger, command: str,\n                          result: lldb.SBCommandReturnObject,\n                          internal_dict: Dict[str, Any]) -> None:\n    \"\"\"Commit the current transaction.\n\n    Usage: ghidra trace tx-commit\n    \"\"\"\n\n    args = shlex.split(command)\n    if len(args) != 0:\n        raise RuntimeError(\"Usage: ghidra trace tx-commit\")\n\n    STATE.require_tx()[1].commit()\n    STATE.reset_tx()\n\n\n@convert_errors\ndef ghidra_trace_txabort(debugger: lldb.SBDebugger, command: str,\n                         result: lldb.SBCommandReturnObject,\n                         internal_dict: Dict[str, Any]) -> None:\n    \"\"\"Abort the current transaction.\n\n    Usage: ghidra trace tx-abort\n\n    Use only in emergencies. This may not always succeed, and it may leave the\n    trace in an inconsistent state.\n    \"\"\"\n\n    args = shlex.split(command)","sourceCodeStart":522,"sourceCodeEnd":558,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py#L522-L558","documentation":"`ghidra trace tx-commit` commits the currently open transaction and takes no arguments. Any extra token aborts before the commit, leaving the transaction open.","triggerScenarios":"`ghidra trace tx-commit now`; `ghidra trace tx-commit force`.","commonSituations":"Appending a confirmation keyword this command does not recognize.","solutions":["Call it with no arguments: `ghidra trace tx-commit`"],"exampleFix":"// before\nghidra trace tx-commit force\n// after\nghidra trace tx-commit","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_txcommit(debugger, command, result, internal_dict)\nexcept RuntimeError as e:\n    if str(e).startswith('Usage: ghidra trace tx-commit'):\n        # drop arguments and retry\n        ...\n    raise","preventionTips":["tx-commit takes no arguments","Always pair every tx-start with a tx-commit to avoid leaving a transaction open"],"tags":["ghidra","lldb","cli","validation","transaction"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}