HP-UX Reference (11i v3 07/02) - 2 System Calls (vol 5)
t
ttrace(2) ttrace(2)
The addr2 argument specifies the action to be taken by the loader when the target process
does an exec(). If the value is
TT_GEN_SHLIB_BPT
, the loader will communicate cer-
tain events to the debugger through an architected break instruction. The information
obtained through these events can be used by the debugger to identify all the load modules
in the program and their unwind information. If the debugger is not interested in these
events the value must be set to 0 (zero).
The lwpid argument must be set to zero and data must be
TT_VERSION (see
TT_PROC_SETTRC
above).
TT_PROC_DETACH
This request detaches the traced process and allows it to continue executing. It behaves
identically to TT_PROC_CONTINUE
except that the process is no longer being traced after
the call returns.
For this request, the lwpid, addr, data, and addr2 arguments must be set to zero.
TT_PROC_RDTEXT
, TT_PROC_RDTEXT_NOATTACH
These requests allow reading from the target process text.
The addr argument specifies the offset to be read from. The data argument specifies the
number of bytes to read and the addr2 argument specifies where to store that data in the
tracing process.
The lwpid argument must be set to zero.
TT_PROC_RDDATA, TT_PROC_RDDATA_NOATTACH
These requests allow reading from the data space.
The addr argument specifies the offset to be read from. The data argument specifies the
number of bytes to read and the addr2 argument specifies where to store that data in the
tracing process.
The lwpid argument must be set to zero.
TT_PROC_WRTEXT, TT_PROC_WRDATA
These requests allow writing into the target process text (TT_PROC_WRTEXT
) and data
spaces (
TT_PROC_WRDATA).
The addr argument specifies the offset to be written to. The data argument specifies the
number of bytes to write.a The addr2 argument specifies where to get the data in the trac-
ing process.
The lwpid argument must be set to zero.
TT_PROC_STOP
This request causes the traced process (all its threads) to stop. If a thread was already
stopped by the debugger prior to this call, its state is not modified.
The lwpid, addr, data, and addr2 arguments must be set to zero.
TT_PROC_CONTINUE
This request causes the entire traced process to resume execution. All threads that had
been stopped directly (request) or indirectly (event) by the debugger are resumed with all
their pending signals intact.
The data, addr, and addr2 arguments must be set to zero.
TT_PROC_GET_PATHNAME
This request is used by the calling process to access the path name of the executable file
provided as a path or file argument to exec(). The request reads data bytes of data of
the pathname string from the traced process’ context into the data buffer in user space
pointed to by addr.
In the typical case, data is equal to the value of the ttexec_data_t.tts_len member of the
ttstate_t structure returned via the TT_LWP_GET_STATE or other ttrace
requests returning a Lightweight Process (LWP or lwp) state. The length of the path does
not include a terminating null character. The data is available during the entire life of the
process.
The lwpid and addr2 arguments must be set to zero.
498 Hewlett-Packard Company − 2 − HP-UX 11i Version 3: February 2007