setflag¤
Modify the flags register.
Alias: flag
Positional arguments¤
Positional Argument | Help |
---|---|
flag | Flag for which you want to change the value |
value | Value to which you want to set the flag - only valid options are 0 and 1 |
Optional arguments¤
Short | Long | Help |
---|---|---|
-h | --help | show this help message and exit |
Examples¤
On X86/X64:
setflag ZF 1 -- set zero flag
setflag CF 0 -- unset carry flag
On ARM:
setflag Z 0 -- unset the Z cpsr/xpsr flag
To see flags registers:
info reg eflags -- on x86/x64
info reg cpsr/xpsr -- on ARM (specific register may vary)
Notes¤
This command supports flags registers that are defined for architectures in the pwndbg/regs.py file.