Jump to content
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
HP.com home

Transition Impacts

Tru64 UNIX Software Transition Kit
» 

DSPP Home

» HP STK home
Tru64 UNIX STK
» Home
» Overview
» Tools
» Documentation
» Transition impacts
» Identifier types
» Impact list
» Porting to HP-UX
» FAQ
» Glossary
» Help
» Send us feedback
Site maps
» Tru64 UNIX STK
» DSPP
Content starts here

critical impact:

printStack - use U_STACK_TRACE in libunwind (CrCh340)

IPF Impacts

Problem description

The Ladebug Debugger Manual on Tru64 UNIX contains code for a printStack function that you can copy into your program to print a stack trace.

The code is specific to Tru64 UNIX.

Identifiers

C/C++ FunctionsprintStack      

See also

Solution description

You can print a stack trace on HP-UX ItaniumĀ®-based systems by calling the U_STACK_TRACE and _UNW_STACK_TRACE functions in the stack unwind library, libunwind.

The U_STACK_TRACE function prints a formatted stack trace to standard error. The _UNW_STACK_TRACE function prints the trace to the specified output stream.

New behavior

#include <unwind.h>
void foo()
{
    U_STACK_TRACE();
}
main()
{
    foo();
}

$ cc foo.c -lunwind
$ a.out
(0) 0x0000000004000a00  foo + 0x10 [a.out]
(1) 0x0000000004000a50  main + 0x10 [a.out]
(2) 0x60000000c0066e20  main_opd_entry + 0x40 [/usr/lib/hpux32/dld.so]

See also


Problem summary

classifications source types OS release severity type
IPF C, C++ any HP-UX 11i version critical changed
Printable version
Privacy statement Using this site means you accept its terms Feedback to DSPP
© 2007 Hewlett-Packard Development Company, L.P.