// InlinedFuncToPCs is the same as FuncToPCs but works for inlined functions
// and returns all start addresses and end addresses of the various inlinings
// of the specified function.
InlinedFuncToPCs is the same as FuncToPCs but works for inlined functions
and returns all start addresses and end addresses of the various inlinings
of the specified function.
// InlinedFuncToPCs is the same as FuncToPCs but works for inlined functions // and returns all start addresses and end addresses of the various inlinings // of the specified function .
func (b *BinFile) InlinedFuncToPCs(name string) ([]InlinedFunc, error) {
	if b.inlined == nil {
		return []InlinedFunc{}, errors.New("no DWARF debugging data")
	}
	if addrs, ok := b.inlined[name]; ok {
		return addrs, nil
	}
	matches := make([]string, 0)
	for fn := range b.funcs {
		if strings.Contains(fn, name) {
			matches = append(matches, fn)
		}
	}
	if len(matches) == 1 {
		return b.inlined[matches[0]], nil
	}
	return []InlinedFunc{}, &ErrMultipleMatches{
		Matches: matches,
	}
}
func ( b * BinFile ) InlinedFuncToPCs ( name string ) ( [ ] InlinedFunc , error ) { if b . inlined == nil { return [ ] InlinedFunc { } , errors . New ( " " ) } if addrs , ok := b . inlined [ name ] ; ok { return addrs , nil } matches := make ( [ ] string , 0 ) for fn := range b . funcs { if strings . Contains ( fn , name ) { matches = append ( matches , fn ) } } if len ( matches ) == 1 { return b . inlined [ matches [ 0 ] ] , nil } return [ ] InlinedFunc { } , & ErrMultipleMatches { Matches : matches , } }
InlinedFuncToPCs is the same as FuncToPCs but works for inlined functions
and returns all start addresses and end addresses of the various inlinings
of the specified function.
InlinedFuncToPCs is the same as FuncToPCs but works for inlined functions and returns all start addresses and end addresses of the various inlinings of the specified function .