master
1//! DWARF debugging data format.
2//!
3//! This namespace contains unopinionated types and data definitions only. For
4//! an implementation of parsing and caching DWARF information, see
5//! `std.debug.Dwarf`.
6
7pub const TAG = @import("dwarf/TAG.zig");
8pub const AT = @import("dwarf/AT.zig");
9pub const OP = @import("dwarf/OP.zig");
10pub const LANG = @import("dwarf/LANG.zig");
11pub const FORM = @import("dwarf/FORM.zig");
12pub const ATE = @import("dwarf/ATE.zig");
13pub const EH = @import("dwarf/EH.zig");
14pub const Format = enum { @"32", @"64" };
15
16pub const LLE = struct {
17 pub const end_of_list = 0x00;
18 pub const base_addressx = 0x01;
19 pub const startx_endx = 0x02;
20 pub const startx_length = 0x03;
21 pub const offset_pair = 0x04;
22 pub const default_location = 0x05;
23 pub const base_address = 0x06;
24 pub const start_end = 0x07;
25 pub const start_length = 0x08;
26};
27
28pub const CFA = struct {
29 pub const advance_loc = 0x40;
30 pub const offset = 0x80;
31 pub const restore = 0xc0;
32 pub const nop = 0x00;
33 pub const set_loc = 0x01;
34 pub const advance_loc1 = 0x02;
35 pub const advance_loc2 = 0x03;
36 pub const advance_loc4 = 0x04;
37 pub const offset_extended = 0x05;
38 pub const restore_extended = 0x06;
39 pub const @"undefined" = 0x07;
40 pub const same_value = 0x08;
41 pub const register = 0x09;
42 pub const remember_state = 0x0a;
43 pub const restore_state = 0x0b;
44 pub const def_cfa = 0x0c;
45 pub const def_cfa_register = 0x0d;
46 pub const def_cfa_offset = 0x0e;
47
48 // DWARF 3.
49 pub const def_cfa_expression = 0x0f;
50 pub const expression = 0x10;
51 pub const offset_extended_sf = 0x11;
52 pub const def_cfa_sf = 0x12;
53 pub const def_cfa_offset_sf = 0x13;
54 pub const val_offset = 0x14;
55 pub const val_offset_sf = 0x15;
56 pub const val_expression = 0x16;
57
58 pub const lo_user = 0x1c;
59 pub const hi_user = 0x3f;
60
61 // SGI/MIPS specific.
62 pub const MIPS_advance_loc8 = 0x1d;
63
64 // GNU extensions.
65 pub const GNU_window_save = 0x2d;
66 pub const GNU_args_size = 0x2e;
67 pub const GNU_negative_offset_extended = 0x2f;
68};
69
70pub const CHILDREN = struct {
71 pub const no = 0x00;
72 pub const yes = 0x01;
73};
74
75pub const LNS = struct {
76 pub const extended_op = 0x00;
77 pub const copy = 0x01;
78 pub const advance_pc = 0x02;
79 pub const advance_line = 0x03;
80 pub const set_file = 0x04;
81 pub const set_column = 0x05;
82 pub const negate_stmt = 0x06;
83 pub const set_basic_block = 0x07;
84 pub const const_add_pc = 0x08;
85 pub const fixed_advance_pc = 0x09;
86 pub const set_prologue_end = 0x0a;
87 pub const set_epilogue_begin = 0x0b;
88 pub const set_isa = 0x0c;
89};
90
91pub const LNE = struct {
92 pub const padding = 0x00;
93 pub const end_sequence = 0x01;
94 pub const set_address = 0x02;
95 pub const define_file = 0x03;
96 pub const set_discriminator = 0x04;
97 pub const lo_user = 0x80;
98 pub const hi_user = 0xff;
99
100 // Zig extensions
101 pub const ZIG_set_decl = 0xec;
102};
103
104pub const UT = struct {
105 pub const compile = 0x01;
106 pub const @"type" = 0x02;
107 pub const partial = 0x03;
108 pub const skeleton = 0x04;
109 pub const split_compile = 0x05;
110 pub const split_type = 0x06;
111
112 pub const lo_user = 0x80;
113 pub const hi_user = 0xff;
114};
115
116pub const LNCT = struct {
117 pub const path = 0x1;
118 pub const directory_index = 0x2;
119 pub const timestamp = 0x3;
120 pub const size = 0x4;
121 pub const MD5 = 0x5;
122
123 pub const lo_user = 0x2000;
124 pub const hi_user = 0x3fff;
125
126 pub const LLVM_source = 0x2001;
127};
128
129pub const RLE = struct {
130 pub const end_of_list = 0x00;
131 pub const base_addressx = 0x01;
132 pub const startx_endx = 0x02;
133 pub const startx_length = 0x03;
134 pub const offset_pair = 0x04;
135 pub const base_address = 0x05;
136 pub const start_end = 0x06;
137 pub const start_length = 0x07;
138};
139
140pub const CC = enum(u8) {
141 normal = 0x1,
142 program = 0x2,
143 nocall = 0x3,
144
145 pass_by_reference = 0x4,
146 pass_by_value = 0x5,
147
148 GNU_renesas_sh = 0x40,
149 GNU_borland_fastcall_i386 = 0x41,
150
151 BORLAND_safecall = 0xb0,
152 BORLAND_stdcall = 0xb1,
153 BORLAND_pascal = 0xb2,
154 BORLAND_msfastcall = 0xb3,
155 BORLAND_msreturn = 0xb4,
156 BORLAND_thiscall = 0xb5,
157 BORLAND_fastcall = 0xb6,
158
159 LLVM_vectorcall = 0xc0,
160 LLVM_Win64 = 0xc1,
161 LLVM_X86_64SysV = 0xc2,
162 LLVM_AAPCS = 0xc3,
163 LLVM_AAPCS_VFP = 0xc4,
164 LLVM_IntelOclBicc = 0xc5,
165 LLVM_SpirFunction = 0xc6,
166 LLVM_OpenCLKernel = 0xc7,
167 LLVM_Swift = 0xc8,
168 LLVM_PreserveMost = 0xc9,
169 LLVM_PreserveAll = 0xca,
170 LLVM_X86RegCall = 0xcb,
171 LLVM_M68kRTD = 0xcc,
172 LLVM_PreserveNone = 0xcd,
173 LLVM_RISCVVectorCall = 0xce,
174 LLVM_SwiftTail = 0xcf,
175
176 pub const lo_user = 0x40;
177 pub const hi_user = 0xff;
178};
179
180pub const ACCESS = struct {
181 pub const public = 0x01;
182 pub const protected = 0x02;
183 pub const private = 0x03;
184};