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

const InfoPrefix

const ConstInfoPrefix

const CUInfoPrefix

const AbstractFuncSuffix

var logDwarf

type Sym

type Var

type Scope

type Range

type FnState

func EnableLogging(doit bool) {}

// MergeRanges creates a new range list by merging the ranges from
// its two arguments, then returns the new list.
func MergeRanges(in1, in2 []Range) []Range {}

// UnifyRanges merges the ranges from 'c' into the list of ranges for 's'.
func (s *Scope) UnifyRanges(c *Scope) {}

// AppendRange adds r to s, if r is non-empty.
// If possible, it extends the last Range in s.Ranges; if not, it creates a new one.
func (s *Scope) AppendRange(r Range) {}

type InlCalls

type InlCall

type Context

// AppendUleb128 appends v to b using DWARF's unsigned LEB128 encoding.
func AppendUleb128(b []byte, v uint64) []byte {}

// AppendSleb128 appends v to b using DWARF's signed LEB128 encoding.
func AppendSleb128(b []byte, v int64) []byte {}

var sevenbits

// sevenBitU returns the unsigned LEB128 encoding of v if v is seven bits and nil otherwise.
// The contents of the returned slice must not be modified.
func sevenBitU(v int64) []byte {}

// sevenBitS returns the signed LEB128 encoding of v if v is seven bits and nil otherwise.
// The contents of the returned slice must not be modified.
func sevenBitS(v int64) []byte {}

// Uleb128put appends v to s using DWARF's unsigned LEB128 encoding.
func Uleb128put(ctxt Context, s Sym, v int64) {}

// Sleb128put appends v to s using DWARF's signed LEB128 encoding.
func Sleb128put(ctxt Context, s Sym, v int64) {}

type dwAttrForm

const DW_AT_go_kind

const DW_AT_go_key

const DW_AT_go_elem

const DW_AT_go_embedded_field

const DW_AT_go_runtime_type

const DW_AT_go_package_name

const DW_AT_go_dict_index

const DW_AT_go_closure_offset

const DW_AT_internal_location

const DW_ABRV_NULL

const DW_ABRV_COMPUNIT

const DW_ABRV_COMPUNIT_TEXTLESS

const DW_ABRV_FUNCTION

const DW_ABRV_WRAPPER

const DW_ABRV_FUNCTION_ABSTRACT

const DW_ABRV_FUNCTION_CONCRETE

const DW_ABRV_WRAPPER_CONCRETE

const DW_ABRV_INLINED_SUBROUTINE

const DW_ABRV_INLINED_SUBROUTINE_RANGES

const DW_ABRV_VARIABLE

const DW_ABRV_INT_CONSTANT

const DW_ABRV_LEXICAL_BLOCK_RANGES

const DW_ABRV_LEXICAL_BLOCK_SIMPLE

const DW_ABRV_STRUCTFIELD

const DW_ABRV_FUNCTYPEPARAM

const DW_ABRV_FUNCTYPEOUTPARAM

const DW_ABRV_DOTDOTDOT

const DW_ABRV_ARRAYRANGE

const DW_ABRV_NULLTYPE

const DW_ABRV_BASETYPE

const DW_ABRV_ARRAYTYPE

const DW_ABRV_CHANTYPE

const DW_ABRV_FUNCTYPE

const DW_ABRV_IFACETYPE

const DW_ABRV_MAPTYPE

const DW_ABRV_PTRTYPE

const DW_ABRV_BARE_PTRTYPE

const DW_ABRV_SLICETYPE

const DW_ABRV_STRINGTYPE

const DW_ABRV_STRUCTTYPE

const DW_ABRV_TYPEDECL

const DW_ABRV_DICT_INDEX

const DW_ABRV_PUTVAR_START

type dwAbbrev

var abbrevsFinalized

// expandPseudoForm takes an input DW_FORM_xxx value and translates it
// into a platform-appropriate concrete form. Existing concrete/real
// DW_FORM values are left untouched. For the moment the only
// pseudo-form is DW_FORM_udata_pseudo, which gets expanded to
// DW_FORM_data4 on Darwin and DW_FORM_udata everywhere else. See
// issue #31459 for more context.
func expandPseudoForm(form uint8) uint8 {}

// Abbrevs returns the finalized abbrev array for the platform,
// expanding any DW_FORM pseudo-ops to real values.
func Abbrevs() []dwAbbrev {}

var abbrevs

// GetAbbrev returns the contents of the .debug_abbrev section.
func GetAbbrev() []byte {}

type DWAttr

type DWDie

