Break when a register has an specific value?

眉间皱痕 提交于 2019-12-01 06:29:31

问题


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.


回答1:


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

See conditional breakpoints and also pseudo-register syntax for available register values



来源:https://stackoverflow.com/questions/16973882/break-when-a-register-has-an-specific-value

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!