Debugging with GDB (September 2007)
Chapter 14: HP-UX Configuration-Specific Information 113
14 HP-UX Configuration-Specific Information
While nearly all GDB commands are available for all native and cross versions of the
debugger, there are some exceptions. This chapter describes features, commands and,
enhancements available only on HP-UX.
14.1 Summary of HP Enhancements to GDB
WDB provides the following features in addition to the standard GDB features:
• Support for debugging memory problems.
• Support for heap usage reporting
• The min-heap-size <num> option for set heap-check command reports the heap al-
locations that exceed the specified numb e r <num> of bytes based on the cumulative
numb e r of bytes that are allocated at each call-site, which is inclusive of multiple calls
to malloc at a particular call site.
• Heap checking commands info heap high-mem and set heap-check high-mem-count
X_number .
• Commands which, exit, info heap process and, info heap arena.
• WDB supports the +check compiler option on Integrity systems to invoke batch RTC,
to determine runtime memory problems.
• Enhanced batch RTC support, for better reporting, and options have replaced old ones.
• RTC heap corruption checks for calls to strcpy(), memset(), and memcpy() have been
added.
• Support for memory checking analysis for user defined memory management routines.
• High water mark records the number of times the brk() value changes.
• Heap analysis on programs with pending signals using the info leak command.
• Commands info module ADDRESS, show envvars, and info corruption.
• Command line option (-pid or -p) to attach to an existing process
• Support for debugging kernel threads and user threads.
• Support for enabling and disabling threads.
• Thread debugging commands set thread-check on/off, info thread [thread-id],
info mutex [mutex- id], info condvar [condvar-id], and, info rwlock [rwlock-
id].
• Enhanced thread debugging options for set thread-check command such as
recursive-relock, num-waiter, stack-util, thread-exit-no-join-detach,
thread-exit-own-mutex, cv-wait-no-mx, cv-multiple-mxs, mixed-sched-
policy, and unlock-not-own
• Serial debugging of a parent and child process.
• Support for Parallel Processing limited to pthread parallelism, but not the c ompiler-
generated parallelism, e.g. with directives.
• Implementation of ask mode for se t follow-fork-mode.
• Support for setting breakpoints using shared library name.