Lines Matching refs:line
76 static char *srcline_from_fileline(const char *file, unsigned int line)
86 if (asprintf(&srcline, "%s:%u", file, line) < 0)
148 unsigned line;
237 &a2l->line);
296 srcline = srcline_from_fileline(a2l->filename, a2l->line);
302 char **file, unsigned int *line, struct dso *dso,
335 &a2l->funcname, &a2l->line) &&
355 if (line)
356 *line = a2l->line;
517 char *line = NULL;
532 * Read the first line. Without an error this will be:
533 * - for the first line an address like 0x1234,
536 * - the function name line for an inlined function.
538 if (io__getline(io, &line, &line_len) < 0 || !line_len)
541 pr_debug("%s %s: addr2line read address for sentinel: %s", __func__, dso_name, line);
542 if (style == LLVM && line_len == 2 && line[0] == ',') {
544 zfree(&line);
554 if (line_len >= 2 || line[0] != '0' || line[1] != 'x') {
556 if (line[i] == '0')
558 else if (line[i] != '\n')
572 zfree(&line);
583 /* Read the second function name line (if inline data then this is the first line). */
584 if (first && (io__getline(io, &line, &line_len) < 0 || !line_len))
587 pr_debug("%s %s: addr2line read line: %s", __func__, dso_name, line);
589 *function = strdup(strim(line));
591 zfree(&line);
594 /* Read the third filename and line number line. */
595 if (io__getline(io, &line, &line_len) < 0 || !line_len)
598 pr_debug("%s %s: addr2line filename:number : %s", __func__, dso_name, line);
599 if (filename_split(line, line_nr == NULL ? &dummy_line_nr : line_nr) == 0 &&
606 *filename = strdup(line);
608 zfree(&line);
614 free(line);
822 unsigned line = 0;
833 if (!addr2line(dso_name, addr, &file, &line, dso,
837 srcline = srcline_from_fileline(file, line);
866 /* Returns filename and fills in line number in line */
867 char *get_srcline_split(struct dso *dso, u64 addr, unsigned *line)
879 if (!addr2line(dso_name, addr, &file, line, dso, true, NULL, NULL))