ttrace.2 (2010 09)
t
ttrace(2) ttrace(2)
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 argu-
ment specifies the extent (in bytes) of the space to be modified. The addr2 argument con-
tains the new protection. Note that protection changes affect whole pages (see mpro-
tect (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 without modifying the
process’s state. If addr is zero, the core file is created in the target process’s current
working directory and is named core.pid ; where, pid is the process ID of the target pro-
cess. If addr is non-zero, it is the address of a buffer containing the path of the core file
to be created. Up to
MAXPATHLEN bytes will be read from the buffer. If the path is not
absolute (not starting with a slash), it is relative to the target process’s current working
directory. In both cases, the directory must exist and, if present, the file must be a regu-
lar file. In all cases, the debugger’s credentials are used and standard permission check-
ing applies. The lwpid , data , and addr2 arguments must be zero.
Interaction with
coreadm() and coreadm: If a process has a non-default core file
setting and addr is zero, then the core file will be will be generated with the core file set-
ting in effect. If addr is a non-NULL value, then the core file will be generated in the
target path, as specified by addr , and will be created as core.pid.
TT_PROC_GET_NUM_IBPT_REGS, TT_PROC_GET_NUM_DBPT_REGS
These requests return the number of physical hardware instruction or data breakpoint
registers that are available for use.
TT_PROC_SET_IBPT_REGS, TT_PROC_SET_DBPT_REGS
These requests write process-wide breakpoint values into breakpoint registers. data
bytes from addr2 will be written to the instruction or data breakpoint register(s) named
by addr. For Itanium-based systems, addr must be an even number less than the value
returned by TT_PROC_GET_NUM_IBPT_REGS or TT_PROC_GET_NUM_DBPT_REGS
respectively. data must be 16 bytes. The request will set a value into the pair of instruc-
tion or data breakpoint registers addr and addr+1 .
Note: The available breakpoint registers must be shared between process-wide break-
points and per-thread breakpoints. If a breakpoint register is currently being used as a
per-thread breakpoint in any thread within the target process, it may not be used for a
process-wide breakpoint.
Note: This does not limit the number of
break instructions that may be present in the
program text.
HP-UX 11i Version 3: September 2010 − 7 − Hewlett-Packard Company 7