开发者

How to set a Data Breakpoint, to break when EAX Register is set to a particular value

开发者 https://www.devze.com 2022-12-17 08:30 出处:网络
There is a article in MSDN which provides the procedure: http://msdn.microsoft.com/en-us/library/aa295838(VS.60).aspx#_core_setting_a_breakpoint_when_a_register_expression_is_true

There is a article in MSDN which provides the procedure: http://msdn.microsoft.com/en-us/library/aa295838(VS.60).aspx#_core_setting_a_breakpoint_when_a_register_expression_is_true

But it seems that i tis for visual studio 6 ... Actually I can not find the "Breakpoint" entry under "Edit" Menu...

Do you know how to do that? I want to break when EAX changes to an error code so I can find the place where this error is开发者_开发百科 returned.


Assuming you are using Visual Studio 2008, you can find it in its own Debug menu.


You need to create a breakpoint. In the Breakpoint Windows ( Debug->Windows->Breakpoint ) right-click the BP and select condition.

In the condition-field you can just type the expression ( "eax == ebx" ).


Just to be explicit about what @DarthCoder said:

  1. First create a plain breakpoint, so there's something to edit
  2. Then Debug->Windows->Breakpoint brings up the list of breakpoints, including the one you just made
  3. Right-click on the breakpoint, pick "Condition"
  4. Enter the condition, such as eax==ebx
0

精彩评论

暂无评论...
验证码 换一张
取 消