pwndbg_setflag
Set individual CPU flags (ZF, CF, SF, OF) to 0 or 1 without modifying the entire flags register during debugging.
Instructions
Modify a CPU flag in the flags register.
pwndbg command: setflag (alias: flag) Source: pwndbg/commands/flags.py Category: Register
Allows setting individual flag bits (ZF, CF, SF, OF, etc.) without modifying the entire flags register.
Args: session_id: The UUID of the session. flag: Flag name (e.g. "ZF", "CF", "SF", "OF"). value: Value to set (0 or 1).
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/flags/
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| flag | Yes | ||
| value | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |