HP-UX 11i Version 2 Release Notes (October 2003)
Libraries and Programming
Debugging
Chapter 9
210
HP WDB provides several commands that help expose the memory related problems.
The commands will allow you to:
— Report memory leaks
— Report heap profile
— Stop at the free of unallocated or a deallocated block
— Stop when freeing a block if bad writes occur outside block boundary.
— Scramble previous memory contents during allocation and free.
A detailed list of commands and their usage can be found in the Debugging with
GDB manual at www.hp.com/go/wdb.
• Support for enabling/disabling threads for better DDE compatibility:
When debugging a multi-threaded application, if you suspect that a specific thread is
causing a problem, it is useful to suspend the other threads in the debugger and
debug the suspect thread. WDB provides commands to disable/enable the specific
threads:
—The thread disable command prevents specified threads from running until
they are enabled again using thread enable.
—The thread enable command allows the specified thread to run when you issue
a continue/step command. By default, all threads are enabled; ordinarily you use
thread enable to reactivate a disabled thread.
• Support for unwinding through corrupted PC:
WDB 4.0 supports stack tracing when the Program Counter is corrupted due to a call
through a bad function pointer.
• Support for stack traces in Java/C/C++ programs.
• Enhanced support for C++ templates - WDB 4.0 can work with templates without
having to specify details about the instantiation. This results in increased pattern
matching capabilities and better usability.
• New command: dumpcore
• Info threads command output has changed.
Previous changes available in published release notes at
http://www.docs.hp.com/hpux/dev/index.html#Debugging%20Tools.
Impact
• You may perceive improved performance up to 50% for bring up and 70% for
runtime.
• You will be able to do runtime memory checking and obtain a report of leaks and
heap usage and other memory checks.
• When debugging a multi-threaded application, you will be able to enable/disable
particular threads.
• You can obtain stacktraces in Java/C/C++ programs.
• You can work with templates without having to specify details about the
instantiation.