If the size of executable is critical to your application, you can use the +stripoption to remove symbol table information from the production version of your program. If you compile and link on separate command lines, you must use the +stripoption on both command lines. Instead of recompiling with +strip, you can use the strip utility, which removes all debugging information, including the symbol table.
If the size of your executable is not important, you may want to retain the symbol table in the production version of your program. This table can be used by the debugger to provide minimal debugging. If a program has not been compiled with
The amount of code that the symbol table information that adds to an executable is considerably less than the amount that compiling with
Handling runtime exceptions
Broadly defined, an exception is an error or fault condition that affects a program’s results. Exceptions can range from the relatively begin in exact result condition that occurs in certain
Exceptions that threaten the integrity of the operating system can cause
There are also a
Programs that have been compiled with the +fp_exception option can trap the exceptions listed in
Table 25 Signals recognized by +fp_exception
Signal | Exception |
|
|
SIGBUS | Bus error instruction |
|
|
SIGFPE | |
|
|
SIGILL | Illegal instruction |
|
|
SIGSEGV | Segmentation violation or memory fault |
|
|
SIGSYS | Bad argument to a kernel system call |
|
|
When a program compiled with +fp_exception takes an exception, the following events occur:
•The program traps the exception.
•A procedure traceback is displayed on standard error. A procedure traceback lists routine names and their offsets that are helpful in locating the code that triggered the exception.
•The program aborts.
Handling runtime exceptions 77