Copyright © 2011 Hewlett-Packard Development Company, L.P
Legal Notices
Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license.
The information contained in this document is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein.
UNIX is a registered trademark of The Open Group.
Intel and Itanium are trademarks or registered trademarks of Intel Corporation or its subsidaries in the United States and other countries.
January 2011
Table of Contents
List of Tables
HP Wildebeest Debugger (WDB) 6.2 is an HP-supported implementation of the open source debugger GDB. It supports source-level debugging of programs written in HP C, HP aC++, and Fortran 90 on Itanium®-based systems running HP-UX 11i v2 or HP-UX 11i v3, and HP 9000 systems running HP-UX 11i v1, HP-UX 11i v2, or HP-UX 11i v3.
This document discusses the most recent product information for HP WDB 6.2.
For the latest version of HP WDB, see the HP WDB Technical Resources website at:
This section describes the following new features in this version of HP WDB:
With this feature, you can obtain a report containing the list of file descriptors corresponding to files open by an application at the point of its exit. The report not only provides you the name and type of those files, but also details like backtrace and function names at the point of the files being opened. This enables you to identify potential file descriptor leaks in the application.
| Note: | |
|---|---|
|
This feature is currently supported only on HP Integrity systems. |
|
When you debug Fortran applications the following syntax is supported while printing variables in gdb expressions:
<procedure>::<variable>
<procedure>::<internal_procedure>::<variable>
where 'procedure' may be a function or a subroutine.
WDB is made smarter now in printing the function pointers. It now decodes extra level of indirection for the programmer’s convenience.
A note will be appended to every memory debugging report providing more details for function names displayed as ???.
From version B.12.56, the HP-UX/Integrity linker has added an option +dbgfile <path>. This option enables you to emit debug information separately to the file specified by 'path', instead of the target executable/library. Gdb supports debugging from the side debug file, produced with the +dbgfile linker option.
| Note: | |
|---|---|
|
This feature is currently supported only on HP Integrity systems. |
|
HP-UX does not include mmap-ed regions with MAP_SHARED mappings or MAP_PRIVATE with Read-Only permission in core. With the mmapfile command of gdb, you can add mmap-ed sections while debugging core files. This can be done during the debug session of the core file, helping you to debug using the memory contents from the missing mmap-ed regions in core file.
| Note: | |
|---|---|
|
This feature is currently supported only on HP Integrity systems. |
|
The following defects are fixed in HP WDB 6.2:
Gdb shows extra signal 0 on interruption, when attached to a process from another shell.
Gdb cannot print <file_name>::<variable> correctly for both global and static variables under certain conditions.
Gdb cannot resolve symbol names and backtraces for ILP32 binaries with text segment size > 1 GB.
Gdb shows wrong line numbers for some functions for ILP32 binaries with text segment size > 1 GB.
Gdb sometimes does not execute step/next commands properly for ILP32 binaries with text segment size > 1 GB.
Gdb shows bad argument values for some functions for ILP32 binaries with text segment size > 1 GB.
Gdb does not detect core file and executable mismatch and sometimes crashes in dld.
User disabled watchpoint gets wrongly re-enabled automatically.
Gdb sometimes wrongly gives out a message that the target program received SIGSEGV, when a misaligned load is retired and a wacthpoint is set.
Gdb sometimes crashes after watchpoint is set on local variable.
Gdb crashes if the application has mangled names with anonymous namespace <unnamed namespace>, not followed by the scope resolution operator ::
$ gdb -e <program name> cannot load symbols and allow the process to run.
Wdb runs out of memory on HP 9000 servers and crashes on Integrity servers for Fortran programs during the application run, when the debug information for function parameters contains incorrect memory addresses.
Wdb dumps core when debugging a C++ program on HP-UX 11.23 Integrity systems, when a typeinfo mangled name does not contain a variable name.
This section describes known problems and the suggested workarounds in this release of HP WDB.
The find command does not search the entire memory.
The HP WDB find command does not search the pattern in the entire memory address range starting from 0x0 to 0xff..ff. It displays the following warning message:
(gdb) find 010,0xffffffffffffff,"hello" warning: Unable to access target memory at 0x8, halting search. Pattern not found.
Performance Degradation in Memory Debugging
For 64-bit applications on HP-UX 11i v2 and later on Integrity systems, heap check performance degrades when the string option is set in the set heap-check command:
Incorrect usage of . and -> while printing the values for C++ applications
WDB allows users to interchangeably use "." and "->" while printing values for C++ applications. WDB incorrectly allows users to use "." with a pointer variable and "->" with a reference variable while printing the value for C++ applications.
Mismatch Between dld.so Libraries Causes Issues
A mismatch in the dld.so libraries available in the core file and in the system might cause issues in unwinding beyond some frames within the libc.so library. The workaround is to use the packcore command to obtain the core file and the involved load modules into the system on which the debugging occurs.
Debugging an attached process that is not compiled for debugging may generate warnings
On attaching the debugger to a program that is not compiled for debugging, the process may stop in a system call and the following warning message about the various registers is displayed:
No data warning: reading 'r3' register: No data warning: reading 'r4' register: No data warning: reading 'r5' register: No data warning: reading 'r6' register: No data warning
This warning occurs when executing the step command, the backtrace command, or when attempting to view the register information. To avoid this warning message, use the finish command to execute the process until the system call returns. This warning message is generated when the process stops at a system call, and the registers cannot be read by the debugger. When the debugger calls the routine ttrace, it returns this warning.
Error attaching WDB to a process that is traced by tools using ttrace
HP WDB cannot attach to a process that is traced by tools that use ttrace, such as Caliper, adb, and tusc.
The debugger displays the following error message while attempting to attach to such a process:
Attaching to process <pid> failed. Hint: Check if this process is already being traced by another gdb or other ttrace tools like caliper and tusc. Hint: Check whether program is on an NFS-mounted file-system. If so,you will need to mount the file system with the "nointr" option with mount(1) or make a local copy of the program to resolve this problem.
This section describes known issues in this release of HP WDB.
During the execution of advanced thread checking for applications that fork, in the interactive mode, the following message appears if the GDB follows the child:
Pthread analysis file missing!
This error message appears because the thread-error information for the forked process is not available. However, if the forked process exec() s another binary, the thread-error information is available for the exec-ed binary.
In both interactive and batch modes, if the applications exceed their thread stack utilization, the following error message appears:
Error accessing memory address!
This occurs when GDB attempts a command line call on an already overflowing thread stack.
Following are known issues in mixed mode debugging:
Listing of registers currently in use for PA-RISC 32-bit shared library frames causes the unswizzled 32-bit values to be displayed.
Clicking on the registers tab for a PA-RISC frame in the WDB-GUI results in incorrect register information being displayed. Alternatively, execute the info reg command at the gdb prompt in the Commands tab.
For a signal handler invoked while executing in a PA-RISC routine, when the info frame command is run on the signal handler called frame, the saved libaries32.so IP address is displayed, rather than the PCOQH value of the PA-RISC routine.
Printing the value of a floating point register using the print command does not work. The info reg command must be used.
This section describes known limitations in this release of HP WDB.
WDB is unable to hit breakpoints placed on constructors in case of multiple inheritance.
WDB is unable to make command-line calls to string methods when there are no calls to these methods from the application.
In Fortran programs containing nested procedures, WDB may not print values of local variables for outer or parent procedure inside its internal subroutine.
On PA-RISC systems, the batch mode memory debugging might fail if the application uses atfork handlers. This issue is resolved in HP WDB 6.1 onwards on Itanium systems.
The feature does not obtain the thread-error information in batch mode for forked process in a multiprocessing application. However, if the librtc.sl library is pre-loaded, the debugger obtains the thread-error information in the batch mode for exec-ed application.
HP WDB cannot execute both batch mode thread check and batch mode heap check together. If the rtcconfig file has both entries, then batch heap check overrides the batch thread check.
The following are not supported for mixed mode debugging:
Listing the arguments (using the info args command) for a selected PA-RISC frame during corefile debugging. Alternatively, the disassembly instructions or runtime conventions can be examined to identify the locations of the arguments and the values at these locations can be displayed using the print or x command.
Printing the local variables of the selected frame (using the info locals command) for a selected PA-RISC frame during corefile debugging. Alternatively, the disassembly instructions can be examined to identify the locations of the arguments and the values at these locations of the local variables can be displayed using the print or x command.
Executing the backtrace_other_thread command for a frame belonging to a PA-RISC library.
Printing the description of the type of expression or data type (using the ptype command) on a PA-RISC symbol.
On HP 9000 systems for 32-bit and 64-bit applications, printing of local variable values may be inaccurate for +O1 and higher optimizations.
This section discusses the installation information for HP WDB.
Table 1 lists the swinstall products for HP WDB.
Table 1 HP WDB Installation
| Product Name | Description |
|---|---|
| HP WDB | HP WDB -The HP implementation of the open source debugger GDB |
| HP WDB GUI | Optional graphical user interface component for HP WDB |
If you install HP WDB GUI on a system where HP WDB has not yet been installed, HP WDB is installed automatically.
The HP WDB product contains the following components:
WDB: Runtime contains one fileset
WDB-DOC: Documentation contains one fileset
WDB-MAN: Manuals contains one fileset
| Note: | |
|---|---|
|
DEBUG-PRG and SENTINEL are co-requisite filesets for HP WDB and are automatically selected during installation. |
|
The WDB GUI product contains the following sub-products:
WDB-GUI-RUN: Runtime contains one fileset
WDB-GUI-HELP: Help contains one fileset
WDB-GUI-MAN: Manuals contain one fileset
HP WDB GUI requires the HP WDB product. If HP WDB is not already installed, it is automatically selected during installation.
To install HP WDB, run the SD-UX swinstall command. It invokes a user interface that leads you through the installation. It also gives you information about disk space requirements, version numbers, product descriptions, and dependencies.
For specific installation instructions, see the HP WDB Technical Resources website at:
For more information on installation procedures and related issues, see the Managing HP-UX Software with SD-UX and other README, installation, and upgrade documentation provided with the HP-UX 11.x operating system package.
HP WDB documentation is available at the following location:
Table 2 lists the documents available for HP WDB.
Table 2 HP WDB Documentation
| Document | Format | Location |
|---|---|---|
|
Debugging with GDB |
|
/opt/langtools/wdb/doc/gdb.pdf Emacs: /opt/langtools/wdb/doc/gdb.info (Copy the files to your info directory first.) |
|
GDB Quick Reference Card |
|
/opt/langtools/wdb/doc |
|
Getting Started with HP WDB |
HTML |
/opt/langtools/wdb/doc/html/wdb/C/GDBtutorial.html |
|
XDB to WDB Transition Guide |
HTML |
/opt/langtools/wdb/doc/index.html |
|
Using the HP WDB Terminal User Interface |
HTML |
/opt/langtools/wdb/doc/index.html |
| GDB manpage | gdb(1) |
The following mailing lists are available for announcements and discussions on WDB:
hpux-development-public@lists.hp.com
To subscribe, send “sub hpux-development-public” as the subject line to sympa@lists.hp.com
hpux-development-public-announce@lists.hp.com
To subscribe, send “sub hpux-development-public-announce” as the subject line to sympa@lists.hp.com