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

Function nextSymbol

internal/binutils/disasm.go:164–180  ·  view source on GitHub ↗

nextSymbol parses the nm output to find the next symbol listed. Skips over any output it cannot recognize.

(buf *bytes.Buffer)

Source from the content-addressed store, hash-verified

162// nextSymbol parses the nm output to find the next symbol listed.
163// Skips over any output it cannot recognize.
164func nextSymbol(buf *bytes.Buffer) (uint64, string, error) {
165 for {
166 line, err := buf.ReadString('\n')
167 if err != nil {
168 if err != io.EOF || line == "" {
169 return 0, "", err
170 }
171 }
172 line = strings.TrimSpace(line)
173
174 if fields := nmOutputRE.FindStringSubmatch(line); len(fields) == 4 {
175 if address, err := strconv.ParseUint(fields[1], 16, 64); err == nil {
176 return address, fields[3], nil
177 }
178 }
179 }
180}

Callers 1

findSymbolsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…