{"record":{"id":"e382ba23922a1b8b","repo":"NationalSecurityAgency/ghidra","slug":"usage-ghidra-trace-put-frames","errorCode":null,"errorMessage":"Usage: ghidra trace put-frames","messagePattern":"Usage: ghidra trace put-frames","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py","lineNumber":1935,"sourceCode":"        fobj.insert()\n        robj = trace.create_object(fpath+\".Registers\")\n        robj.insert()\n    trace.proxy_object_path(STACK_PATTERN.format(\n        procnum=proc.GetProcessID(), tnum=t.GetThreadID())).retain_values(keys)\n\n\n@convert_errors\ndef ghidra_trace_put_frames(debugger: lldb.SBDebugger, command: str,\n                            result: lldb.SBCommandReturnObject,\n                            internal_dict: Dict[str, Any]) -> None:\n    \"\"\"Put the current thread's frames into the Ghidra trace.\n\n    Usage: ghidra trace put-frames\n    \"\"\"\n\n    args = shlex.split(command)\n    if len(args) != 0:\n        raise RuntimeError(\"Usage: ghidra trace put-frames\")\n\n    trace, tx = STATE.require_tx()\n    with trace.client.batch() as b:\n        put_frames()\n\n\n@convert_errors\ndef ghidra_trace_put_all(debugger: lldb.SBDebugger, command: str,\n                         result: lldb.SBCommandReturnObject,\n                         internal_dict: Dict[str, Any]) -> None:\n    \"\"\"Put everything currently selected into the Ghidra trace.\n\n    Usage: ghidra trace put-all\n    \"\"\"\n\n    args = shlex.split(command)\n    if len(args) != 0:\n        raise RuntimeError(\"Usage: ghidra trace put-all\")","sourceCodeStart":1917,"sourceCodeEnd":1953,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py#L1917-L1953","documentation":"Raised by ghidra_trace_put_frames when any argument is supplied. put-frames writes the current thread's stack frames to the trace and is parameterless (commands.py:1935). Frame selection is driven by LLDB's selected thread/frame, not command args.","triggerScenarios":"Appending a frame level/index like `ghidra trace put-frames 0`, or trailing tokens.","commonSituations":"Users try to publish a specific frame by level; the command always reflects the currently selected thread's full stack.","solutions":["Run bare: `ghidra trace put-frames`.","To change which frames appear, select the thread (`thread select`) and frame (`frame select`) in LLDB first."],"exampleFix":"// before\nghidra trace put-frames 0\n// after\nghidra trace put-frames","handlingStrategy":"validation","validationCode":"assert len(command.split()) == 0, \"put-frames takes no arguments\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["put-frames reflects the selected thread's stack — no frame-level arg.","Select thread/frame in LLDB first."],"tags":["lldb","ghidra","cli-usage","debugger-agent","stack-frames"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}