blob: ad67cfe648162d58a0b604f11fcb2b3ddfb18c1f [file] [log] [blame]
rsca84cbb22004-04-19 19:29:25 +00001typedef struct StabSym StabSym;
2typedef struct Stab Stab; /* defined in mach.h */
3
4struct StabSym
5{
6 char *name;
7 uchar type;
8 uchar other;
9 u16int desc;
10 u32int value;
11};
12
13enum
14{
15 EXT = 0x01,
16
17 N_UNDEF = 0x00,
18 N_ABS = 0x02,
19 N_TEXT = 0x04,
20 N_DATA = 0x06,
21 N_BSS = 0x08,
22 N_INDR = 0x0A,
23 N_FN_SEQ = 0x0C,
24 N_WEAKU = 0x0D,
25 N_WEAKA = 0x0E,
26 N_WEAKT = 0x0F,
27 N_WEAKD = 0x10,
28 N_WEAKB = 0x11,
29 N_COMM = 0x12,
30 N_SETA = 0x14,
31 N_SETT = 0x16,
32
33 N_GSYM = 0x20,
34 N_FNAME = 0x22,
35 N_FUN = 0x24,
36 N_STSYM = 0x26,
37 N_LCSYM = 0x28,
38 N_MAIN = 0x2A,
39 N_ROSYM = 0x2C,
40 N_PC = 0x30,
41 N_NSYMS = 0x32,
42 N_NOMAP = 0x34,
43 N_OBJ = 0x38,
44 N_OPT = 0x3C,
45 N_RSYM = 0x40,
46 N_M2C = 0x42,
47 N_SLINE = 0x44,
48 N_DSLINE = 0x46,
49 N_BSLINE = 0x48,
50 N_BROWS = 0x48,
51 N_DEFD = 0x4A,
52 N_FLINE = 0x4C,
53 N_EHDECL = 0x50,
54 N_MOD2 = 0x50,
55 N_CATCH = 0x54,
56 N_SSYM = 0x60,
57 N_ENDM = 0x62,
58 N_SO = 0x64,
59 N_ALIAS = 0x6C,
60 N_LSYM = 0x80,
61 N_BINCL = 0x82,
62 N_SOL = 0x84,
63 N_PSYM = 0xA0,
64 N_EINCL = 0xA2,
65 N_ENTRY = 0xA4,
66 N_LBRAC = 0xC0,
67 N_EXCL = 0xC2,
68 N_SCOPE = 0xC4,
69 N_RBRAC = 0xE0,
70 N_BCOMM = 0xE2,
71 N_ECOMM = 0xE4,
72 N_ECOML = 0xE8,
73 N_WITH = 0xEA,
74 N_LENG = 0xFE
75};
76
77/*
78 symbol descriptors
79
80[(0-9\-] variable on stack
81: C++ nested symbol
82a parameter by reference
83b based variable
84c constant
85C conformant array bound
86 name of caught exception (N_CATCH)
87d fp register variable
88D fp parameter
89f file scope function
90F global function
91G global variable
92i register parameter?
93I nested procedure
94J nested function
95L label name
96m module
97p arg list parameter
98pP
99pF
100P register param (N_PSYM)
101 proto of ref fun (N_FUN)
102Q static procedure
103R register param
104r register variable
105S file scope variable
106s local variable
107t type name
108T sue tag
109v param by reference
110V procedure scope static variable
111x conformant array
112X function return variable
113
114*/
115
116int stabsym(Stab*, int, StabSym*);
117