MCPcopy Create free account
hub / github.com/google/pprof / ObjFile

Interface ObjFile

driver/driver.go:161–186  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

159
160// An ObjFile is a single object file: a shared library or executable.
161type ObjFile interface {
162 // Name returns the underlying file name, if available.
163 Name() string
164
165 // ObjAddr returns the objdump address corresponding to a runtime address.
166 ObjAddr(addr uint64) (uint64, error)
167
168 // BuildID returns the GNU build ID of the file, or an empty string.
169 BuildID() string
170
171 // SourceLine reports the source line information for a given
172 // address in the file. Due to inlining, the source line information
173 // is in general a list of positions representing a call stack,
174 // with the leaf function first.
175 SourceLine(addr uint64) ([]Frame, error)
176
177 // Symbols returns a list of symbols in the object file.
178 // If r is not nil, Symbols restricts the list to symbols
179 // with names matching the regular expression.
180 // If addr is not zero, Symbols restricts the list to symbols
181 // containing that address.
182 Symbols(r *regexp.Regexp, addr uint64) ([]*Sym, error)
183
184 // Close closes the file, releasing associated resources.
185 Close() error
186}
187
188// A Frame describes a single line in a source file.
189type Frame struct {

Callers 37

leaveTempfileFunction · 0.65
DiffFunction · 0.65
TestHTTPSInsecureFunction · 0.65
awayFromTTYFunction · 0.65
invokeVisualizerFunction · 0.65
TestNewTempFileFunction · 0.65
fetchProfilesFunction · 0.65
TestObjFileFunction · 0.65
TestPEFileFunction · 0.65
TestELFObjAddrFunction · 0.65
TestELFKernelOffsetFunction · 0.65

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…