{"record":{"id":"3ae6c8b1d8de100f","repo":"NationalSecurityAgency/ghidra","slug":"usage-ghidra-trace-put-processes","errorCode":null,"errorMessage":"Usage: ghidra trace put-processes","messagePattern":"Usage: ghidra trace put-processes","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py","lineNumber":1487,"sourceCode":"        with trace.open_tx('State'):\n            procobj = trace.create_object(ipath)\n            state = \"STOPPED\" if event_process.is_stopped else \"RUNNING\"\n            procobj.set_value('State', state)\n            procobj.insert()\n\n\n@convert_errors\ndef ghidra_trace_put_processes(debugger: lldb.SBDebugger, command: str,\n                               result: lldb.SBCommandReturnObject,\n                               internal_dict: Dict[str, Any]) -> None:\n    \"\"\"Put the list of processes into the trace's Processes list.\n\n    Usage: ghidra trace put-processes\n    \"\"\"\n\n    args = shlex.split(command)\n    if len(args) != 0:\n        raise RuntimeError(\"Usage: ghidra trace put-processes\")\n\n    trace, tx = STATE.require_tx()\n    with trace.client.batch() as b:\n        put_processes()\n\n\ndef put_available() -> None:\n    trace = STATE.require_trace()\n    availables = util.AVAILABLE_INFO_READER.get_availables()\n    keys = []\n    for proc in availables:\n        ppath = AVAILABLE_PATTERN.format(pid=proc.pid)\n        procobj = trace.create_object(ppath)\n        keys.append(AVAILABLE_KEY_PATTERN.format(pid=proc.pid))\n        procobj.set_value('PID', proc.pid)\n        if isinstance(proc, util.Available):\n        \tprocobj.set_value('Name', proc.name)\n        \tprocobj.set_value('_display', f'{proc.pid} {proc.command}')","sourceCodeStart":1469,"sourceCodeEnd":1505,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py#L1469-L1505","documentation":"Raised by ghidra_trace_put_processes when any argument is supplied. put-processes takes no parameters: it enumerates the live target's processes and writes them into the trace's Processes list. The len(args)!=0 guard at commands.py:1487 rejects all tokens.","triggerScenarios":"Typing `ghidra trace put-processes all`, appending a process id thinking it filters (`put-processes 1234`), or stray trailing text/quotes after the command name.","commonSituations":"Users coming from gdb/other agents expect a selector argument; or a script concatenates a variable that is empty in some runs and non-empty in others, adding an unwanted token.","solutions":["Run the command bare: `ghidra trace put-processes`.","If you meant a specific process, select it in LLDB (process select / target) then run put-processes, or use put-all.","Sanitize wrapper scripts so no extra tokens are appended."],"exampleFix":"// before\nghidra trace put-processes 1234\n// after\nghidra trace put-processes","handlingStrategy":"validation","validationCode":"assert len(command.split()) == 0, \"put-processes takes no arguments\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["All put-* zero-arg commands reflect current LLDB selection — never pass a selector.","Select the process in LLDB first when you need a specific one.","Strip template placeholders from scripted commands."],"tags":["lldb","ghidra","cli-usage","debugger-agent","processes"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}