...

Package dwarfgen

import "cmd/compile/internal/dwarfgen"
Overview
Index

Overview ▾

func AbstractFunc

func AbstractFunc(fn *obj.LSym)

Secondary hook for DWARF inlined subroutine generation. This is called late in the compilation when it is determined that we need an abstract function DIE for an inlined routine imported from a previously compiled package.

func Info

func Info(fnsym *obj.LSym, infosym *obj.LSym, curfn obj.Func) (scopes []dwarf.Scope, inlcalls dwarf.InlCalls)

func RecordFlags

func RecordFlags(flags ...string)

RecordFlags records the specified command-line flags to be placed in the DWARF info.

func RecordPackageName

func RecordPackageName()

RecordPackageName records the name of the package being compiled, so that the linker can save it in the compile unit's DIE.

type ScopeMarker

A ScopeMarker tracks scope nesting and boundaries for later use during DWARF generation.

type ScopeMarker struct {
    // contains filtered or unexported fields
}

func (*ScopeMarker) Pop

func (m *ScopeMarker) Pop(pos src.XPos)

Pop records a transition back to the current scope's parent.

func (*ScopeMarker) Push

func (m *ScopeMarker) Push(pos src.XPos)

Push records a transition to a new child scope of the current scope.

func (*ScopeMarker) Unpush

func (m *ScopeMarker) Unpush()

Unpush removes the current scope, which must be empty.

func (*ScopeMarker) WriteTo

func (m *ScopeMarker) WriteTo(fn *ir.Func)

WriteTo writes the recorded scope marks to the given function, and resets the marker for reuse.