HP-UX Reference (11i v1 05/09) - 2 System Calls (vol 5)

t
ttrace(2) ttrace(2)
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.
TT_PROC_GET_EVENT_MASK
This request returns the process-wide event ags and signal mask values.
The data argument specifies the number of bytes to be read from the context of the traced
process into the ttevent_t data structure in user space pointed to by addr.
The lwpid and addr2 arguments must be set to zero.
The ttevent_t data structure is as follows:
typedef struct {
sigset_t tte_signals;
ttevents_t tte_events;
tteopt_t tte_opts;
} ttevent_t;
The options provided in tte_opts control the behavior of child processes produced by
fork() and are as follows:
TTEO_NONE = 0x0000
TTEO_NOSTRCCHLD = 0x0001
TTEO_PROC_INHERIT = 0x0002
TTEO_LWP_INHERIT = 0x0004
TTEO_NORM_SIGTRAP = 0x0008
If TTEO_NOSTRCCHLD is set, the child process resulting from a fork() will not be
traced. This makes it possible for a debugger to debug another debugger. The
TTEO_PROC_INHERIT and TTEO_LWP_INHERIT options allow events to be inherited
Section 2436 Hewlett-Packard Company 2 HP-UX 11i Version 1: September 2005