跳转到内容
标准库Zig 0.17.1官方原文
源码std/dwarf.zig

第 1 行

DWARF 调试数据格式。

此命名空间仅包含不预设使用策略的类型与数据定义。 有关解析和缓存 DWARF 信息的实现,参见 std.debug.Dwarf。

std.dwarf.ACCESS

命名空间

第 180 行

std.dwarf.ACCESS.private

常量

第 183 行

std.dwarf.ACCESS.protected

常量

第 182 行

std.dwarf.ACCESS.public

常量

第 181 行

std.dwarf.AT

别名

第 8 行

别名目标 std.dwarf.AT

std.dwarf.ATE

别名

第 12 行

别名目标 std.dwarf.ATE

std.dwarf.CC

容器

第 140 行

字段

normal = 0x1
program = 0x2
nocall = 0x3
pass_by_reference = 0x4
pass_by_value = 0x5
GNU_renesas_sh = 0x40
GNU_borland_fastcall_i386 = 0x41
BORLAND_safecall = 0xb0
BORLAND_stdcall = 0xb1
BORLAND_pascal = 0xb2
BORLAND_msfastcall = 0xb3
BORLAND_msreturn = 0xb4
BORLAND_thiscall = 0xb5
BORLAND_fastcall = 0xb6
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

std.dwarf.CC.hi_user

常量

第 177 行

std.dwarf.CC.lo_user

常量

第 176 行

std.dwarf.CFA

命名空间

第 28 行

std.dwarf.CFA.@"undefined"

常量

第 39 行

std.dwarf.CFA.advance_loc

常量

第 29 行

std.dwarf.CFA.advance_loc1

常量

第 34 行

std.dwarf.CFA.advance_loc2

常量

第 35 行

std.dwarf.CFA.advance_loc4

常量

第 36 行

std.dwarf.CFA.def_cfa

常量

第 44 行

std.dwarf.CFA.def_cfa_expression

常量

第 49 行

std.dwarf.CFA.def_cfa_offset

常量

第 46 行

std.dwarf.CFA.def_cfa_offset_sf

常量

第 53 行

std.dwarf.CFA.def_cfa_register

常量

第 45 行

std.dwarf.CFA.def_cfa_sf

常量

第 52 行

std.dwarf.CFA.expression

常量

第 50 行

std.dwarf.CFA.GNU_args_size

常量

第 66 行

std.dwarf.CFA.GNU_negative_offset_extended

常量

第 67 行

std.dwarf.CFA.GNU_window_save

常量

第 65 行

std.dwarf.CFA.hi_user

常量

第 59 行

std.dwarf.CFA.lo_user

常量

第 58 行

std.dwarf.CFA.MIPS_advance_loc8

常量

第 62 行

std.dwarf.CFA.nop

常量

第 32 行

std.dwarf.CFA.offset

常量

第 30 行

std.dwarf.CFA.offset_extended

常量

第 37 行

std.dwarf.CFA.offset_extended_sf

常量

第 51 行

std.dwarf.CFA.register

常量

第 41 行

std.dwarf.CFA.remember_state

常量

第 42 行

std.dwarf.CFA.restore

常量

第 31 行

std.dwarf.CFA.restore_extended

常量

第 38 行

std.dwarf.CFA.restore_state

常量

第 43 行

std.dwarf.CFA.same_value

常量

第 40 行

std.dwarf.CFA.set_loc

常量

第 33 行

std.dwarf.CFA.val_expression

常量

第 56 行

std.dwarf.CFA.val_offset

常量

第 54 行

std.dwarf.CFA.val_offset_sf

常量

第 55 行

std.dwarf.CHILDREN

命名空间

第 70 行

std.dwarf.CHILDREN.no

常量

第 71 行

std.dwarf.CHILDREN.yes

常量

第 72 行

std.dwarf.EH

别名

第 13 行

别名目标 std.dwarf.EH

std.dwarf.FORM

别名

第 11 行

别名目标 std.dwarf.FORM

std.dwarf.Format

容器

第 14 行

字段

@"32"
@"64"

std.dwarf.LANG

别名

第 10 行

别名目标 std.dwarf.LANG

std.dwarf.LLE

命名空间

第 16 行

std.dwarf.LLE.base_address

常量

第 23 行

