go/src/cmd/link/internal/ld/dwarf.go

type dwctxt

type dwSym

func (c dwctxt) PtrSize() int {}

func (c dwctxt) Size(s dwarf.Sym) int64 {}

func (c dwctxt) AddInt(s dwarf.Sym, size int, i int64) {}

func (c dwctxt) AddBytes(s dwarf.Sym, b []byte) {}

func (c dwctxt) AddString(s dwarf.Sym, v string) {}

func (c dwctxt) AddAddress(s dwarf.Sym, data interface{}

func (c dwctxt) AddCURelativeAddress(s dwarf.Sym, data interface{}

func (c dwctxt) AddSectionOffset(s dwarf.Sym, size int, t interface{}

func (c dwctxt) AddDWARFAddrSectionOffset(s dwarf.Sym, t interface{}

func (c dwctxt) Logf(format string, args ...interface{}

func (c dwctxt) CurrentOffset(s dwarf.Sym) int64 {}

func (c dwctxt) RecordDclReference(s dwarf.Sym, t dwarf.Sym, dclIdx int, inlIndex int) {}

func (c dwctxt) RecordChildDieOffsets(s dwarf.Sym, vars []*dwarf.Var, offsets []int32) {}

func isDwarf64(ctxt *Link) bool {}

const GdbScriptPythonFileId

const GdbScriptSchemeFileId

const GdbScriptPythonTextId

const GdbScriptSchemeTextId

var gdbscript

type dwarfSecInfo

// secSym returns the section symbol for the section.
func (dsi *dwarfSecInfo) secSym() loader.Sym {}

// subSyms returns a list of sub-symbols for the section.
func (dsi *dwarfSecInfo) subSyms() []loader.Sym {}

var dwarfp

func (d *dwctxt) writeabbrev() dwarfSecInfo {}

var dwtypes

// newattr attaches a new attribute to the specified DIE.
//
// FIXME: at the moment attributes are stored in a linked list in a
// fairly space-inefficient way -- it might be better to instead look
// up all attrs in a single large table, then store indices into the
// table in the DIE. This would allow us to common up storage for
// attributes that are shared by many DIEs (ex: byte size of N).
func newattr(die *dwarf.DWDie, attr uint16, cls int, value int64, data interface{}

// Each DIE (except the root ones) has at least 1 attribute: its
// name. getattr moves the desired one to the front so
// frequently searched ones are found faster.
func getattr(die *dwarf.DWDie, attr uint16) *dwarf.DWAttr {}

// Every DIE manufactured by the linker has at least an AT_name
// attribute (but it will only be written out if it is listed in the abbrev).
// The compiler does create nameless DWARF DIEs (ex: concrete subprogram
// instance).
// FIXME: it would be more efficient to bulk-allocate DIEs.
func (d *dwctxt) newdie(parent *dwarf.DWDie, abbrev int, name string) *dwarf.DWDie {}

func walktypedef(die *dwarf.DWDie) *dwarf.DWDie {}

func (d *dwctxt) walksymtypedef(symIdx loader.Sym) loader.Sym {}

// Find child by AT_name using hashtable if available or linear scan
// if not.
func findchild(die *dwarf.DWDie, name string) *dwarf.DWDie {}

// find looks up the loader symbol for the DWARF DIE generated for the
// type with the specified name.
func (d *dwctxt) find(name string) loader.Sym {}

func (d *dwctxt) mustFind(name string) loader.Sym {}

func (d *dwctxt) adddwarfref(sb *loader.SymbolBuilder, t loader.Sym, size int) {}

func (d *dwctxt) newrefattr(die *dwarf.DWDie, attr uint16, ref loader.Sym) {}

func (d *dwctxt) dtolsym(s dwarf.Sym) loader.Sym {}

func (d *dwctxt) putdie(syms []loader.Sym, die *dwarf.DWDie) []loader.Sym {}

func reverselist(list **dwarf.DWDie) {}

func reversetree(list **dwarf.DWDie) {}

func newmemberoffsetattr(die *dwarf.DWDie, offs int32) {}

func (d *dwctxt) lookupOrDiag(n string) loader.Sym {}

func (d *dwctxt) dotypedef(parent *dwarf.DWDie, name string, def *dwarf.DWDie) *dwarf.DWDie {}

// Define gotype, for composite ones recurse into constituents.
func (d *dwctxt) defgotype(gotype loader.Sym) loader.Sym {}

func (d *dwctxt) newtype(gotype loader.Sym) *dwarf.DWDie {}

func (d *dwctxt) nameFromDIESym(dwtypeDIESym loader.Sym) string {}

func (d *dwctxt) defptrto(dwtype loader.Sym) loader.Sym {}

// Copies src's children into dst. Copies attributes by value.
// DWAttr.data is copied as pointer only. If except is one of
// the top-level children, it will not be copied.
func (d *dwctxt) copychildrenexcept(ctxt *Link, dst *dwarf.DWDie, src *dwarf.DWDie, except *dwarf.DWDie) {}

func (d *dwctxt) copychildren(ctxt *Link, dst *dwarf.DWDie, src *dwarf.DWDie) {}

// Search children (assumed to have TAG_member) for the one named
// field and set its AT_type to dwtype
func (d *dwctxt) substitutetype(structdie *dwarf.DWDie, field string, dwtype loader.Sym) {}

func (d *dwctxt) findprotodie(ctxt *Link, name string) *dwarf.DWDie {}

func (d *dwctxt) synthesizestringtypes(ctxt *Link, die *dwarf.DWDie) {}

func (d *dwctxt) synthesizeslicetypes(ctxt *Link, die *dwarf.DWDie) {}

func mkinternaltypename(base string, arg1 string, arg2 string) string {}

func (d *dwctxt) mkinternaltype(ctxt *Link, abbrev int, typename, keyname, valname string, f func(*dwarf.DWDie)) loader.Sym {}

func (d *dwctxt) synthesizemaptypes(ctxt *Link, die *dwarf.DWDie) {}

func (d *dwctxt) synthesizemaptypesSwiss(ctxt *Link, die *dwarf.DWDie) {}

func (d *dwctxt) synthesizemaptypesOld(ctxt *Link, die *dwarf.DWDie) {}

func (d *dwctxt) synthesizechantypes(ctxt *Link, die *dwarf.DWDie) {}

// createUnitLength creates the initial length field with value v and update
// offset of unit_length if needed.
func (d *dwctxt) createUnitLength(su *loader.SymbolBuilder, v uint64) {}

// addDwarfAddrField adds a DWARF field in DWARF 64bits or 32bits.
func (d *dwctxt) addDwarfAddrField(sb *loader.SymbolBuilder, v uint64) {}

// addDwarfAddrRef adds a DWARF pointer in DWARF 64bits or 32bits.
func (d *dwctxt) addDwarfAddrRef(sb *loader.SymbolBuilder, t loader.Sym) {}

// calcCompUnitRanges calculates the PC ranges of the compilation units.
func (d *dwctxt) calcCompUnitRanges() {}

func movetomodule(ctxt *Link, parent *dwarf.DWDie) {}

const LINE_BASE

const LINE_RANGE

const PC_RANGE

const OPCODE_BASE

func getCompilationDir() string {}

func (d *dwctxt) importInfoSymbol(dsym loader.Sym) {}

func expandFile(fname string) string {}

// writeDirFileTables emits the portion of the DWARF line table
// prologue containing the include directories and file names,
// described in section 6.2.4 of the DWARF 4 standard. It walks the
// filepaths for the unit to discover any common directories, which
// are emitted to the directory table first, then the file table is
// emitted after that.
func (d *dwctxt) writeDirFileTables(unit *sym.CompilationUnit, lsu *loader.SymbolBuilder) {}

// writelines collects up and chains together the symbols needed to
// form the DWARF line table for the specified compilation unit,
// returning a list of symbols. The returned list will include an
// initial symbol containing the line table header and prologue (with
// file table), then a series of compiler-emitted line table symbols
// (one per live function), and finally an epilog symbol containing an
// end-of-sequence operator. The prologue and epilog symbols are passed
// in (having been created earlier); here we add content to them.
func (d *dwctxt) writelines(unit *sym.CompilationUnit, lineProlog loader.Sym) []loader.Sym {}

// writepcranges generates the DW_AT_ranges table for compilation unit
// "unit", and returns a collection of ranges symbols (one for the
// compilation unit DIE itself and the remainder from functions in the unit).
func (d *dwctxt) writepcranges(unit *sym.CompilationUnit, base loader.Sym, pcs []dwarf.Range, rangeProlog loader.Sym) []loader.Sym {}

const dataAlignmentFactor

// appendPCDeltaCFA appends per-PC CFA deltas to b and returns the final slice.
func appendPCDeltaCFA(arch *sys.Arch, b []byte, deltapc, cfa int64) []byte {}

func (d *dwctxt) writeframes(fs loader.Sym) dwarfSecInfo {}

const COMPUNITHEADERSIZE

func (d *dwctxt) writeUnitInfo(u *sym.CompilationUnit, abbrevsym loader.Sym, infoEpilog loader.Sym) []loader.Sym {}

func (d *dwctxt) writegdbscript() dwarfSecInfo {}

var prototypedies

func dwarfEnabled(ctxt *Link) bool {}

// mkBuiltinType populates the dwctxt2 sym lookup maps for the
// newly created builtin type DIE 'typeDie'.
func (d *dwctxt) mkBuiltinType(ctxt *Link, abrv int, tname string) *dwarf.DWDie {}

// dwarfVisitFunction takes a function (text) symbol and processes the
// subprogram DIE for the function and picks up any other DIEs
// (absfns, types) that it references.
func (d *dwctxt) dwarfVisitFunction(fnSym loader.Sym, unit *sym.CompilationUnit) {}

// dwarfGenerateDebugInfo generated debug info entries for all types,
// variables and functions in the program.
// Along with dwarfGenerateDebugSyms they are the two main entry points into
// dwarf generation: dwarfGenerateDebugInfo does all the work that should be
// done before symbol names are mangled while dwarfGenerateDebugSyms does
// all the work that can only be done after addresses have been assigned to
// text symbols.
func dwarfGenerateDebugInfo(ctxt *Link) {}

// dwarfGenerateDebugSyms constructs debug_line, debug_frame, and
// debug_loc. It also writes out the debug_info section using symbols
// generated in dwarfGenerateDebugInfo2.
func dwarfGenerateDebugSyms(ctxt *Link) {}

type dwUnitSyms

// dwUnitPortion assembles the DWARF content for a given compilation
// unit: debug_info, debug_lines, debug_ranges, debug_loc (debug_frame
// is handled elsewhere). Order is important; the calls to writelines
// and writepcranges below make updates to the compilation unit DIE,
// hence they have to happen before the call to writeUnitInfo.
func (d *dwctxt) dwUnitPortion(u *sym.CompilationUnit, abbrevsym loader.Sym, us *dwUnitSyms) {}

func (d *dwctxt) dwarfGenerateDebugSyms() {}

func (d *dwctxt) collectUnitLocs(u *sym.CompilationUnit) []loader.Sym {}

// Add DWARF section names to the section header string table, by calling add
// on each name. ELF only.
func dwarfaddshstrings(ctxt *Link, add func(string)) {}

func dwarfaddelfsectionsyms(ctxt *Link) {}

// dwarfcompress compresses the DWARF sections. Relocations are applied
// on the fly. After this, dwarfp will contain a different (new) set of
// symbols, and sections may have been replaced.
func dwarfcompress(ctxt *Link) {}

func compilationUnitByStartPCCmp(a, b *sym.CompilationUnit) int {}

// getPkgFromCUSym returns the package name for the compilation unit
// represented by s.
// The prefix dwarf.InfoPrefix+".pkg." needs to be removed in order to get
// the package name.
func (d *dwctxt) getPkgFromCUSym(s loader.Sym) string {}

var dwsectCUSizeMu

var dwsectCUSize

// getDwsectCUSize retrieves the corresponding package size inside the current section.
func getDwsectCUSize(sname string, pkgname string) uint64 {}

func addDwsectCUSize(sname string, pkgname string, size uint64) {}