MCPcopy Index your code
hub / github.com/google/pprof / ObjFile

Interface ObjFile

internal/plugin/plugin.go:132–158  ·  view source on GitHub ↗

An ObjFile is a single object file: a shared library or executable.

Source from the content-addressed store, hash-verified

130
131// An ObjFile is a single object file: a shared library or executable.
132type ObjFile interface {
133 // Name returns the underlyinf file name, if available
134 Name() string
135
136 // ObjAddr returns the objdump (linker) address corresponding to a runtime
137 // address, and an error.
138 ObjAddr(addr uint64) (uint64, error)
139
140 // BuildID returns the GNU build ID of the file, or an empty string.
141 BuildID() string
142
143 // SourceLine reports the source line information for a given
144 // address in the file. Due to inlining, the source line information
145 // is in general a list of positions representing a call stack,
146 // with the leaf function first.
147 SourceLine(addr uint64) ([]Frame, error)
148
149 // Symbols returns a list of symbols in the object file.
150 // If r is not nil, Symbols restricts the list to symbols
151 // with names matching the regular expression.
152 // If addr is not zero, Symbols restricts the list to symbols
153 // containing that address.
154 Symbols(r *regexp.Regexp, addr uint64) ([]*Sym, error)
155
156 // Close closes the file, releasing associated resources.
157 Close() error
158}
159
160// A Frame describes a location in a single line in a source file.
161type Frame struct {

Callers

nothing calls this directly

Implementers 6

fileinternal/binutils/binutils.go
testFileinternal/driver/fetch_test.go
fakeObjinternal/driver/webui_test.go
mockFileinternal/driver/driver_test.go
mockObjFileinternal/symbolizer/symbolizer_test.go
fakeObjbrowsertests/testutils.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…