libunwind-nto
QNX SDP8.0C Library ReferenceAPIDeveloper
QNX OS support in the remote unwinder (libunwind)
Syntax:
#include libunwind-nto.h
unw_accessors_t unw_nto_accessors;
void *unw_nto_create(pid_t, pthread_t);
void unw_nto_destroy(void *);
Runs on:
QNX
Description:
The QNX operating system helps a process gain access to the machine state and virtual memory of
        another process. To accommodate this access, the libunwind-nto library
        connects to another process using callback routines. These callback routines and variables
        use the name prefix of the unw_nto command
        (unwind-via-nto).
Using the unw_nto facility
    To incorporate the unwind facility into your application, use the following steps:
  - Create a new libunwind address space to represent the target
            process. To do so, call the 
unw_create_addr_space()routine, and:- If the application passes the address of the 
unw_nto_accessorscode as the first argument, then the target process unwinds properly. - If the application uses only portions of the 
unw_ntofacility, then use the individual callback routines such asunw_nto_find_proc_info(), orunw_nto_put_unwind_info(). 
 - If the application passes the address of the 
 - Create an address space. The addresses of these routines
              get picked up from the 
unw_nto_accessorscommand. This prevents static initialization and makes the callback routines link to the application without being called. - Locate the ID (pid) of the target process. To unwind only one
            thread at a given time, specify the ID (tid) of that thread. This
            ensures only one thread uses the 
unw_nto-infostructure at any given time making the unwinding thread-safe. 
Application Programming Interface (API) for libunwind-nto
- unw_nto_create()
 - Creates a 
unw_nto-info-structurewhen you pass the pid and tid of the target process thread as the arguments. Doing this stops the target thread. - unw_nto_destroy()
 - Frees up memory and other resources after the application runs the libunwind command on the target process.
 - unw_nto_resume()
 - Resumes execution of the target process after unwinding.
 
Page updated: 
