![]() |
![]() |
![]() |
![]() |
bt_translate_addrs()
Translate the addresses from a backtrace
![]() |
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>
void bt_translate_addrs( bt_memmap_t *memmap,
bt_addr_t *addrs,
int addrslen,
bt_addr_t *reladdrs,
bt_addr_t *offsets,
int *index,
char **filenames );
Arguments:
- memmap
- A pointer to memory-map information for the process you've collected backtracing for. Use bt_load_memmap() to initialize this variable.
- addrs
- An array of addresses that you want to translate.
- addrslen
- The number of entries in the addrs array, as well as the number of entries in the reladdrs, offsets, index, and filenames arrays (if non-NULL).
- reladdrs
- NULL, or an array where the function can store the addresses as specified in the object files.
- offsets
- NULL, or an array where the function can store the difference between the in-file address and in-memory address (i.e. offsets[0] = addr[0] - mod_addr[0]).
- index
- NULL, or an array where the function can store the memory map index for each address.
- filenames
- NULL, or an array where the function can store
the object file name for each address.

The file names aren't copied from the memory map, so they're valid only until you unload the memory map.
Library:
libbacktrace
Use the -l backtrace option to qcc to link against this library.
Description:
The bt_translate_addrs() function translates all process addresses in addrs. You can pass a NULL pointer for any of the result arrays that you don't need.
Classification:
| Safety: | |
|---|---|
| Cancellation point | No |
| Interrupt handler | No |
| Signal handler | Yes |
| Thread | Yes |
See also:
bt_get_backtrace(), bt_init_accessor(), bt_load_memmap(), bt_release_accessor(), bt_set_flags(), bt_sprn_memmap(), bt_sprnf_addrs(), bt_unload_memmap()
Backtraces in the QNX Neutrino technotes
pidin backtrace in the Utilities Reference
![]() |
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)