Break when a register has an specific value?

前端 未结 1 1436
借酒劲吻你
借酒劲吻你 2021-01-14 03:36

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,

相关标签:
1条回答
  • 2021-01-14 03:57

    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

    0 讨论(0)
提交回复
热议问题