func putattr(ctxt Context, s Sym, abbrev int, form int, cls int, value int64, data interface{}

// PutAttrs writes the attributes for a DIE to symbol 's'.
//
// Note that we can (and do) add arbitrary attributes to a DIE, but
// only the ones actually listed in the Abbrev will be written out.
func PutAttrs(ctxt Context, s Sym, abbrev int, attr *DWAttr) {}

// HasChildren reports whether 'die' uses an abbrev that supports children.
func HasChildren(die *DWDie) bool {}

// PutIntConst writes a DIE for an integer constant
func PutIntConst(ctxt Context, info, typ Sym, name string, val int64) {}

// PutGlobal writes a DIE for a global variable.
func PutGlobal(ctxt Context, info, typ, gvar Sym, name string) {}

// PutBasedRanges writes a range table to sym. All addresses in ranges are
// relative to some base address, which must be arranged by the caller
// (e.g., with a DW_AT_low_pc attribute, or in a BASE-prefixed range).
func PutBasedRanges(ctxt Context, sym Sym, ranges []Range) {}

// PutRanges writes a range table to s.Ranges.
// All addresses in ranges are relative to s.base.
func (s *FnState) PutRanges(ctxt Context, ranges []Range) {}

// Return TRUE if the inlined call in the specified slot is empty,
// meaning it has a zero-length range (no instructions), and all
// of its children are empty.
func isEmptyInlinedCall(slot int, calls *InlCalls) bool {}

// Slot -1:    return top-level inlines.
// Slot >= 0:  return children of that slot.
func inlChildren(slot int, calls *InlCalls) []int {}

func inlinedVarTable(inlcalls *InlCalls) map[*Var]bool {}

// The s.Scopes slice contains variables were originally part of the
// function being emitted, as well as variables that were imported
// from various callee functions during the inlining process. This
// function prunes out any variables from the latter category (since
// they will be emitted as part of DWARF inlined_subroutine DIEs) and
// then generates scopes for vars in the former category.
func putPrunedScopes(ctxt Context, s *FnState, fnabbrev int) error {}

// Emit DWARF attributes and child DIEs for an 'abstract' subprogram.
// The abstract subprogram DIE for a function contains its
// location-independent attributes (name, type, etc). Other instances
// of the function (any inlined copy of it, or the single out-of-line
// 'concrete' instance) will contain a pointer back to this abstract
// DIE (as a space-saving measure, so that name/type etc doesn't have
// to be repeated for each inlined copy).
func PutAbstractFunc(ctxt Context, s *FnState) error {}

// Emit DWARF attributes and child DIEs for an inlined subroutine. The
// first attribute of an inlined subroutine DIE is a reference back to
// its corresponding 'abstract' DIE (containing location-independent
// attributes such as name, type, etc). Inlined subroutine DIEs can
// have other inlined subroutine DIEs as children.
func putInlinedFunc(ctxt Context, s *FnState, callIdx int) error {}

// Emit DWARF attributes and child DIEs for a 'concrete' subprogram,
// meaning the out-of-line copy of a function that was inlined at some
// point during the compilation of its containing package. The first
// attribute for a concrete DIE is a reference to the 'abstract' DIE
// for the function (which holds location-independent attributes such
// as name, type), then the remainder of the attributes are specific
// to this instance (location, frame base, etc).
func PutConcreteFunc(ctxt Context, s *FnState, isWrapper bool) error {}

// Emit DWARF attributes and child DIEs for a subprogram. Here
// 'default' implies that the function in question was not inlined
// when its containing package was compiled (hence there is no need to
// emit an abstract version for it to use as a base for inlined
// routine records).
func PutDefaultFunc(ctxt Context, s *FnState, isWrapper bool) error {}

// putparamtypes writes typedef DIEs for any parametric types that are used by this function.
func putparamtypes(ctxt Context, s *FnState, scopes []Scope, fnabbrev int) []int64 {}

func putscope(ctxt Context, s *FnState, scopes []Scope, curscope int32, fnabbrev int, encbuf []byte) int32 {}

func concreteVar(fnabbrev int, v *Var) bool {}

// Emit DWARF attributes for a variable belonging to an 'abstract' subprogram.
func putAbstractVar(ctxt Context, info Sym, v *Var) {}

func putvar(ctxt Context, s *FnState, v *Var, absfn Sym, fnabbrev, inlIndex int, encbuf []byte) {}

// byChildIndexCmp compares two *dwarf.Var by child index.
func byChildIndexCmp(a, b *Var) int {}

// IsDWARFEnabledOnAIXLd returns true if DWARF is possible on the
// current extld.
// AIX ld doesn't support DWARF with -bnoobjreorder with version
// prior to 7.2.2.
func IsDWARFEnabledOnAIXLd(extld []string) (bool, error) {}