ttrace.2 (2010 09)
t
ttrace(2) ttrace(2)
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 flags 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
by child processes and threads respectively. Refer to the EVENTS section below.
If
TTEO_NORM_SIGTRAP
is set, the SIGTRAP signal behaves normally. That is, it is
getting delivered (the default behavior is to drop these signals).
TT_PROC_SET_EVENT_MASK
This request allows the tracing process to establish events and signals the traced process
will respond to. Refer to the EVENTS section for a description of these events.
The addr argument is a pointer to a
ttevent_t structure to be copied into the target
process. The data argument specifies the number of bytes to be transferred.
The lwpid and addr2 arguments must be set to zero.
TT_PROC_GET_SIGMASK
This request returns the process-wide signal mask value for the target process that was
set using TT_PROC_SET_SIGMASK.
The data argument specifies the number of bytes to be read from the context of the traced
process into the
ttmask_t data structure in user space pointed by addr .
The lwpid and addr2 arguments must be set to zero.
The
ttmask_t data structure is as follows:
typedef struct {
sigset_t ttm_signals;
ttmopt_t ttm_opts;
} ttmask_t;
The options provided in ttm_opts control the behavior of signal masks on child processes
produced by fork() and are as follows:
TTMO_NONE = 0x0000
TTMO_PROC_INHERIT = 0x0001
TTMO_LWP_INHERIT = 0x0002
HP-UX 11i Version 3: September 2010 − 3 − Hewlett-Packard Company 3