Lines Matching full:the
3 .\" This file is in the public domain.
30 The tracing process must first attach to the traced process, and then
33 system calls to control the execution of the process, as well as access
35 For the duration of the tracing session, the traced process will be
38 changed to the tracing process.
41 When the tracing process has completed its work, it must detach the
45 Most of the time, the traced process runs normally, but when it
52 or the delivery of a
54 signal, examine the state of the stopped process, and cause it to
57 traced process behavior, or use of the
59 system call; alternatively, it may be generated by the tracing facility
60 as a result of attaching, stepping by the tracing
62 or an event in the traced process.
63 The tracing process may choose to intercept the signal, using it to
66 or forward the signal to the process if appropriate.
70 is the mechanism by which all this happens.
73 events in the traced process.
79 The tracing process can use the
87 For example, events indicated by the
109 termination, the destiny of the traced children processes is determined
110 by the
114 If the control is set to the default value 1, such traced processes
117 Traced processes are un-stopped if needed, and then continue the execution
121 signals queued to the traced children, which could be either generated by
122 not yet consumed debug events, or sent by other means, the later should
124 .Sh SELECTING THE TARGET
127 argument of the call specifies the target on which to perform
129 For operations affecting the global process state, the process ID
131 Similarly, for operations affecting only a thread, the thread ID
134 Still, for global operations, the ID of any thread can be used as the
135 target, and system will perform the request on the process owning
137 If a thread operation got the process ID as
139 the system randomly selects a thread from among the threads owned
140 by the process.
142 process or thread ID as the target.
156 always as if the syscall is not implemented by the kernel.
158 Setting this sysctl to zero disallows the use of
165 from the caller's.
171 requests from processes that have no groups in common with the target process,
178 requests from processes belonging to a different jail than that of the target
179 process, even if the requesting process' jail is an ancestor of the target
201 An event in the traced process only reports a
202 signal stop if the corresponding flag is set in the tracing event mask.
208 This event is indicated by the
210 flag in the
216 This event is indicated by the
218 flag in the
224 This event is indicated by the
226 flag in the
238 The new child process will include the
240 flag in the
244 The traced process will report a stop that includes the
247 The process ID of the new child process will also be present in the
251 If the new child process was created via
253 the traced process's stop will also include the
256 Note that new child processes will be attached with the default
258 they do not inherit the event mask of the traced process.
274 Note that new processes do not report an event for the creation of their
276 and exiting processes do not report an event for the termination of the
282 When a thread in the traced process creates a new child process via
288 occurs just after the child process is created,
289 but before the thread waits for the child process to stop sharing process
291 If a debugger is not tracing the new child process,
292 it must ensure that no breakpoints are enabled in the shared process
293 memory before detaching from the new child process.
294 This means that no breakpoints are enabled in the parent process either.
298 flag enables a new stop that indicates when the new child process stops
299 sharing the process memory of the parent process.
300 A debugger can reinsert breakpoints in the parent process and resume it
302 This event is indicated by setting the
320 argument specifies what operation is being performed; the meaning of
321 the rest of the arguments depends on the operation, but except for one
324 calls are made by the tracing process, and the
326 argument specifies the process ID of the traced process
334 This request is the only one used by the traced process; it declares
335 that the process expects to be traced by its parent.
336 All the other arguments are ignored.
337 (If the parent process does not expect to trace the child, it will
338 probably be rather confused by the results; once the traced process
343 or any of the routines built on it
346 it will stop before executing the first instruction of the new image.
347 Also, any setuid or setgid bits on the executable being executed will
349 If the child was created by
353 call with the
355 flag specified, the debugging events are reported to the parent
356 only after the
362 of data from the traced process's address space.
368 reads from the instruction space and
370 reads from the data space.
371 In the current
376 argument specifies the address
377 (in the traced process's virtual address space)
378 at which the read is to be done.
380 The value read is returned as the return value from
390 argument supplies the value to be written.
427 is an address specifying the place where execution is to be resumed
428 (a new value for the program counter),
435 provides a signal number to be delivered to the traced process as it
447 provides a signal number to be delivered to the traced process as it
454 given as the signal to be delivered.
458 It does not need any cooperation from the process to trace.
462 specifies the process ID of the process to trace, and the other
464 This request requires that the target process must have the same real
465 UID as the tracing process, and that it must not be executing a setuid
467 (If the tracing process is running as root, these restrictions do not
469 The tracing process will see the newly-traced process stop and may
474 succeeds, the traced process is no longer traced and continues
477 The parent of the traced process will be sent a
479 to indicate that the process has continued from a stopped state regardless of
480 whether the process was in a stopped state prior to the corresponding
485 for the traced process would indicate that it had been continued.
487 This request reads the traced process's machine registers into the
496 This request is the converse of
498 it loads the traced process's machine registers from the
507 This request reads the traced process's floating-point registers into
517 This request is the converse of
519 it loads the traced process's floating-point registers from the
528 This request reads the traced process's debug registers into
538 This request is the converse of
540 it loads the traced process's debug registers from the
549 This request reads the registers from the traced process.
552 argument specifies the register set to read, with the
556 where the
558 field points to a register set specific structure to hold the registers,
559 and the
561 field holds the length of the structure.
563 This request writes to the registers of the traced process.
566 argument specifies the register set to write to, with the
570 where the
572 field points to a register set specific structure to hold the registers,
573 and the
575 field holds the length of the structure.
578 is NULL the kernel will return the expected length of the register set
579 specific structure in the
581 field and not change the target register set.
583 This request can be used to obtain information about the kernel thread,
584 also known as light-weight process, that caused the traced process to stop.
607 argument is to be set to the size of the structure known to the caller.
608 This allows the structure to grow without affecting older programs.
610 The fields in the
612 have the following meaning:
615 LWP id of the thread
617 Event that caused the stop.
623 Thread stopped due to the pending signal
630 The thread stopped due to system call entry, right after the kernel is entered.
632 registers according to the ABI of the current process, and modify them,
635 The thread is stopped immediately before syscall is returning to the usermode.
636 The debugger may examine system call return values in the ABI-defined registers
641 is set, this flag may be additionally specified to inform that the
643 execution of a system call from the
653 Indicates that the process is returning from a call to
656 The process identifier of the new process is available in the
666 This flag is set for the first event reported from a new LWP when
672 This flag is set for the last event reported by an exiting LWP when
675 Note that this event is not reported when the last LWP in a process exits.
676 The termination of the last thread is reported via a normal process exit
679 Indicates that the thread is returning from a call to
685 Indicates that the thread has resumed after a child process created via
687 has stopped sharing its address space with the traced process.
690 The current signal mask of the LWP
692 The current pending set of signals for the LWP.
693 Note that signals that are delivered to the process would not appear
694 on an LWP siglist until the thread is selected for delivery.
696 The siginfo that accompanies the signal pending.
704 The name of the thread.
706 The process identifier of the new child process.
714 The ABI-specific identifier of the current system call.
715 Note that for indirect system calls this field reports the indirected
724 The number of arguments passed to the current system call not counting
726 Note that for indirect system calls this field reports the arguments
727 passed to the indirected system call.
736 This request returns the number of kernel threads associated with the
739 This request can be used to get the current thread list.
744 with the array size specified by
748 is the count of array entries filled in.
750 This request will turn on single stepping of the specified process.
753 This request will turn off single stepping of the specified process.
755 This request will suspend the specified thread.
757 This request will resume the specified thread.
759 This request will set the
761 event flag to trace all future system call entries and continue the process.
766 arguments are used the same as for
769 This request will set the
771 event flag to trace all future system call exits and continue the process.
776 arguments are used the same as for
779 This request will set the
787 arguments are used the same as for
790 For the thread which is stopped in either
795 this request fetches the syscall arguments.
797 The arguments are copied out into the buffer pointed to by the
800 Each syscall argument is stored as the machine word.
801 Kernel copies out as many arguments as the syscall accepts,
802 see the
804 member of the
806 but not more than the
810 Fetch the system call return values on exit from a syscall.
812 exit (the
829 argument is set to the size of the structure.
831 If the system call completed successfully,
833 is set to zero and the return values of the system call are saved in
835 If the system call failed to execute,
840 If the system call completed in an unusual fashion,
860 is set in the traced process's event tracing mask.
865 is cleared from the traced process's event tracing mask.
872 is set in the traced process's event tracing mask.
877 is cleared from the traced process's event tracing mask.
879 This request reads the traced process's event tracing mask into the
882 The size of the integer must be passed in
885 This request sets the traced process's event tracing mask from the
888 The size of the integer must be passed in
891 This request returns the generation number or timestamp of the memory map of
892 the traced process as the return value from
894 This provides a low-cost way for the tracing process to determine if the
895 VM map changed since the last time this request was made.
897 This request is used to iterate over the entries of the VM map of the traced
924 unmodified from the value returned by previous requests.
927 field can be used to detect changes to the VM map while iterating over the
932 to a non-zero value on entry, the pathname of the backing object is returned
933 in the buffer pointed to by
935 provided the entry is backed by a vnode.
938 field is updated with the actual length of the pathname (including the
942 field is the offset within the backing object at which the range starts.
943 The range is located in the VM space at
953 This request creates a coredump for the stopped program.
966 The fields of the structure are:
969 File descriptor to write the dump to.
976 Request compression of the dump.
978 Include non-dumpable entries into the dump.
981 flag of the process map entry, but device mappings are not dumped even with
986 Maximum size of the coredump.
995 Request to execute a syscall in the context of the traced process,
996 in the specified thread.
999 argument must point to the
1001 which describes the requested syscall and its arguments, and receives
1017 contains the syscall number to execute, the
1019 is the number of supplied arguments, which are supplied in the
1022 Result of the execution is returned in the
1025 Note that the request and its result do not affect the returned value from
1030 A single thread in the target process is temporarily unsuspended
1031 in the kernel to perform the action.
1032 If the
1037 If a thread was unsuspended, it will stop again before the
1039 call returns, and the process must be waited upon using
1041 to consume the new stop event.
1055 the selected thread must be stopped in the safe place, which is
1064 sysctl setting, nor the corresponding
1068 are obeyed during the execution of the syscall by
1075 Note that due to the mode of execution for the remote syscall, in
1076 particular, the setting where only one thread is allowed to run,
1078 This might result in the target process deadlock.
1079 In this situation, the only way out is to kill the target.
1083 Return the thread's
1085 machine state in the buffer pointed to by
1092 Set the thread's
1094 machine state from the buffer pointed to by
1104 Copy the XMM FPU state into the buffer pointed to by the
1107 The buffer has the same layout as the 32-bit save buffer for the
1113 For 64-bit amd64 programs, the XMM state is reported as part of
1114 the FPU state returned by the
1122 Load the XMM FPU state for the thread from the buffer pointed to
1123 by the argument
1125 The buffer has the same layout as the 32-bit load buffer for the
1137 Report which XSAVE FPU extensions are supported by the CPU
1143 which contains the information on the request return.
1154 field is a bitmask of the currently enabled extensions.
1155 The meaning of the bits is defined in the Intel and AMD
1159 field reports the length of the XSAVE area for storing the hardware
1160 state for currently enabled extensions in the format defined by the x86
1166 argument value must be equal to the size of the
1169 Return the content of the XSAVE area for the thread.
1172 argument points to the buffer where the content is copied, and the
1174 argument specifies the size of the buffer.
1175 The kernel copies out as much content as allowed by the buffer size.
1176 The buffer layout is specified by the layout of the save area for the
1180 Load the XSAVE state for the thread from the buffer specified by the
1183 The buffer size is passed in the
1186 The buffer must be at least as large as the
1190 to allow the complete x87 FPU and XMM state load.
1191 It must not be larger than the XSAVE state length, as reported by the
1193 field from the
1195 of the
1198 Layout of the buffer is identical to the layout of the load area for the
1202 Return the value of the base used when doing segmented
1203 memory addressing using the %fs segment register.
1208 variable where the base value is stored.
1214 Like the
1216 request, but returns the base for the %gs segment register.
1218 Set the base for the %fs segment register to the value pointed to
1219 by the
1223 must point to the
1225 variable containing the new base.
1231 Like the
1233 request, but sets the base for the %gs segment register.
1238 Return the thread's
1240 machine state in the buffer pointed to by
1247 Set the thread's
1249 machine state from the buffer pointed to by
1256 Return doubleword 1 of the thread's
1258 registers VSR0-VSR31 in the buffer pointed to by
1265 Set doubleword 1 of the thread's
1267 registers VSR0-VSR31 from the buffer pointed to by
1286 which return the value read from the process memory on success.
1289 can be set to 0 before the call and checked afterwards.
1295 to 0 before calling into the kernel, both for historic reasons and for
1308 No process having the specified process ID exists.
1320 was not one of the legal requests.
1342 This can also be caused by changes to the VM map of the process.
1348 was less than or equal to zero, or larger than the
1350 structure known to the kernel.
1354 provided to the x86-specific
1356 request was not equal to the size of the
1361 provided to the x86-specific
1363 request was less than the size of the x87 plus the XMM save area.
1367 provided to the x86-specific
1369 request was larger than returned in the
1371 member of the
1373 from the
1377 The base value, provided to the amd64-specific requests
1381 pointed outside of the valid user address space.
1391 some process other than the one making the request.
1408 on a process in violation of the requirements listed under
1416 previously returned the last entry of the memory map.
1434 cannot return the pathname of the backing object because the buffer is not big
1437 holds the minimum buffer size required on return.