I've got an x86 assembler program which I'm debugging with gdb. Is there a way to print the status of the carry flag inside gdb with, like, "print $cf"?
You can use:
info registers eflags
to get the entire set of flags. You'll see a line like:
eflags 0x41 [ CF ZF ]
which means that the eflags
register is set to 0x41
, with the carry and zero flags set.