AT&T UNIX™PC Unix System V Users Manual - tenox
AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox
PTRACE (2) PTRACE (2) 4, 5 With these requests, the value given by the data argument is written into the address space of the child at location addr . Request 4 writes a word into I space, and request 5 writes a word into D space. Upon successful completion, the value written into the address space of the child is returned to the � parent. These two requests will fail if addr is a Joca- tion in a pure procedure space and another process is executing in that space, or addr is not the start address of a word. Upon failure a value of -1 is returned to the parent process and the parent's errno is set to EIO. 6 With this request, a few entries in the child's USER area can be written. Data gives the value that is to be written and addr is the location of the entry. The few entries that can be written are: the general registers (DO-D7, AO-A7) certain bits of the Processor Status Word (all bits except SUPERVISOR state and interrupt level) the PC register 7 This request causes the child to resume execution. If the data argument is 0, all pending signals including the one that caused the child to stop are canceled before it resumes execution. If the data argument is a valid signal number, the child resumes execution as if it had incurred that signal and any other pending signals are canceled. The addr argument must be equal to 1 for this request. Upon successful completion, the value of data is returned to the parent. This request will fail if data is not 0 or a valid signal number, in which case a value of -1 is returned to the parent process and the parent's errno is set to EIO. 8 This request causes the child to terminate with the same consequences as exit(2). U This request sets the trace bit in the Processor Status Word of the child and then exer•1tes the same steps as listed above for request 7. ':he trace bit causes an interrupt upon completion of one machine instruction. This effectively allows single stepping of the child. To forestall possible fraud, ptrace inhibits the set-user-id facility � on subsequent exec(2) calls. If a traced process calls exec, it will stop before executing the first instruction of the new image showing signal SIGTRAP. - 2- l
PTRACE (2) PTRACE (2) GENERAL ERRORS Ptrace will in general fail if one or more of the following are true: Request is an illegal number. [EIO[ Pid identifies a child that does not exist or has not executed a ptrace with request 0. [ESRCH] SEE ALSO sdb( l), exec(2), signal(2), wait(2). - 3-
- Page 679 and 680: EXEC (2) EXEC (2) NAME execl, execv
- Page 681: EXEC (2) EXEC (2) Search perm1ss10n
- Page 684 and 685: EXIT (2) EXIT (2) WARNING See WARNI
- Page 686 and 687: FCNTL (2) FCNTL (2) immediately wit
- Page 689 and 690: FORK(2) FORK(2) NAME fork - create
- Page 691: GETPID ( 2} GETPID (2) NAME getpid,
- Page 694 and 695: I I I I I I I I I I I I I I I I I I
- Page 696 and 697: �-
- Page 699: LINK ( 2 ) LINK ( 2 ) NAME link - l
- Page 703 and 704: MKNOD (2) MKNOD (2) NAME mknod - ma
- Page 705: MOUNT (2) MOUNT (2) NAME mount - mo
- Page 708 and 709: MSGCTL(2) MSGCTL ( 2 ) user ID of t
- Page 710 and 711: MSGGET (2) MSGGET (2) SEE ALSO msgc
- Page 712 and 713: MSGOP ( 2) MSGOP (2) the calling pr
- Page 714 and 715: If)
- Page 717 and 718: OPEN ( 2 ) OPEN ( 2 ) NAME open - o
- Page 719: OPEN(2) OPEN(2) O_NDELAY is set, th
- Page 722 and 723: I�
- Page 725 and 726: PLOCK(2) PLOCK(2) NAME plock - lock
- Page 727: PROFIL ( 2 ) PROFIL ( 2 ) NAME prof
- Page 732 and 733: (� �--- .
- Page 735 and 736: SEMCTL ( 2 ) SEMCTL ( 2 ) NAME semc
- Page 737 and 738: SEMGET (2) SEMGET (2) NAME semget -
- Page 739 and 740: SEMOP ( 2) SEMOP {2) NAME semop - s
- Page 741 and 742: SEMOP (2) SEMOP (2) Operation permi
- Page 743: SETPGRP (2) SETPGRP (2) NAME setpgr
- Page 747 and 748: SHMCTL (2) SHMCTL (2) NAME shmctl -
- Page 749 and 750: � ! SHMGET (2) SHMGET (2) NAME sh
- Page 751 and 752: SHMOP ( 2 ) SHMOP ( 2 ) NAME shmop
- Page 753 and 754: SIGNAL (2) SIGNAL (2) NAME signal -
- Page 755 and 756: SIGNAL (2) SIGNAL (2) Sig is an ill
- Page 757 and 758: STAT ( 2 ) STAT ( 2 ) NAME stat, fs
- Page 759 and 760: STIME(2) STIME(2) NAME stime - set
- Page 761 and 762: SYNC ( 2) SYNC (2) NAME sync - upda
- Page 763 and 764: SYSLOCAL ( 2) SYSLOCAL ( 2) NAME Sy
- Page 765: TIME ( 2) TIME(2) NAME time - get t
- Page 768 and 769: .�.· '··.· ·•. J '·· -,
- Page 771 and 772: UMASK( 2 ) UMASK ( 2 ) NAME umask -
- Page 773 and 774: UMOUNT (2) UMOUNT (2) NAME umount -
- Page 775: UNAME ( 2 ) UNAME (2) NAME uname -
- Page 779: USTAT (2) USTAT (2) NAME ustat - ge
PTRACE (2) PTRACE (2)<br />
GENERAL ERRORS<br />
Ptrace will in general fail if one or more of the following are true:<br />
Request is an illegal number. [EIO[<br />
Pid identifies a child that does not exist or has not executed<br />
a ptrace with request 0. [ESRCH]<br />
SEE ALSO<br />
sdb( l), exec(2), signal(2), wait(2).<br />
- 3-