package dwarfgen

import "cmd/compile/internal/dwarfgen"

Index

Functions

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(ctxt *obj.Link, 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.

Types

type ScopeMarker

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

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

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.

Source Files

dwarf.go dwinl.go marker.go scope.go

Version
v1.24.0 (latest)
Published
Feb 10, 2025
Platform
linux/amd64
Imports
18 packages
Last checked
4 minutes ago

Tools for package owners.