whatever0010011
whatever0010011

Reputation: 457

Ho to set the zero flag with lldb?

Is there a way to set the zero flag with the lldb debugger?

something like set ($eflags)= from gdb there only seems to be register write rflags ... to set all

Upvotes: 2

Views: 1383

Answers (2)

Lokendra Singh Rawat
Lokendra Singh Rawat

Reputation: 2275

Toggle ZF flag in gdb-pda

Screenshot while toggling ZF flag

gdb-peda$ set $eflags = 0x296 
gdb-peda$ p $eflags
$1 = [ PF AF SF IF ]
gdb-peda$ set $eflags = $eflags ^ 0x40
gdb-peda$ p $eflags
$2 = [ PF AF ZF SF IF ]

Upvotes: 2

0xced
0xced

Reputation: 26558

Here is a way to set the zero flag in lldb:

(lldb) register write rflags `$rflags|0x40`

Upvotes: 3

Related Questions