An ObjFile is a single object file: a shared library or executable.
| 130 | |
| 131 | // An ObjFile is a single object file: a shared library or executable. |
| 132 | type 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. |
| 161 | type Frame struct { |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…