type Data … var errSegmentSelector … // New returns a new [Data] object initialized from the given parameters. // Rather than calling this function directly, clients should typically use // the DWARF method of the File type of the appropriate package [debug/elf], // [debug/macho], or [debug/pe]. // // The []byte arguments are the data from the corresponding debug section // in the object file; for example, for an ELF object, abbrev is the contents of // the ".debug_abbrev" section. func New(abbrev, aranges, frame, info, line, pubnames, ranges, str []byte) (*Data, error) { … } // AddTypes will add one .debug_types section to the DWARF data. A // typical object with DWARF version 4 debug info will have multiple // .debug_types sections. The name is used for error reporting only, // and serves to distinguish one .debug_types section from another. func (d *Data) AddTypes(name string, types []byte) error { … } // AddSection adds another DWARF section by name. The name should be a // DWARF section name such as ".debug_addr", ".debug_str_offsets", and // so forth. This approach is used for new DWARF sections added in // DWARF 5 and later. func (d *Data) AddSection(name string, contents []byte) error { … }