• Home
  • Raw
  • Download

Lines Matching refs:a2l

158 static int slurp_symtab(bfd *abfd, struct a2l_data *a2l)  in slurp_symtab()  argument
187 a2l->syms = syms; in slurp_symtab()
195 struct a2l_data *a2l = data; in find_address_in_section() local
198 if (a2l->found) in find_address_in_section()
209 pc = a2l->addr; in find_address_in_section()
224 a2l->found = bfd_find_nearest_line(abfd, section, a2l->syms, pc - vma, in find_address_in_section()
225 &a2l->filename, &a2l->funcname, in find_address_in_section()
226 &a2l->line); in find_address_in_section()
228 if (a2l->filename && !strlen(a2l->filename)) in find_address_in_section()
229 a2l->filename = NULL; in find_address_in_section()
235 struct a2l_data *a2l = NULL; in addr2line_init() local
244 a2l = zalloc(sizeof(*a2l)); in addr2line_init()
245 if (a2l == NULL) in addr2line_init()
248 a2l->abfd = abfd; in addr2line_init()
249 a2l->input = strdup(path); in addr2line_init()
250 if (a2l->input == NULL) in addr2line_init()
253 if (slurp_symtab(abfd, a2l)) in addr2line_init()
256 return a2l; in addr2line_init()
259 if (a2l) { in addr2line_init()
260 zfree((char **)&a2l->input); in addr2line_init()
261 free(a2l); in addr2line_init()
267 static void addr2line_cleanup(struct a2l_data *a2l) in addr2line_cleanup() argument
269 if (a2l->abfd) in addr2line_cleanup()
270 bfd_close(a2l->abfd); in addr2line_cleanup()
271 zfree((char **)&a2l->input); in addr2line_cleanup()
272 zfree(&a2l->syms); in addr2line_cleanup()
273 free(a2l); in addr2line_cleanup()
282 struct a2l_data *a2l = dso->a2l; in inline_list__append_dso_a2l() local
283 struct symbol *inline_sym = new_inline_sym(dso, sym, a2l->funcname); in inline_list__append_dso_a2l()
286 if (a2l->filename) in inline_list__append_dso_a2l()
287 srcline = srcline_from_fileline(a2l->filename, a2l->line); in inline_list__append_dso_a2l()
298 struct a2l_data *a2l = dso->a2l; in addr2line() local
300 if (!a2l) { in addr2line()
301 dso->a2l = addr2line_init(dso_name); in addr2line()
302 a2l = dso->a2l; in addr2line()
305 if (a2l == NULL) { in addr2line()
311 a2l->addr = addr; in addr2line()
312 a2l->found = false; in addr2line()
314 bfd_map_over_sections(a2l->abfd, find_address_in_section, a2l); in addr2line()
316 if (!a2l->found) in addr2line()
325 while (bfd_find_inliner_info(a2l->abfd, &a2l->filename, in addr2line()
326 &a2l->funcname, &a2l->line) && in addr2line()
329 if (a2l->filename && !strlen(a2l->filename)) in addr2line()
330 a2l->filename = NULL; in addr2line()
342 *file = a2l->filename ? strdup(a2l->filename) : NULL; in addr2line()
347 *line = a2l->line; in addr2line()
354 struct a2l_data *a2l = dso->a2l; in dso__free_a2l() local
356 if (!a2l) in dso__free_a2l()
359 addr2line_cleanup(a2l); in dso__free_a2l()
361 dso->a2l = NULL; in dso__free_a2l()