HP-UX Reference (11i v3 07/02) - 2 System Calls (vol 5)

t
ttrace(2) ttrace(2)
Note: These requests are not supported on PA-RISC versions of HP-UX.
TT_PROC_GET_ARGS
, TT_PROC_GET_ARGS_NOATTACH
These requests return a pointer to the argument list passed to the initial thread of the pro-
cess at execve() time (that is, argc, argv, envp). If the target process has not overwrit-
ten these arguments, this address can be used to retrieve the full argument and environ-
ment list.
Note: These requests are not supported on PA-RISC versions of HP-UX.
Thread Requests
For all thread requests (those prefixed by
TT_LWP_), pid is the process id of the target process and lwpid
is the target thread within the target process.
TT_LWP_STOP
This request causes the thread identified by lwpid to stop executing. If the thread is
already stopped by the debugger,orby an event, an error is returned.
The addr, data, and addr2 arguments must be zero.
TT_LWP_CONTINUE
This request causes the thread identified by lwpid to resume execution or, rather, to return
to the state it was in prior to being stopped by the debugger. If the thread had not previ-
ously been stopped by the debugger, an error is returned.
If addr is not TT_NOPC, that value is loaded in the program counter before execution is
resumed. Unexpected behavior will result if this value is not within the same function
since only the PC, not the context, is being modified.
If data is non-zero, it is expected to be a valid signal number and the thread will continue
as if it had received this signal.
The addr2 argument must be zero.
TT_LWP_SINGLE
This request causes the stopped thread identified by lwpid to resume execution for one
machine instruction. It causes a flag to be set so that an interrupt occurs upon the comple-
tion of one machine instruction, and then executes the same steps as listed above for the
TT_LWP_CONTINUE request.
TT_LWP_TBRANCH
This request causes the stopped thread identified by lwpid to resume execution until a
taken branch instruction is executed. It causes a flag to be set so that an interrupt occurs
upon completion of the next taken branch instruction, and then executes the same steps as
listed above for the TT_LWP_CONTINUE
request.
Note: This request is not supported on PA-RISC versions of HP-UX.
TT_LWP_GET_EVENT_MASK
This request is the same as TT_PROC_GET_EVENT_MASK
except for the thread
identified by lwpid.
TT_LWP_SET_EVENT_MASK
This request is the same as TT_PROC_SET_EVENT_MASK except for the thread
identified by lwpid.
TT_LWP_GET_SIGMASK
This request is the same as TT_PROC_GET_SIGMASK except for the thread identified by
lwpid.
TT_LWP_SET_SIGMASK
This request is the same as TT_PROC_SET_SIGMASK except for the thread identified by
lwpid.
TT_LWP_GET_STATE
This calls returns the state of the thread identified by lwpid. If the thread was not previ-
ously stopped by the debugger or waiting to be continued after an event, an error is
returned.
TT_LWP_SET_IBPT_REGS, TT_LWP_SET_DBPT_REGS
These requests write per-thread breakpoint values into breakpoint registers. data bytes
504 Hewlett-Packard Company 8 HP-UX 11i Version 3: February 2007