14.29 Debugging optimized code

HP WDB supports debugging of optimized code (compiled with both -g and -O) for HP aC++, HP ANSI C and HP WDB for HP Itanium.

The following commands evaluate the name of a function and hence are affected by the optimization level of the program being debugged (in particular, due to inlining):

•break

•call

•clear

•disassem

•list

The following commands evaluate an expression referring to variables in the user pro- gram and hence, are affected by the optimization level of the program being debugged:

•break

•call

•cond

•jump

•return

•print

•set <var>

•watch

•whatis x

NOTE: The break and call commands involve evaluation of both the name of a function and an expression.

The following commands are also affected by the optimization level of the program being debugged:

•backtrace

•display

•down

•finish

•frame

•info *

•next

•step

•tbreak

•rbreak

•up

14.29 Debugging optimized code 227

Page 227
Image 227
HP gnu source-level debugger 5992-4701 manual Debugging optimized code, Break Call Clear Disassem List