critical impact:
printStack - use U_STACK_TRACE in libunwind (CrCh340)
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
 printStack |
|
|
|
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 |
|