1 /* Begin include file ..... debug_fnp_data.incl.pl1 */
  2 
  3 /* Describes various structures used by the debug_fnp command */
  4 
  5 /* Written February 1977 by Larry Johnson */
  6 
  7 /* Structures describing a symbol table used by the debug_fnp command,
  8    to find values for common FNP symbols. */
  9 
 10 dcl  db_fnp_symbols_$db_fnp_symbols_ ext;
 11 
 12 dcl  symbol_tablep ptr;
 13 
 14 dcl 1 symbol_table aligned based (symbol_tablep),
 15     2 cnt fixed bin,                                        /* Number of entries */
 16     2 maxcnt fixed bin,                                     /* Max count */
 17     2 entry (symbol_table.cnt) unal,
 18       3 one_symbol like sym unal;
 19 
 20 dcl  symp ptr;                                              /* Pointer to one symbol */
 21 
 22 dcl 1 sym unal based (symp),
 23     2 name char (6),
 24     2 value fixed bin (17),
 25     2 len fixed bin (17),                                   /* Number of words */
 26     2 reloc fixed bin (17),
 27     2 type fixed bin (17),
 28     2 flag_mem char (6),                                    /* If non blank, name of word in which this is a flag */
 29     2 explain bit (18),                                     /* Offset to explanation for symbol */
 30     2 pad bit (18);
 31 
 32 dcl  exptextp ptr;
 33 
 34 dcl 1 exptext aligned based (exptextp),                     /* Symbol explanation entry */
 35     2 len fixed bin (8) unal,
 36     2 data char (exptext.len) unal;
 37 
 38 /* Values for sym.reloc, which is relocation required to find the symbol */
 39 
 40 dcl (reloc_abs init (0),                                    /* Value is absolute */
 41      reloc_tib init (1),                                    /* Value is relative to current tib addr */
 42      reloc_hwcm init (2),                                   /* Value is relative to current hwcm */
 43      reloc_sfcm init (3),                                   /* Value is relative to software comm region */
 44      reloc_meters init (4))                                 /* Value is relative to tib meters */
 45      int static options (constant);
 46 
 47 /* Values for sym.type, which is the mode to be used in displaying symbol */
 48 
 49 dcl (type_oct init (0),                                     /* Octal, default for most symbols */
 50      type_char init (1),                                    /* Ascii characters */
 51      type_addr init (2),                                    /* Address to be converted to mod|offset */
 52      type_clock init (3),                                   /* Multics clock value */
 53      type_inst init (4),                                    /* Machine instruction */
 54      type_op init (5),                                      /* Interpreter opblock format */
 55      type_dec init (6),                                     /* Decimal */
 56      type_bit init (7),                                     /* In bits */
 57      type_ebcdic init (8))                                  /* 8-bit ebcdic characters */
 58      int static options (constant);
 59 
 60 dcl  long_type_names (0:8) char (12) int static options (constant) init (
 61      "octal", "character", "address", "clock", "instruction", "opblock", "decimal", "bit", "ebcdic");
 62 dcl  short_type_names (0:8) char (4) int static options (constant) init (
 63      "oct", "ch", "addr", "ck", "inst", "op", "dec", "bit", "ebc");
 64 
 65 
 66 /* Structure of suplmental data used in evaluating expressions */
 67 
 68 dcl  expr_infop ptr;
 69 
 70 dcl 1 expr_info aligned based (expr_infop),
 71     2 flags,
 72       3 star_known bit (1) unal,                            /* Value of "*" is known */
 73       3 tib_known bit (1) unal,                             /* TIB addresses may be used */
 74       3 hwcm_known bit (1) unal,                            /* HWCM address may be used */
 75       3 sfcm_known bit (1) unal,                            /* SFCM address may be used */
 76       3 pad bit (32) unal,
 77     2 star_addr fixed bin,                                  /* Value of "*" */
 78     2 tib_addr fixed bin,                                   /* Address of TIB */
 79     2 hwcm_addr fixed bin,                                  /* Address of HWCM */
 80     2 sfcm_addr fixed bin,                                  /* Address of SFCM */
 81     2 type fixed bin,                                       /* Expression type (mode for printing) */
 82     2 len fixed bin,                                        /* Implied length of expression */
 83     2 user_tablep ptr;                                      /* Pointer to a user symbol table */
 84 
 85 
 86 /* Structure of opcode table of machine instructions */
 87 
 88 dcl  db_fnp_opcodes_$ ext;
 89 
 90 dcl  optablep ptr;
 91 
 92 dcl 1 optable aligned based (optablep),
 93     2 cnt fixed bin,
 94     2 entry (optable.cnt) unal,
 95       3 one_op like op;
 96 
 97 dcl  opp ptr;
 98 
 99 dcl 1 op unal based (opp),
