Oracle® Solaris Studio 12.4: dbxtool Tutorial

Exit Print View

Updated: October 2014
 
 

Step 9: Using Watchpoints

    To create a watchpoint on err_silent:

  1. Select the err_silent variable, right-click, and choose New Breakpoint.

  2. Set Breakpoint Type to Access.

    Note how the Settings section changes and how the Address field is & err_silent.

  3. Select After in the When field.

  4. Select Write in the Operation field.

  5. Click OK.

    image:New Breakpoint window
  6. Run the program.

    You stop in init(). err_silent was incremented to 1 and execution stopped after that.

  7. Click Continue.

    You stop in init() again.

  8. Click Continue again.

    You stop in init() again.

  9. Click Continue again.

    You stop in init() again.

  10. Click Continue again.

    Now you stop in stopIn(). Things look OK here too, with no -1s.

Instead of clicking Continue over and over until err_silent is set to -1, you can set a breakpoint condition.