Oracle® Solaris Studio 12.4: dbxtool Tutorial

Exit Print View

Updated: October 2014

Step 12: Using Fix to Further Verify The Diagnosis

Fix the code in place and verify that the bug has indeed gone away.

  1. Fix the code by putting the err_silent++ above the if statement.

    image:Editor window showing err_silent++                                                 moved
  2. Choose Debug > Apply Code Changes or press the Apply Code Changes button image:Apply Code Changes button .

  3. Disable the printField breakpoint and the watchpoint but leave the breakpoint in error() enabled.

    image:Breakpoints window
  4. Run the program again.

Note that the program completes without hitting the breakpoint in error() and its output is as expected.

image:Output window