home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!spool.mu.edu!agate!asami
- From: asami@cs.Berkeley.EDU (Satoshi ASAMI)
- Newsgroups: comp.unix.ultrix
- Subject: /usr/include/sys/ptrace.h
- Date: 12 Nov 92 02:53:36
- Organization: CS Div., Dept. of EECS, UC Berkeley
- Lines: 23
- Message-ID: <ASAMI.92Nov12025336@anaconda.cs.Berkeley.EDU>
- References: <1992Nov11.143423.23743@prl.dec.com>
- <1992Nov12.015127.837@pasteur.Berkeley.EDU>
- Reply-To: asami@snake.cs.berkeley.edu
- NNTP-Posting-Host: anaconda.cs.berkeley.edu
- In-reply-to: asami@cs.berkeley.edu's message of Thu, 12 Nov 1992 01:51:27 GMT
-
- By the way, I have another question about ptrace---about the header
- file. It has definitions like
-
- #define TRAPCAUSE SPEC_BASE+6 /* multiplex SIGTRAP cause */
-
- which is supposed to be the third argument of
-
- ptrace(request, pid, addr, data)
- int request, pid, *addr, data;
- (this copied from the manual verbatim).
-
- My compiler (gcc) complained about wrong argument type when I gave
- TRAPCAUSE as the argument (SPEC_BASE is an int), and when I casted it
- to the right type by saying (int *) TRAPCAUSE, it converted 102 into
- 120 and I got "out of bounds" error. It took me a while to figure
- this out!
-
- --
- o o Satoshi Asami
- Form follows Function. ^
- (asami@CS.Berkeley.EDU)
- Tel: (510)643-2730 (home) Computer Science Div., Dept. of EECS
- (510)643-6228 (office) University of California at Berkeley
-