当寄存器具有特定值时中断? [英] Break when a register has an specific value?

查看:23
本文介绍了当寄存器具有特定值时中断?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当将特定值分配给 eax 寄存器时,有什么方法可以使 Windbg 中断?我知道我的程序中的一个函数正在返回一个特定的错误,这样可以很快找到有罪的.

Any way to make Windbg to break when a specific value is assigned to the eax register? I know one of the functions in my program is returning an specific error, it would be very fast to find the guilty this way.

推荐答案

您可以在所有可疑函数上设置断点,然后像这样检查 eax 寄存器值:

You can set a breakpoint on all your suspect functions and then check the eax register value like so:

bp myAddress ".if (@retreg == dodgyVal) {walk the stack and do other cool stuff} .else {gc}"

参见条件断点 以及 伪-可用寄存器值的寄存器语法

这篇关于当寄存器具有特定值时中断?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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