Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/b/bt_init_accessor.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/b/bt_init_accessor.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/b/bt_init_accessor.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/b/bt_init_accessor.html on line 8
Initialize a backtrace accessor
|
The backtrace library is an unsupported feature, due to its fragility.
For more information, see
Backtraces
in the QNX Neutrino technotes. |
#include <backtrace.h>
int bt_init_accessor( bt_accessor_t *acc,
bt_acc_type_t type, ...);
- acc
- A pointer to a bt_accessor_t structure.
This is an opaque structure that holds the identity of the thread to
backtrace.
- type
- The type of backtrace to perform; one of:
- BT_SELF — backtrace the calling thread.
- BT_THREAD — backtrace a specified thread in
the current process.
- BT_PROCESS — backtrace a specified thread in
another process.
Additional arguments are required for BT_THREAD and
BT_PROCESS, as described below.
libbacktrace
Use the -l backtrace option to
qcc
to link against this library.
The bt_init_accessor() function
initializes the accessor with the identity of the thread to backtrace:
- To backtrace the calling thread, use:
bt_init_accessor(bt_accessor_t *acc, BT_SELF);
- To backtrace a thread in the current process, use:
bt_init_accessor(bt_accessor_t *acc, BT_THREAD, pthread_t tid);
- To backtrace a thread in any process, use:
bt_init_accessor(bt_accessor_t *acc, BT_PROCESS, pid_t pid, pthread_t tid)
|
The bt_acc_self global variable is a preinitialized accessor
used to backtrace the current thread.
Don't call bt_init_accessor() or bt_release_accessor()
for this variable. |
- 0
- Success.
- -1
- An error occurred
(errno
is set).
- EINVAL
- The acc argument is NULL, or the type
is invalid.
QNX Neutrino
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
bt_get_backtrace(),
bt_load_memmap(),
bt_release_accessor(),
bt_set_flags(),
bt_sprn_memmap(),
bt_sprnf_addrs(),
bt_translate_addrs(),
bt_unload_memmap()
Backtraces
in the QNX Neutrino technotes
pidin backtrace
in the Utilities Reference
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/b/bt_init_accessor.html on line 228
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/b/bt_init_accessor.html on line 228