Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX 11i Version 1.5 Release Notes: release id B.11.20for rx9610 and rx4610 hp serversand i2000 hp workstations > Chapter 7 Programming

New Unwind Library

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

HP-UX 11i Version 1.5 (B.11.20) includes a procedure call stack unwind support library, libunwind (also accessible by linking to libcl). With the new library, you need not link to a large library which contains unrelated support such as Pascal Try/Recover, Fortran IO, and Packed Decimal support to use the unwind functions. Changes to the library include:

  • interface improvements to encapsulate data structures which are sensitive to changes in the architecture

  • removal of COBOL Packed Decimal and Pascal language support features

  • separation from Fortran IO support features (Fortran IO support will be delivered in a separate shared library)

  • newly added unwind.h header file located in /usr/include/unwind.h

  • fully supports the C++ ABI for Itanium architecture: Exception Handling, a language independent exception handling support specification

Unwind Library Interface Improvements

Value get and put functions will be used to read and to modify the unwind context data structure. This allows the library to properly encapsulate the data, protecting client code from changes in the implementation of the unwinder.

Function name, signature, and specification changes: Because the unwinder is sensitive to the processor architecture and the run-time architecture, the IPF unwinder will have different entry points than the PA unwinder. Type

man U_STACK_TRACE

or

man 5 unwind

for unwinder documentation.

The set of text error messages produced by the unwind library has been replaced with the enumeration _UNW_ReturnCode in the /usr/include/unwind.h header file. This allows programatic operation of the unwinder.

NOTE: The U_STACK_TRACE() function is unchanged. It is the most commonly used and least architecturally dependent interface into the unwinder. A large percentage of customers who use Unwind only use U_STACK_TRACE().

Unwind Library Name Changes

HP-UX 11i Version 1.5 (B.11.20) includes both 32 and 64 bit versions of the unwind library. The 32 bit version is at

/usr/lib/hpux32/libunwind.so.1

and linked to

/usr/lib/hpux32/libunwind.so

The 64 bit version is at

/usr/lib/hpux64/libunwind.so.1

and linked to

/usr/lib/hpux64/libunwind.so

To prevent link line compatibility issues during a port from PA to IPF, /usr/lib/hpux32/libcl.so and /usr/lib/hpux64/libcl.so each list the appropriate libunwind.so as a dependency. Also, libcl.so lists the appropriate Fortran I/O support library as a dependency.

Unwind Library Compatibility

Developers writing stack unwind routines should be aware of the following porting compatibility issues:

  • Applications which used the PA unwind library (in libcl) to perform analysis when encountering an exception or a breakpoint (as in a debugger) and which used entry points other than U_STACK_TRACE() will need to change calls to the unwinder and interpret the return codes in the enumeration _UNW_ReturnCode.

  • Functional equivalents to U_init_frame_record(), U_resume_executionx(), and U_get_previous_frame_x() are provided. The new interface does not require (and therefore does not have functional equivalents to) U_prep_frame_rec_for_unwind(), U_update_state_vectorx(), and U_copy_frame_info().

Unwind Library Documentation

Information on entry points to the unwinder can be found on the unwind(5) manual page.

Additional information about the generation and layout of unwind information on Itanium-based systems, and about coding conventions for producing unwindable code, but not about the unwind library itself, is available in the Runtime Architecture documents listed below. These documents can be found on the web at http://devresource.hp.com.

  • Itanium Runtime Architecture and Software Conventions

  • Runtime Supplement 32-Bit Runtime Architecture for HP-UX

  • Runtime Supplement Program Startup on HP-UX

  • Runtime Supplement Statically-Bound Programs on HP-UX

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2001 Hewlett-Packard Development Company, L.P.