std.dwarf.LLE.base_addressx

常量

第 18 行

std.dwarf.LLE.default_location

常量

第 22 行

std.dwarf.LLE.end_of_list

常量

第 17 行

std.dwarf.LLE.offset_pair

常量

第 21 行

std.dwarf.LLE.start_end

常量

第 24 行

std.dwarf.LLE.start_length

常量

第 25 行

std.dwarf.LLE.startx_endx

常量

第 19 行

std.dwarf.LLE.startx_length

常量

第 20 行

std.dwarf.LNCT

命名空间

第 116 行

std.dwarf.LNCT.directory_index

常量

第 118 行

std.dwarf.LNCT.hi_user

常量

第 124 行

std.dwarf.LNCT.LLVM_source

常量

第 126 行

std.dwarf.LNCT.lo_user

常量

第 123 行

std.dwarf.LNCT.MD5

常量

第 121 行

std.dwarf.LNCT.path

常量

第 117 行

std.dwarf.LNCT.size

常量

第 120 行

std.dwarf.LNCT.timestamp

常量

第 119 行

std.dwarf.LNE

命名空间

第 91 行

std.dwarf.LNE.define_file

常量

第 95 行

std.dwarf.LNE.end_sequence

常量

第 93 行

std.dwarf.LNE.hi_user

常量

第 98 行

std.dwarf.LNE.lo_user

常量

第 97 行

std.dwarf.LNE.padding

常量

第 92 行

std.dwarf.LNE.set_address

常量

第 94 行

std.dwarf.LNE.set_discriminator

常量

第 96 行

std.dwarf.LNE.ZIG_set_decl

常量

第 101 行

std.dwarf.LNS

命名空间

第 75 行

std.dwarf.LNS.advance_line

常量

第 79 行

std.dwarf.LNS.advance_pc

常量

第 78 行

std.dwarf.LNS.const_add_pc

常量

第 84 行

std.dwarf.LNS.copy

常量

第 77 行

std.dwarf.LNS.extended_op

常量

第 76 行

std.dwarf.LNS.fixed_advance_pc

常量

第 85 行

std.dwarf.LNS.negate_stmt

常量

第 82 行

std.dwarf.LNS.set_basic_block

常量

第 83 行

std.dwarf.LNS.set_column

常量

第 81 行

std.dwarf.LNS.set_epilogue_begin

常量

第 87 行

std.dwarf.LNS.set_file

常量

第 80 行

std.dwarf.LNS.set_isa

常量

第 88 行

std.dwarf.LNS.set_prologue_end

常量

第 86 行

std.dwarf.OP

别名

第 9 行

别名目标 std.dwarf.OP

std.dwarf.RLE

命名空间

第 129 行

std.dwarf.RLE.base_address

常量

第 135 行

std.dwarf.RLE.base_addressx

常量

第 131 行

std.dwarf.RLE.end_of_list

常量

第 130 行

std.dwarf.RLE.offset_pair

常量

第 134 行

std.dwarf.RLE.start_end

常量

第 136 行

std.dwarf.RLE.start_length

常量

第 137 行

std.dwarf.RLE.startx_endx

常量

第 132 行

std.dwarf.RLE.startx_length

常量

第 133 行

std.dwarf.TAG

别名

第 7 行

别名目标 std.dwarf.TAG

std.dwarf.UT

命名空间

第 104 行

std.dwarf.UT.@"type"

常量

第 106 行

std.dwarf.UT.compile

常量

第 105 行

std.dwarf.UT.hi_user

常量

第 113 行

std.dwarf.UT.lo_user

常量

第 112 行

std.dwarf.UT.partial

常量

第 107 行

std.dwarf.UT.skeleton

常量

第 108 行

std.dwarf.UT.split_compile

常量

第 109 行

std.dwarf.UT.split_type

常量

第 110 行

源码

std/dwarf.zig

//! DWARF 调试数据格式。
//!
//! 此命名空间仅包含不预设使用策略的类型与数据定义。
//! 有关解析和缓存 DWARF 信息的实现,参见
//! `std.debug.Dwarf`。

