Annotation of 42BSD/ucb/pascal/pdx/process/process.rep, revision 1.1.1.1

1.1       root        1: 
                      2: /* Copyright (c) 1982 Regents of the University of California */
                      3: 
                      4: /* static char sccsid[] = "@(#)process.rep 1.2 1/18/82"; */
                      5: 
                      6: /*
                      7:  * This file defines the representation of a process.
                      8:  * It is MACHINE DEPENDENT.
                      9:  */
                     10: 
                     11: #define STOPPED 0177
                     12: #define FINISHED 0
                     13: 
                     14: #ifdef vax
                     15: #define NREG 12                        /* maximum number of saved registers */
                     16: #else
                     17: #define NREG 14                        /* maximum number of saved registers */
                     18: #endif
                     19: #define CSIZE 101              /* size of instruction cache */
                     20: 
                     21: /*
                     22:  * Cache-ing of instruction segment is done to reduce the number
                     23:  * of calls to ptrace.
                     24:  */
                     25: 
                     26: typedef struct {
                     27:        WORD addr;
                     28:        WORD val;
                     29: } CACHEWORD;
                     30: 
                     31: /*
                     32:  * This structure holds the information we need from the user structure.
                     33:  */
                     34: 
                     35: struct process {
                     36:        int pid;                /* process being traced */
                     37:        WORD reg[NREG];         /* process's registers */
                     38:        WORD ap, fp, sp, pc;    /* special registers */
                     39:        WORD oreg[NREG];        /* registers when process last stopped */
                     40:        WORD oap, ofp, osp, opc;/* special registers when process stopped */
                     41:        int status;             /* either STOPPED or FINISHED */
                     42:        int signo;              /* signal that stopped process */
                     43:        int exitval;            /* return value from exit() */
                     44:        long sigset;            /* bit array of traced signals */
                     45:        CACHEWORD word[CSIZE];  /* text segment cache */
                     46: };
                     47: 
                     48: /*
                     49:  * Process manipulation routines local to this module.
                     50:  */
                     51: 
                     52: pstart();                      /* start up a process */
                     53: pcont();                       /* continue execution */
                     54: pstep();                       /* single step */
                     55: pio();                         /* process memory move */
                     56: psigtrace();                   /* catch/don't catch a signal */
                     57: unsetsigtraces();              /* don't catch any signals */
                     58: 
                     59: /*
                     60:  * These definitions are for the arguments to "pio".
                     61:  */
                     62: 
                     63: typedef enum { PREAD, PWRITE } PIO_OP;
                     64: typedef enum { TEXTSEG, DATASEG } PIO_SEG;

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.