100     2 name char (6),                                        /* The mneumonic */
101     2 code bit (12),                                        /* The  opcode */
102     2 mask bit (12),                                        /* Mask that says where the opcode is */
103     2 type fixed bin (11),                                  /* Type of display required */
104     2 pad bit (18);
105 
106 /* Values for op.type are:
107    0 - storage reference
108    1 - non-storage reference (immediate),
109    2 - non-storage reference (iacxn only),
110    3 - non-storage reference (shifts),
111    4 - non-storage reference (no operands) */
112 
113 
114 /* Stuctures used while parsing commands into operands */
115 
116 dcl  cmd_infop ptr;
117 
118 dcl 1 cmd_info aligned based (cmd_infop),
119     2 inbuf char (256),                                     /* For reading lines */
120     2 opbuf char (256),                                     /* Used for operand in undoubling quotes */
121     2 commandp ptr,                                         /* Address of unparsed part of command */
122     2 commandl fixed bin,                                   /* Length of unparsed part */
123     2 operandp ptr,                                         /* Address of current operand */
124     2 operandl fixed bin,                                   /* And its length */
125     2 error bit (1),                                        /* Set if error parsing operand */
126     2 endline bit (1),                                      /* Set if no more operands on line */
127     2 opstring bit (1),                                     /* Set if operand was unquoted string */
128     2 flush bit (1),                                        /* If set, rest of input line will be ignored */
129     2 envp ptr;                                             /* Pointer to the debug_fnp environment structure */
130 
131 dcl  command char (cmd_info.commandl) based (cmd_info.commandp);
132 dcl  operand char (cmd_info.operandl) based (cmd_info.operandp);
133 
134 /* The following structure describes the current debug_fnp environment. */
135 /* It specifies whether we are working on a dump, fnp, core image, etc. */
136 
137 dcl  envp ptr;
138 
139 dcl 1 env aligned based (envp),
140     2 corep ptr,                                            /* Ptr to current dump or core-image. Null means live FNP */
141     2 fnp fixed bin,                                        /* Current fnp number */
142     2 dump_dir char (168) unal,                             /* Directory where dumps are found */
143     2 dir char (168) unal,                                  /* Directory for current dump or core image */
144     2 ename char (32) unal,                                 /* Ename for current dump or core image */
145     2 tty_name char (32),                                   /* Name of current channel */
146     2 segp ptr,                                             /* Pointer to base of current segment */
147     2 flags unal,
148       3 fnps_configured bit (8),                            /* Says which FNP's appear in config deck */
149       3 fnp_sw bit (1),                                     /* 1 if currently working on fnp */
150       3 image_sw bit (1),                                   /* 1 if currently working on a core-image */
151       3 dump_sw bit (1),                                    /* 1 if current working on a dump */
152       3 fdump_sw bit (1),                                   /* 1 if current dump is a fdump */
153       3 pad bit (24),
154     2 dump_time fixed bin (71);                             /* Clock time dump occured */
155 
156 /* Structure of data defining table of interpreter opblock names */
157 
158 dcl  db_fnp_opblocks_$ ext;
159 
160 dcl  opblock_tablep ptr;
161 
162 dcl 1 opblock_table aligned based (opblock_tablep),
163     2 cnt fixed bin,
164     2 name (0:opblock_table.cnt) char (6) unal;
165 
166 /* End include file ..... debug_fnp_data.incl.pl1 */