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

t
ttrace(2) ttrace(2)
The data associated with a TTEVT_LWP_EXIT
event is as follows:
typedef struct {
int tts_exitcode;
} ttexit_data_t;
tts_exitcode
is the exit code of the process.
The data associated with a TTEVT_BPT_SSTEP
event is as follows:
typedef struct {
int tts_isbpt;
} ttbpt_data_t;
tts_isbpt
is set to zero if it is a single-step and to one if the event is a breakpoint
(including single-stepping into a breakpoint).
TT_PROC_GET_NEXT_LWP_STATE
This request is identical to TT_PROC_GET_FIRST_LWP_STATE
except that it returns
the state for the next thread on the stopped list. As events cause threads to stop, they are
added to this list. This provides a way for the tracing process to examine the state of all the
stopped threads in the target process. Both these requests return either a 1 (one) if valid
data is returned or 0 (zero) otherwise. Valid data is returned if the status is that there was
a stopped thread for which to return.
TT_PROC_GET_MPROTECT
This request allows the debugger to obtain protection information for a page in the address
space of the code being debugged. The addr argument specifies the address for which the
protection is to be obtained. The addr2 argument specifies the address of an integer in
which the protection data will be copied.
For this request, the lwpid and data arguments must be set to zero.
TT_PROC_SET_MPROTECT
This requests allows the debugger to modify the protection of the address space of the code
being debugged. The addr argument specifies the start address. The data argument
specifies the extent (in bytes) of the space to be modified. The addr2 argument contains the
new protection. Note that protection changes affect whole pages (see mprotect (2) for more
information).
For this request, the lwpid argument must be set to zero.
TT_PROC_SET_SCBM
This request allows the debugger to pass a bitmap to the kernel indicating which system
calls should cause a debugger stop.
The addr argument must be set to TTSCBM_SELECT
or TTSCBM_UNSELECT to indicate
whether the bitmap represents a positive (meaning that the calls in the bitmap will result
in a stop) or a negative (meaning that all calls except those in the bit map will result in a
stop) list.
The data argument is the size of the bitmap, in bytes. A size of zero indicates that the
current bitmap, if any, should be cleared.
The addr2 argument is the user address where the bitmap is located. If data is zero, this
value must be zero too.
The lwpid argument must be zero.
TT_PROC_EXIT
This request causes the traced process to terminate. It has the same consequence as
exit() being invoked by one of the process threads. The lwpid, addr, data and addr2
arguments must be zero.
TT_PROC_CORE
This request causes the traced process to generate a core file in the target processs current
working directory. The core file is named core.pid where pid is the process ID of the target
process. The process’s state is left unchanged. The lwpid, addr, data and addr2 arguments
must be zero.
HP-UX 11i Version 1: September 2005 5 Hewlett-Packard Company Section 2439