pub const TAG = @import("dwarf/TAG.zig");
pub const AT = @import("dwarf/AT.zig");
pub const OP = @import("dwarf/OP.zig");
pub const LANG = @import("dwarf/LANG.zig");
pub const FORM = @import("dwarf/FORM.zig");
pub const ATE = @import("dwarf/ATE.zig");
pub const EH = @import("dwarf/EH.zig");
pub const Format = enum { @"32", @"64" };

pub const LLE = struct {
    pub const end_of_list = 0x00;
    pub const base_addressx = 0x01;
    pub const startx_endx = 0x02;
    pub const startx_length = 0x03;
    pub const offset_pair = 0x04;
    pub const default_location = 0x05;
    pub const base_address = 0x06;
    pub const start_end = 0x07;
    pub const start_length = 0x08;
};

pub const CFA = struct {
    pub const advance_loc = 0x40;
    pub const offset = 0x80;
    pub const restore = 0xc0;
    pub const nop = 0x00;
    pub const set_loc = 0x01;
    pub const advance_loc1 = 0x02;
    pub const advance_loc2 = 0x03;
    pub const advance_loc4 = 0x04;
    pub const offset_extended = 0x05;
    pub const restore_extended = 0x06;
    pub const @"undefined" = 0x07;
    pub const same_value = 0x08;
    pub const register = 0x09;
    pub const remember_state = 0x0a;
    pub const restore_state = 0x0b;
    pub const def_cfa = 0x0c;
    pub const def_cfa_register = 0x0d;
    pub const def_cfa_offset = 0x0e;

    // DWARF 3 格式。
    pub const def_cfa_expression = 0x0f;
    pub const expression = 0x10;
    pub const offset_extended_sf = 0x11;
    pub const def_cfa_sf = 0x12;
    pub const def_cfa_offset_sf = 0x13;
    pub const val_offset = 0x14;
    pub const val_offset_sf = 0x15;
    pub const val_expression = 0x16;

    pub const lo_user = 0x1c;
    pub const hi_user = 0x3f;

    // SGI/MIPS 专用。
    pub const MIPS_advance_loc8 = 0x1d;

    // GNU 扩展。
    pub const GNU_window_save = 0x2d;
    pub const GNU_args_size = 0x2e;
    pub const GNU_negative_offset_extended = 0x2f;
};

pub const CHILDREN = struct {
    pub const no = 0x00;
    pub const yes = 0x01;
};

pub const LNS = struct {
    pub const extended_op = 0x00;
    pub const copy = 0x01;
    pub const advance_pc = 0x02;
    pub const advance_line = 0x03;
    pub const set_file = 0x04;
    pub const set_column = 0x05;
    pub const negate_stmt = 0x06;
    pub const set_basic_block = 0x07;
    pub const const_add_pc = 0x08;
    pub const fixed_advance_pc = 0x09;
    pub const set_prologue_end = 0x0a;
    pub const set_epilogue_begin = 0x0b;
    pub const set_isa = 0x0c;
};

pub const LNE = struct {
    pub const padding = 0x00;
    pub const end_sequence = 0x01;
    pub const set_address = 0x02;
    pub const define_file = 0x03;
    pub const set_discriminator = 0x04;
    pub const lo_user = 0x80;
    pub const hi_user = 0xff;

    // Zig 扩展
    pub const ZIG_set_decl = 0xec;
};

pub const UT = struct {
    pub const compile = 0x01;
    pub const @"type" = 0x02;
    pub const partial = 0x03;
    pub const skeleton = 0x04;
    pub const split_compile = 0x05;
    pub const split_type = 0x06;

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

pub const LNCT = struct {
    pub const path = 0x1;
    pub const directory_index = 0x2;
    pub const timestamp = 0x3;
    pub const size = 0x4;
    pub const MD5 = 0x5;

    pub const lo_user = 0x2000;
    pub const hi_user = 0x3fff;

    pub const LLVM_source = 0x2001;
};

pub const RLE = struct {
    pub const end_of_list = 0x00;
    pub const base_addressx = 0x01;
    pub const startx_endx = 0x02;
    pub const startx_length = 0x03;
    pub const offset_pair = 0x04;
    pub const base_address = 0x05;
    pub const start_end = 0x06;
    pub const start_length = 0x07;
};

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

    pass_by_reference = 0x4,
    pass_by_value = 0x5,

    GNU_renesas_sh = 0x40,
    GNU_borland_fastcall_i386 = 0x41,

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

    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,

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

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