bt_get_backtrace()

Collect a backtrace

Note: The backtrace library is an unsupported feature, due to its fragility. For more information, see Backtraces in the QNX Neutrino technotes.

Synopsis:

#include <backtrace.h>

int bt_get_backtrace( bt_accessor_t *acc,
                      bt_addr_t *addrs,
                      int len );

Arguments:

acc
A pointer to a bt_accessor_t structure. This is an opaque structure that holds the identity of the thread to backtrace.
addrs
An array of bt_addr_t members where the function can store the addresses; addrs[0] is the top of stack.
len
The maximum number of addresses to collect and store in addrs.

Library:

libbacktrace

Use the -l backtrace option to qcc to link against this library.

Description:

The bt_get_backtrace() function collects a backtrace up to len deep. The behavior depends on how you initialized the accessor when you called bt_init_accessor():

Note the following:

Returns:

The number of addresses stored in addrs.

Classification:

QNX Neutrino

Safety:  
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes