HP WDB GUI 5.7 Reference Manual (September 2007)

vi
Viewing source code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
To view your source code in the source view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
To use the pop-up menu in the Source View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Viewing assembly code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
To view code in the Disassembly View. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
To see the Disassembly View in a separate window . . . . . . . . . . . . . . . . . . . . . . . . 60
To use the pop-up menu in the Disassembly View . . . . . . . . . . . . . . . . . . . . . . . . . 60
Viewing variables using Dwell. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
To view the value of a variable or expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Fixing the Code from within the Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Fixing code and continuing your program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
To edit your source code in the debugger. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Explicitly requesting the debugger for monitoring or rebuilding files . . . . . . . . . . . 64
To explicitly request for monitoring a specific file for changes. . . . . . . . . . . . . . . . 64
To request an immediate rebuild of a specific file . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Examining build errors and warnings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Restrictions on fixing code from within the debugger . . . . . . . . . . . . . . . . . . . . . . . . 65
Finding Specific Text in Your Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
To find text or a regular expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
To find the next match . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Tips. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68
Displaying Memory Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Viewing Assembly Instruction Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Saving and Restoring Debug Sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
To save a debug session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Restoring a debug session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Tips. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .73
Debugging Memory Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Viewing Memory Leaks and Heap Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Viewing the Incremental Heap Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Viewing the Arena Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Enabling and Disabling Specific Threads. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Advanced Thread Debugging Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Support for info thread, info thread <thread-id> and set thread check <on/off> . . . 81
Support for info mutex and info mutex <mutex-id> . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Support for info rwlock and info rwlock <rwlock-id> . . . . . . . . . . . . . . . . . . . . . . . . . 82