3 N_MAIN with name "main" to identify entry function
4 N_SO source file. might be preceded by dir ending in /
6 empty string means source done
7 N_SOL source include file, value = text addr of where this starts
8 N_SLINE start of source line
11 value = code addr for that line
13 N_FUN (36) function def
16 desc = line number of def
17 return type is number after :
19 nil name marks end of function
25 N_LSYM (128) local variable
27 value = offset from fp
28 :ptype means parameter passed in reg but stored as variable
30 N_GSYM (32) global variable
31 addr not given (use external symbol)
36 N_STSYM(38)/N_FUN/N_LCSYM(40) data/text/bss
37 static varibale 'S' file static 'V' procedure static
40 N_PSYM (160) parameter
43 desc = line number of decl
45 register params followed by an N_RSYM with same name and :rtype.
49 type (a,b) means a=file number b=type number
51 N_BINCL/N_EINCL begin/end include
52 N_EXCL - same effect as earlier guy
62 name:symbol_opt typeinfo
64 typeinfo ::= typenum | typenum = attr* typedef
66 typenum ::= integer | '(' integer ',' integer ')'
70 attrtext ::= 'a' integer (alignment)
71 | 'p' integer (pointer class)
73 | 's' integer (size of type in bits)
74 | 'S' (string instead of array of chars)
77 | 'b' ('u' | 's') 'c'? width; offset; nbits; (builtin, signed/unsigned, char/not, width in bytes, offset & nbits of type)
78 | 'w' (aix wide char type, not used)
79 | 'R' fptype; bytes; (fptype 1=32-bit, 2=64-bit, 3=complex, 4=complex16, 5=complex32, 6=long double)
80 | 'g' typeinfo ';' nbits (aix floating, not used)
81 | 'c' typeinfo ';' nbits (aix complex, not used)
106 | -25 complex (two single)
107 | -26 complex (two double)
108 | -27 integer*1 8 signed
109 | -28 integer*2 16 signed
110 | -29 integer*4 32 signed
111 | -30 wchar 16 wide char
115 | -34 integer*8 64 signed
116 | 'b' typeinfo ';' bytes (ibm, no idea)
117 | 'B' typeinfo (volatile typref)
118 | 'd' typeinfo (file of typeref)
119 | 'k' typeinfo (const typeref)
120 | 'M' typeinfo ';' length (multiple instance type, fortran)
121 | 'S' typeinfo (set, typeref must have small number of values)
122 | '*' typeinfo (pointer to typeref)
123 | 'x' ('s'|'u'|'e') name ':' (struct, union, enum reference. name can have '::' in it)
124 | 'r' typeinfo ';' low ';' high ';' (subrange. typeref can be type being defined for base types!)
125 low and high are bounds
126 if bound is octal power of two, it's a big negative number
127 | ('a'|'P') indextypedef arraytypeinfo (array, index should be range type)
128 indextype is type definition not typeinfo (need not say typenum=)
130 | 'A' arraytypeinfo (open array (no index bounds))
131 | 'D' dims ';' typeinfo (dims-dimensional dynamic array)
132 | 'E' dims ';' typeinfo (subarray of N-dimensional array)
133 | 'n' typeinfo ';' bytes (max length string)
134 | 'z' typeinfo ';' bytes (no idea what difference is from 'n')
135 | 'N' (pascal stringptr)
136 | 'e' (name ':' bigint ',')* ';' (enum listing)
137 | ('s'|'u') bytes (name ':' type ',' bitoffset ',' bitsize ';')* ';' (struct/union defn)
138 tag is given as name in stabs entry, with 'T' symbol
139 | 'f' typeinfo ';' (function returning type)
140 | 'f' rettypeinfo ',' paramcount ';' (typeinfo ',' (0|1) ';')* ';'
141 | 'p' paramcount ';' (typeinfo ',' (0|1) ';')* ';'
142 | 'F' rettypeinfo ',' paramcount ';' (name ':' typeinfo ',' (0|1) ';')* ';'
143 | 'R' paramcount ';' (name ':' typeinfo ',' (0|1) ';')* ';'
144 (the 0 or 1 is pass-by-reference vs pass-by-value)
145 (the 0 or 1 is pass-by-reference vs pass-by-value)
148 'A' offset (bound is on stack by ref at offset offset from arg list)
149 | 'T' offset (bound is on stack by val at offset offset from arg list)
150 | 'a' regnum (bound passed by reference in register)
151 | 't' regnum (bound passed by value in register)
155 bigint ::= '-'? decimal
161 symbol 'Tt' means typename + tag in one stab
163 names can have ::, as in foo::bar::baz::t1
165 t16 unknown type just like void
166 t17 vtable record type