NationalSecurityAgency/ghidra · error · RuntimeError

Usage: ghidra trace put-breakpoints

Error message

Usage: ghidra trace put-breakpoints

What it means

Raised by ghidra_trace_put_breakpoints when any argument is given. The command pushes the current process's breakpoints into the trace and takes no parameters; the len(args)!=0 check at commands.py:1642 rejects all arguments.

Source

Thrown at Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py:1642

        b = target.GetWatchpointAtIndex(i)
        keys.append(WATCHPOINT_KEY_PATTERN.format(watchnum=b.GetID()))
        put_single_watchpoint(b, proc)
    cont_obj.insert()
    cont_obj.retain_values(keys)


@convert_errors
def ghidra_trace_put_breakpoints(debugger: lldb.SBDebugger, command: str,
                                 result: lldb.SBCommandReturnObject,
                                 internal_dict: Dict[str, Any]) -> None:
    """Put the current process's breakpoints into the trace.

    Usage: ghidra trace put-breakpoints
    """

    args = shlex.split(command)
    if len(args) != 0:
        raise RuntimeError("Usage: ghidra trace put-breakpoints")

    trace, tx = STATE.require_tx()
    with trace.client.batch() as b:
        put_breakpoints()


@convert_errors
def ghidra_trace_put_watchpoints(debugger: lldb.SBDebugger, command: str,
                                 result: lldb.SBCommandReturnObject,
                                 internal_dict: Dict[str, Any]) -> None:
    """Put the current process's watchpoints into the trace.

    Usage: ghidra trace put-watchpoints
    """

    args = shlex.split(command)
    if len(args) != 0:
        raise RuntimeError("Usage: ghidra trace put-watchpoints")

View on GitHub (pinned to d5f144c24d)

Solutions

  1. Run it bare: `ghidra trace put-breakpoints`.
  2. To target another process, switch LLDB's selected process first, then run the command.
  3. For a single breakpoint use put-all or rely on hooks/sync to update automatically.

Example fix

// before
ghidra trace put-breakpoints 2
// after
ghidra trace put-breakpoints
Defensive patterns

Strategy: validation

Validate before calling

assert len(command.split()) == 0, "put-breakpoints takes no arguments"

Prevention

When it happens

Trigger: Appending a breakpoint id (`put-breakpoints 1`), a process qualifier, or trailing whitespace-split text to the command.

Common situations: Users expect to refresh a single breakpoint by id; or pass a process number because the trace is multi-process. The command always operates on the current process.

Related errors


AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14). Data as JSON: /api/errors/09424d20e914454b. Report an issue: GitHub.