zig/lib/std / dwarf.zig

DWARF debugging data format. This namespace contains unopinionated types and data definitions only. For an implementation of parsing and caching DWARF information, see std.debug.Dwarf.

//! DWARF debugging data format.
//!
//! This namespace contains unopinionated types and data definitions only. For
//! an implementation of parsing and caching DWARF information, see
//! `std.debug.Dwarf`.

TAG

dwarf/TAG.zig

pub const TAG = @import("dwarf/TAG.zig");

AT

dwarf/AT.zig
pub const AT = @import("dwarf/AT.zig");

OP

dwarf/OP.zig
pub const OP = @import("dwarf/OP.zig");

LANG

dwarf/LANG.zig
pub const LANG = @import("dwarf/LANG.zig");

FORM

dwarf/FORM.zig
pub const FORM = @import("dwarf/FORM.zig");

ATE

dwarf/ATE.zig
pub const ATE = @import("dwarf/ATE.zig");

EH

dwarf/EH.zig
pub const EH = @import("dwarf/EH.zig");

Format

pub const Format = enum { @"32", @"64" };

LLE


pub const LLE = struct {

end_of_list

    pub const end_of_list = 0x00;

base_addressx

    pub const base_addressx = 0x01;

startx_endx

    pub const startx_endx = 0x02;

startx_length

    pub const startx_length = 0x03;

offset_pair

    pub const offset_pair = 0x04;

default_location

    pub const default_location = 0x05;

base_address

    pub const base_address = 0x06;

start_end

    pub const start_end = 0x07;

start_length

    pub const start_length = 0x08;
};

CFA


pub const CFA = struct {

advance_loc

    pub const advance_loc = 0x40;

offset

    pub const offset = 0x80;

restore

    pub const restore = 0xc0;

nop

    pub const nop = 0x00;

set_loc

    pub const set_loc = 0x01;

advance_loc1

    pub const advance_loc1 = 0x02;

advance_loc2

    pub const advance_loc2 = 0x03;

advance_loc4

    pub const advance_loc4 = 0x04;

offset_extended

    pub const offset_extended = 0x05;

restore_extended

    pub const restore_extended = 0x06;

@"undefined"

    pub const @"undefined" = 0x07;

same_value

    pub const same_value = 0x08;

register

    pub const register = 0x09;

remember_state

    pub const remember_state = 0x0a;

restore_state

    pub const restore_state = 0x0b;

def_cfa

    pub const def_cfa = 0x0c;

def_cfa_register

    pub const def_cfa_register = 0x0d;

def_cfa_offset

    pub const def_cfa_offset = 0x0e;

def_cfa_expression


    // DWARF 3.
    pub const def_cfa_expression = 0x0f;

expression

    pub const expression = 0x10;

offset_extended_sf

    pub const offset_extended_sf = 0x11;

def_cfa_sf

    pub const def_cfa_sf = 0x12;

def_cfa_offset_sf

    pub const def_cfa_offset_sf = 0x13;

val_offset

    pub const val_offset = 0x14;

val_offset_sf

    pub const val_offset_sf = 0x15;

val_expression

    pub const val_expression = 0x16;

lo_user


    pub const lo_user = 0x1c;

hi_user

    pub const hi_user = 0x3f;

MIPS_advance_loc8


    // SGI/MIPS specific.
    pub const MIPS_advance_loc8 = 0x1d;

GNU_window_save


    // GNU extensions.
    pub const GNU_window_save = 0x2d;

GNU_args_size

    pub const GNU_args_size = 0x2e;

GNU_negative_offset_extended

    pub const GNU_negative_offset_extended = 0x2f;
};

CHILDREN


pub const CHILDREN = struct {

no

    pub const no = 0x00;

yes

    pub const yes = 0x01;
};

LNS


