{"record":{"id":"dcce0b87ebaf4c00","repo":"NationalSecurityAgency/ghidra","slug":"usage-ghidra-trace-put-watchpoints","errorCode":null,"errorMessage":"Usage: ghidra trace put-watchpoints","messagePattern":"Usage: ghidra trace put-watchpoints","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py","lineNumber":1660,"sourceCode":"        raise RuntimeError(\"Usage: ghidra trace put-breakpoints\")\n\n    trace, tx = STATE.require_tx()\n    with trace.client.batch() as b:\n        put_breakpoints()\n\n\n@convert_errors\ndef ghidra_trace_put_watchpoints(debugger: lldb.SBDebugger, command: str,\n                                 result: lldb.SBCommandReturnObject,\n                                 internal_dict: Dict[str, Any]) -> None:\n    \"\"\"Put the current process's watchpoints into the trace.\n\n    Usage: ghidra trace put-watchpoints\n    \"\"\"\n\n    args = shlex.split(command)\n    if len(args) != 0:\n        raise RuntimeError(\"Usage: ghidra trace put-watchpoints\")\n\n    trace, tx = STATE.require_tx()\n    with trace.client.batch() as b:\n        put_watchpoints()\n\n\ndef put_environment() -> None:\n    proc = util.get_process()\n    epath = ENV_PATTERN.format(procnum=proc.GetProcessID())\n    envobj = STATE.require_trace().create_object(epath)\n    envobj.set_value('Debugger', 'lldb')\n    envobj.set_value('Arch', arch.get_arch())\n    envobj.set_value('OS', arch.get_osabi())\n    envobj.set_value('Endian', arch.get_endian())\n    envobj.insert()\n\n\n@convert_errors","sourceCodeStart":1642,"sourceCodeEnd":1678,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py#L1642-L1678","documentation":"Raised by ghidra_trace_put_watchpoints when any argument is supplied. put-watchpoints writes the current process's watchpoints to the trace and is parameterless; the guard at commands.py:1660 rejects tokens.","triggerScenarios":"Passing a watchpoint id or address, e.g. `ghidra trace put-watchpoints 1`, or trailing text.","commonSituations":"Symmetry assumption: since breakpoints can be listed by id in LLDB, users assume watchpoints take a selector here. The agent always publishes all watchpoints for the current process.","solutions":["Invoke bare: `ghidra trace put-watchpoints`.","Set/select the desired watchpoint in LLDB before running; the command reflects current state."],"exampleFix":"// before\nghidra trace put-watchpoints 1\n// after\nghidra trace put-watchpoints","handlingStrategy":"validation","validationCode":"assert len(command.split()) == 0, \"put-watchpoints takes no arguments\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["put-watchpoints publishes all watchpoints of the current process.","No id/address selector is accepted."],"tags":["lldb","ghidra","cli-usage","debugger-agent","watchpoints"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}