go/src/cmd/internal/obj/dwarf.go

const LINE_BASE

const LINE_RANGE

const PC_RANGE

const OPCODE_BASE

// generateDebugLinesSymbol fills the debug lines symbol of a given function.
//
// It's worth noting that this function doesn't generate the full debug_lines
// DWARF section, saving that for the linker. This function just generates the
// state machine part of debug_lines. The full table is generated by the
// linker.  Also, we use the file numbers from the full package (not just the
// function in question) when generating the state machine. We do this so we
// don't have to do a fixup on the indices when writing the full section.
func (ctxt *Link) generateDebugLinesSymbol(s, lines *LSym) {}

func putpclcdelta(linkctxt *Link, dctxt dwCtxt, s *LSym, deltaPC uint64, deltaLC int64) {}

type dwCtxt

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) AddUint16(s dwarf.Sym, i uint16) {}

func (c dwCtxt) AddUint8(s dwarf.Sym, i uint8) {}

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) CurrentOffset(s dwarf.Sym) int64 {}

// Here "from" is a symbol corresponding to an inlined or concrete
// function, "to" is the symbol for the corresponding abstract
// function, and "dclIdx" is the index of the symbol of interest with
// respect to the Dcl slice of the original pre-optimization version
// of the inlined function.
func (c dwCtxt) RecordDclReference(from dwarf.Sym, to dwarf.Sym, dclIdx int, inlIndex int) {}

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

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

func isDwarf64(ctxt *Link) bool {}

func (ctxt *Link) dwarfSym(s *LSym) (dwarfInfoSym, dwarfLocSym, dwarfRangesSym, dwarfAbsFnSym, dwarfDebugLines *LSym) {}

// textPos returns the source position of the first instruction (prog)
// of the specified function.
func textPos(fn *LSym) src.XPos {}

// populateDWARF fills in the DWARF Debugging Information Entries for
// TEXT symbol 's'. The various DWARF symbols must already have been
// initialized in InitTextSym.
func (ctxt *Link) populateDWARF(curfn Func, s *LSym) {}

// DwarfIntConst creates a link symbol for an integer constant with the
// given name, type and value.
func (ctxt *Link) DwarfIntConst(name, typename string, val int64) {}

// DwarfGlobal creates a link symbol containing a DWARF entry for
// a global variable.
func (ctxt *Link) DwarfGlobal(typename string, varSym *LSym) {}

func (ctxt *Link) DwarfAbstractFunc(curfn Func, s *LSym) {}

type DwarfFixupTable

type symFixups

type declOffset

type relFixup

type fnState

func NewDwarfFixupTable(ctxt *Link) *DwarfFixupTable {}

func (ft *DwarfFixupTable) GetPrecursorFunc(s *LSym) Func {}

func (ft *DwarfFixupTable) SetPrecursorFunc(s *LSym, fn Func) {}

// Make a note of a child DIE reference: relocation 'ridx' within symbol 's'
// is targeting child 'c' of DIE with symbol 'tgt'.
func (ft *DwarfFixupTable) ReferenceChildDIE(s *LSym, ridx int, tgt *LSym, dclidx int, inlIndex int) {}

// Called once DWARF generation is complete for a given abstract function,
// whose children might have been referenced via a call above. Stores
// the offsets for any child DIEs (vars, params) so that they can be
// consumed later in on DwarfFixupTable.Finalize, which applies any
// outstanding fixups.
func (ft *DwarfFixupTable) RegisterChildDIEOffsets(s *LSym, vars []*dwarf.Var, coffsets []int32) {}

func (ft *DwarfFixupTable) processFixups(slot int, s *LSym) {}

// return the LSym corresponding to the 'abstract subprogram' DWARF
// info entry for a function.
func (ft *DwarfFixupTable) AbsFuncDwarfSym(fnsym *LSym) *LSym {}

// Called after all functions have been compiled; the main job of this
// function is to identify cases where there are outstanding fixups.
// This scenario crops up when we have references to variables of an
// inlined routine, but that routine is defined in some other package.
// This helper walks through and locate these fixups, then invokes a
// helper to create an abstract subprogram DIE for each one.
func (ft *DwarfFixupTable) Finalize(myimportpath string, trace bool) {}