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/
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"session_id": "<session_id>",
"flag": "<flag>",
"value": "<value>"
},
"name": "pwndbg_setflag"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| flag | Yes | ||
| value | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |