libc_db(3lib) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

libc_db(3lib)

libc_db(3LIB)                 Interface Libraries                libc_db(3LIB)

NAME
       libc_db - threads debugging library

SYNOPSIS
       cc [ flag ... ] file ... -lc_db [ library... ]
       #include <proc_service.h>
       #include <thread_db.h>

DESCRIPTION
       The  libc_db  library  provides support for monitoring and manipulating
       threads-related aspects of a multithreaded program. There are at  least
       two  processes involved, the controlling process and one or more target
       processes. The controlling process is the libc_db client,  which  links
       with  libc_db and uses libc_db to inspect or modify threads-related as‐
       pects of one or more target processes. The  target  processes  must  be
       multithreaded processes that use libc. The controlling process might or
       might not be multithreaded itself.


       The  most  commonly anticipated use for libc_db is that the controlling
       process will be a debugger for a multithreaded program, hence the  "db"
       in libc_db.


       The libc_db library is dependent on the internal implementation details
       of  libc. It is a "friend" of libc in the C++ sense, which is precisely
       the "value added" by libc_db. It encapsulates the knowledge of libc in‐
       ternals that a debugger needs to manipulate the  threads-related  state
       of a target process.


       To  be  able  to inspect and manipulate target processes, libc_db makes
       use of certain process control primitives that must be provided by  the
       process using libc_db. The imported interfaces are defined in proc_ser‐
       vice(3PROC).  In  other  words,  the controlling process is linked with
       libc_db and calls routines in libc_db. In turn, libc_db  calls  certain
       routines  that  it  expects  the  controlling process to provide. These
       process control primitives allow libc_db to:

           o      Look up symbols in a target process.


           o      Stop and continue individual lightweight processes  (  LWPs)
                  within a target process.


           o      Stop and continue an entire target process.


           o      Read and write memory and registers in a target process.



       Initially, a controlling process obtains a handle for a target process.
       Through  that  handle  it can then obtain handles for the component ob‐
       jects of the target process, its threads, its synchronization  objects,
       and its thread-specific-data keys.


       When  libc_db  needs  to  return  sets  of  handles  to the controlling
       process, for example, when returning handles for all the threads  in  a
       target  process,  it  uses  an  iterator function. An iterator function
       calls back a client-specified function once for each handle to  be  re‐
       turned,  passing one handle back on each call to the callback function.
       The calling function also passes  another  parameter  to  the  iterator
       function,  which  the iterator function passes on to the callback func‐
       tion. This makes it easy to build a linked list of thread handles for a
       particular target process. The additional parameter is the head of  the
       linked  list, and the callback function simply inserts the current han‐
       dle into the linked list.


       Callback functions are expected to return an integer. Iteration  termi‐
       nates early if a callback function returns a non-zero value. Otherwise,
       iteration terminates when there are no more handles to pass back.

INTERFACES
       The  shared  object libc_db.so.1 provides the public interfaces defined
       below. See intro(3) for additional information on shared object  inter‐
       faces.

       tab();     lw(2.75i)     lw(2.75i)     td_inittd_log    td_sync_get_in‐
       fotd_sync_get_stats                     td_sync_setstatetd_sync_waiters
       td_ta_clear_eventtd_ta_delete        td_ta_enable_statstd_ta_event_addr
       td_ta_event_getmsgtd_ta_get_nthreads        td_ta_get_phtd_ta_get_stats
       td_ta_map_addr2synctd_ta_map_id2thr          td_ta_map_lwp2thrtd_ta_new
       td_ta_reset_statstd_ta_set_event    td_ta_setconcurrencytd_ta_sync_iter
       td_ta_sync_tracking_enabletd_ta_thr_iter
       td_ta_tsd_itertd_thr_clear_event        td_thr_dbresumetd_thr_dbsuspend
       td_thr_event_enabletd_thr_event_getmsg  td_thr_get_infotd_thr_getcxregs
       td_thr_getcxregsizetd_thr_getfpregs      td_thr_getgregstd_thr_getxregs
       td_thr_getxregsizetd_thr_lockowner     td_thr_setcxregstd_thr_set_event
       td_thr_setfpregstd_thr_setgregs      td_thr_setpriotd_thr_setsigpending
       td_thr_setxregstd_thr_sigsetmask         td_thr_sleepinfotd_thr_tlsbase
       td_thr_tsdtd_thr_validate


FILES
       /lib/libc_db.so.1       shared object


       /lib/64/libc_db.so.1    64-bit shared object


ATTRIBUTES
       See attributes(7) for description of the following attributes:

       tab()  box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
       TRIBUTE VALUE _ Availabilitysystem/library _ MT-LevelSafe


SEE ALSO
       td_ta_new(3C_DB), intro(3), attributes(7), threads(7)

Oracle Solaris 11.4               27 Nov 2017                    libc_db(3LIB)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3