带汇编程序的gdb:带进位标志的打印状态 [英] gdb with assembler: Print status of carry flag

查看:118
本文介绍了带汇编程序的gdb:带进位标志的打印状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个x86汇编程序,正在用gdb调试.有没有一种方法可以在gdb中打印进位标志的状态,例如"print $ cf"?

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"?

推荐答案

您可以使用:

info registers eflags

以获取整个标志集.您会看到类似以下的行:

to get the entire set of flags. You'll see a line like:

eflags  0x41  [ CF ZF ]

这意味着将eflags寄存器设置为0x41,并设置了进位和零标志.

which means that the eflags register is set to 0x41, with the carry and zero flags set.

这篇关于带汇编程序的gdb:带进位标志的打印状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