pub const LNS = struct {

extended_op

    pub const extended_op = 0x00;

copy

    pub const copy = 0x01;

advance_pc

    pub const advance_pc = 0x02;

advance_line

    pub const advance_line = 0x03;

set_file

    pub const set_file = 0x04;

set_column

    pub const set_column = 0x05;

negate_stmt

    pub const negate_stmt = 0x06;

set_basic_block

    pub const set_basic_block = 0x07;

const_add_pc

    pub const const_add_pc = 0x08;

fixed_advance_pc

    pub const fixed_advance_pc = 0x09;

set_prologue_end

    pub const set_prologue_end = 0x0a;

set_epilogue_begin

    pub const set_epilogue_begin = 0x0b;

set_isa

    pub const set_isa = 0x0c;
};

LNE


pub const LNE = struct {

padding

    pub const padding = 0x00;

end_sequence

    pub const end_sequence = 0x01;

set_address

    pub const set_address = 0x02;

define_file

    pub const define_file = 0x03;

set_discriminator

    pub const set_discriminator = 0x04;

lo_user

    pub const lo_user = 0x80;

hi_user

    pub const hi_user = 0xff;

ZIG_set_decl


    // Zig extensions
    pub const ZIG_set_decl = 0xec;
};

UT


pub const UT = struct {

compile

    pub const compile = 0x01;

@"type"

    pub const @"type" = 0x02;

partial

    pub const partial = 0x03;

skeleton

    pub const skeleton = 0x04;

split_compile

    pub const split_compile = 0x05;

split_type

    pub const split_type = 0x06;

lo_user


    pub const lo_user = 0x80;

hi_user

    pub const hi_user = 0xff;
};

LNCT


pub const LNCT = struct {

path

    pub const path = 0x1;

directory_index

    pub const directory_index = 0x2;

timestamp

    pub const timestamp = 0x3;

size

    pub const size = 0x4;

MD5

    pub const MD5 = 0x5;

lo_user


    pub const lo_user = 0x2000;

hi_user

    pub const hi_user = 0x3fff;

LLVM_source


    pub const LLVM_source = 0x2001;
};

RLE


pub const RLE = struct {

end_of_list

    pub const end_of_list = 0x00;

base_addressx

    pub const base_addressx = 0x01;

startx_endx

    pub const startx_endx = 0x02;

startx_length

    pub const startx_length = 0x03;

offset_pair

    pub const offset_pair = 0x04;

base_address

    pub const base_address = 0x05;

start_end

    pub const start_end = 0x06;

start_length

    pub const start_length = 0x07;
};

CC


pub const CC = enum(u8) {
    normal = 0x1,
    program = 0x2,
    nocall = 0x3,

lo_user


    pass_by_reference = 0x4,
    pass_by_value = 0x5,

hi_user


    GNU_renesas_sh = 0x40,
    GNU_borland_fastcall_i386 = 0x41,

ACCESS


    BORLAND_safecall = 0xb0,
    BORLAND_stdcall = 0xb1,
    BORLAND_pascal = 0xb2,
    BORLAND_msfastcall = 0xb3,
    BORLAND_msreturn = 0xb4,
    BORLAND_thiscall = 0xb5,
    BORLAND_fastcall = 0xb6,

public


    LLVM_vectorcall = 0xc0,
    LLVM_Win64 = 0xc1,
    LLVM_X86_64SysV = 0xc2,
    LLVM_AAPCS = 0xc3,
    LLVM_AAPCS_VFP = 0xc4,
    LLVM_IntelOclBicc = 0xc5,
    LLVM_SpirFunction = 0xc6,
    LLVM_OpenCLKernel = 0xc7,
    LLVM_Swift = 0xc8,
    LLVM_PreserveMost = 0xc9,
    LLVM_PreserveAll = 0xca,
    LLVM_X86RegCall = 0xcb,
    LLVM_M68kRTD = 0xcc,
    LLVM_PreserveNone = 0xcd,
    LLVM_RISCVVectorCall = 0xce,
    LLVM_SwiftTail = 0xcf,

protected


    pub const lo_user = 0x40;
    pub const hi_user = 0xff;
};

private


pub const ACCESS = struct {
    pub const public = 0x01;
    pub const protected = 0x02;
    pub const private = 0x03;
};