Add Condition to Watch the Memory Address in VC90

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ed

    Add Condition to Watch the Memory Address in VC90

    Hi, guys,
    In Visual Studio C++ 2008, I can add an item "*(int*)0x00385 fa0" in
    Watch window to catch the value in that memory address. The value
    evaluation is OK.
    The question is how can I know when the value in that address was
    changed. In the debugging mode, I want the program to be paused autoly
    when the value in that address was changed.

    In linux gdb, we could use the hardware watch to catch the address,
    when give addtional condition to the watch item.

    How can I do this in VC studio?

    Thanks!
  • SvenC

    #2
    Re: Add Condition to Watch the Memory Address in VC90

    Hi Ed,
    In Visual Studio C++ 2008, I can add an item "*(int*)0x00385 fa0" in
    Watch window to catch the value in that memory address. The value
    evaluation is OK.
    The question is how can I know when the value in that address was
    changed. In the debugging mode, I want the program to be paused autoly
    when the value in that address was changed.
    Choose Debug->New Breakpoint->New Data Breakpoint..
    You can specify the address and length of the data to watch for
    modifications.

    If that does not give you enough control you can also set a breakpoint
    with F9 at some line, right click the red break point symbol and specify
    filters, conditions and so on.

    --
    SvenC


    Comment

    • Ed

      #3
      Re: Add Condition to Watch the Memory Address in VC90

      On Oct 16, 2:02 pm, "SvenC" <Sv...@nospam.n ospamwrote:
      Hi Ed,
      >
      In Visual Studio C++ 2008, I can add an item "*(int*)0x00385 fa0" in
      Watch window to catch the value in that memory address. The value
      evaluation is OK.
      The question is how can I know when the value in that address was
      changed. In the debugging mode, I want the program to be paused autoly
      when  the value in that address was changed.
      >
      Choose Debug->New Breakpoint->New Data Breakpoint..
      You can specify the address and length of the data to watch for
      modifications.
      >
      If that does not give you enough control you can also set a breakpoint
      with F9 at some line, right click the red break point symbol and specify
      filters, conditions and so on.
      >
      --
      SvenC
      Thanks!!!
      "New Data Breakpoint" is exactly what I want.

      Comment

      Working...