diff options
| author | William Sengir <william@sengir.com> | 2022-03-15 02:07:46 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-03-15 16:53:45 -0400 |
| commit | 6de8b4bc3d105c15cd473c5bf100db4c9328dd54 (patch) | |
| tree | 6f15f1b038b04aaf50ed03d7663c7e54d255a9b4 /lib/std/dwarf/FORM.zig | |
| parent | 47e004d975669fea1297224e33a868742178c4b4 (diff) | |
| download | zig-6de8b4bc3d105c15cd473c5bf100db4c9328dd54.tar.gz zig-6de8b4bc3d105c15cd473c5bf100db4c9328dd54.zip | |
std.dwarf: implement basic DWARF 5 parsing
DWARF 5 moves around some fields and adds a few new ones that can't be
parsed or ignored by our current DWARF 4 parser. This isn't a complete
implementation of DWARF 5, but this is enough to make stack traces
mostly work. Line numbers from C++ don't show up, but I know the info
is there. I think the answer is to iterate through .debug_line_str in
getLineNumberInfo, but I didn't want to fall into an even deeper rabbit
hole tonight.
Diffstat (limited to 'lib/std/dwarf/FORM.zig')
| -rw-r--r-- | lib/std/dwarf/FORM.zig | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/lib/std/dwarf/FORM.zig b/lib/std/dwarf/FORM.zig new file mode 100644 index 0000000000..eb50c1dc93 --- /dev/null +++ b/lib/std/dwarf/FORM.zig @@ -0,0 +1,52 @@ +pub const addr = 0x01; +pub const block2 = 0x03; +pub const block4 = 0x04; +pub const data2 = 0x05; +pub const data4 = 0x06; +pub const data8 = 0x07; +pub const string = 0x08; +pub const block = 0x09; +pub const block1 = 0x0a; +pub const data1 = 0x0b; +pub const flag = 0x0c; +pub const sdata = 0x0d; +pub const strp = 0x0e; +pub const udata = 0x0f; +pub const ref_addr = 0x10; +pub const ref1 = 0x11; +pub const ref2 = 0x12; +pub const ref4 = 0x13; +pub const ref8 = 0x14; +pub const ref_udata = 0x15; +pub const indirect = 0x16; +pub const sec_offset = 0x17; +pub const exprloc = 0x18; +pub const flag_present = 0x19; +pub const strx = 0x1a; +pub const addrx = 0x1b; +pub const ref_sup4 = 0x1c; +pub const strp_sup = 0x1d; +pub const data16 = 0x1e; +pub const line_strp = 0x1f; +pub const ref_sig8 = 0x20; +pub const implicit_const = 0x21; +pub const loclistx = 0x22; +pub const rnglistx = 0x23; +pub const ref_sup8 = 0x24; +pub const strx1 = 0x25; +pub const strx2 = 0x26; +pub const strx3 = 0x27; +pub const strx4 = 0x28; +pub const addrx1 = 0x29; +pub const addrx2 = 0x2a; +pub const addrx3 = 0x2b; +pub const addrx4 = 0x2c; + +// Extensions for Fission. See http://gcc.gnu.org/wiki/DebugFission. +pub const GNU_addr_index = 0x1f01; +pub const GNU_str_index = 0x1f02; + +// Extensions for DWZ multifile. +// See http://www.dwarfstd.org/ShowIssue.php?issue=120604.1&type=open . +pub const GNU_ref_alt = 0x1f20; +pub const GNU_strp_alt = 0x1f21; |
