Annotation of cci/usr/src/bin/cdb/cdb.h, revision 1.1.1.1

1.1       root        1: 
                      2: /* @(#)cdb.h   2.4 */
                      3: #include "basic.h"
                      4: 
                      5: extern char *malloc();
                      6: extern free();
                      7: extern long lseek();
                      8: extern int errno;
                      9: extern char *strchr(), *strrchr(), *strcpy(), *strncpy(), *strcat(), *strncat();
                     10: extern int strlen(), strspn();
                     11: extern long time();
                     12: extern char *getenv();
                     13: 
                     14: #ifdef SYSIII
                     15: #define cbVarMax       8
                     16: #endif
                     17: #ifdef BSD41
                     18: #define cbVarMax       20
                     19: #endif
                     20: 
                     21: #include "sym.h"
                     22: #include "tk.h"
                     23: #include "ty.h"
                     24: 
                     25: #define chNull '\0'
                     26: 
                     27: typedef struct PDS {    /* procedure descriptor */
                     28:        long    isym;           /* beginning of symbols */
                     29:        ADRT    adrStart;       /* memory address of beginning of proc */
                     30:        char    *sbProc;        /* extra space to build up name */
                     31:        } PDR, *pPDR;
                     32: #define cbPDR sizeof(PDR)
                     33: #define ipdNil  -1
                     34: 
                     35: typedef struct FDS {    /* file descriptor */
                     36:        long    isym;           /* beginning of symbols */
                     37:        ADRT    adrStart;       /* memory address of beginning of file */
                     38:        char    *sbFile;        /* extra space to build up name */
                     39:        bits    fHasDecl : 1;   /* they DO have  a .d file */
                     40:        bits    fWarned : 1;    /* they have been warned about age problems */
                     41:        short   ipd;            /* start of procedures for this file */
                     42:        ushort  ilnMac;         /* number of lines in file (0 if don't know) */
                     43:        uint    *rgLn;          /* the line pointer array (if any) */
                     44:        } FDR, *pFDR;
                     45: #define cbFDR sizeof(FDR)
                     46: #define ilnNil  0
                     47: 
                     48: typedef struct BPS {    /* breakpoint */
                     49:        ADRT    adr;            /* address of breakpoint */
                     50:        uint    inst;           /* instruction that lives there */
                     51:        short   count;          /* number of times to hit before stop */
                     52:        char    sbBp[100];      /* commands for bp */
                     53:        } BPR, *pBPR;
                     54: #define cbBPR sizeof(BPR)
                     55: #define ibpNil  -1
                     56: #define ibpContinue -2
                     57: 
                     58: /* display format */
                     59: #define dfNil          0
                     60: #define dfDecimal       1
                     61: #define dfUnsigned      2
                     62: #define dfOctal                3
                     63: #define dfHex          4
                     64: #define dfFFloat       5
                     65: #define dfEFloat       6
                     66: #define dfGFloat       7
                     67: #define dfChar         8
                     68: #define dfByte         9
                     69: #define dfPStr         10
                     70: #define dfStr          11
                     71: #define dfProc         12
                     72: #define dfAddr         13
                     73: #define dfStruct       14
                     74: #define dfType         15
                     75: #define dfEnum         16
                     76: typedef int     DFE, *pDFE;
                     77: 
                     78: typedef struct MODES {  /* used for passing around output format info */
                     79:        DFE     df;     /* display format */
                     80:        short   len;    /* length of item (if meaningful) */
                     81:        short   cnt;    /* number of times to apply the format */
                     82:        short   imap;   /* selects map set to use (normally 0) */
                     83:        } MODER, *pMODER;
                     84: #define cbMODER sizeof(MODER)
                     85: #define modeNil ((pMODER)0)
                     86: 
                     87: /* format control for PrintPos */
                     88: #define fmtNil  0       /* we don't want nothin' printed */
                     89: #define fmtFile         0x01    /* print the file name */
                     90: #define fmtProc         0x02    /* print the procedure name */
                     91: #define fmtLn   0x04    /* print the line number */
                     92: #define fmtPrint 0x08    /* print the current line */
                     93: #define fmtEol  0x10    /* print an end-of-line */
                     94: #define fmtSave         0x20    /* do NOT reset vifd,vipd,viln,vslop */
                     95: 
                     96: typedef struct MAPS {
                     97:        long    b1;
                     98:        long    e1;
                     99:        long    f1;
                    100:        long    b2;
                    101:        long    e2;
                    102:        long    f2;
                    103:        short   fn;     /* file number that goes with this map */
                    104:        } MAPR, *pMAPR;
                    105: #define fnNil -1
                    106: 
                    107: /* command types */
                    108: #define cmdNil         0
                    109: #define cmdPrint       1       /* print lines */
                    110: #define cmdDisplay      2       /* display the contents of a variable */
                    111: #define cmdUpArrow      3       /* display contents of previous location */
                    112: #define cmdLineSingle   4       /* single step - follow proc calls */
                    113: #define cmdProcSingle   5       /* single step - treat procs as single line */
                    114: typedef int CMDE, *pCMDE;
                    115: 
                    116: /* auto-check states */
                    117: #define asNil          0       /* auto checking is not being used */
                    118: #define asActive       1       /* auto checking IS being used */
                    119: #define asSuspended     2       /* being used, but temporarily suspended */
                    120: typedef int ASE, *pASE;
                    121: 
                    122: typedef struct {       /* signal action record */
                    123:        /* fields are named this way so that all false is a good default */
                    124:        bits    fNoStop : 1;    /* if true, do not stop on signal */
                    125:        bits    fNoReport : 1;  /* if true, do not report non-stop signal */
                    126:        bits    fEatSig : 1;    /* if true, eat non-stop signal */
                    127:        } SAR, *pSAR;
                    128: #define cbSAR (sizeof(SAR))
                    129: #define saNil ((pSAR)0)
                    130: 
                    131: /* address spaces for looking at child */
                    132: #define spaceText 1
                    133: #define spaceData 2
                    134: 
                    135: #define pidNil 0
                    136: 
                    137: /* requests for `access' */
                    138: #define accRead                0
                    139: #define accWrite       1
                    140: 
                    141: /* requests for `ptrace' system call */
                    142: #define ptChild                0
                    143: #define ptReadI                1
                    144: #define ptReadD                2
                    145: #define ptReadUser      3
                    146: #define ptWriteI       4
                    147: #define ptWriteD       5
                    148: #define ptWriteUser     6
                    149: #define ptResume       7
                    150: #define ptTerm         8
                    151: #define ptSingle       9
                    152: 
                    153: #include "ext.h"  /* external declarations for all `export'ed procedures */
                    154: 
                    155: /* these were from `#include <fcntl.h>' on a System III */
                    156: #define O_RDONLY       0
                    157: #define O_WRONLY       1
                    158: #define O_RDWR         2

unix.superglobalmegacorp.com

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