Oracle® Solaris Studio 12.4: Debugging a Program With dbx

Exit Print View

Updated: January 2015
 
 

Using Suppression to Manage Errors

For the initial run on a large program, the large number of errors might be overwhelming. Consider taking a phased approach. You can do so using the suppress command to reduce the reported errors to a manageable number, fixing just those errors, and repeating the cycle. This enables you to suppress fewer and fewer errors with each iteration.

For example, you could focus on a few error types at one time. The most common error types typically encountered are rui, rua, and wua, usually in that order. rui errors are less serious, although they can cause more serious errors to happen later. Often a program might still work correctly with these errors. rua and wua errors are more serious because they are accesses to or from invalid memory addresses and always indicate a coding error.

You can start by suppressing rui and rua errors. After fixing all the wua errors that occur, run the program again, suppressing only rui errors. After fixing all the rua errors that occur, run the program again with no errors suppressed. Fix all the rui errors. Lastly, run the program a final time to ensure that no errors are left.

If you want to suppress the last reported error, use suppress -last.