Re: [PATCH] perf probe: read DWARF files from the correct CU
From: Arnaldo Carvalho de Melo
Date: Tue Jul 11 2023 - 10:42:06 EST
Em Tue, Jul 11, 2023 at 10:20:00PM +0900, Masami Hiramatsu escreveu:
> On Tue, 11 Jul 2023 09:57:45 -0300 Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> wrote:
> > Em Thu, Jun 15, 2023 at 10:01:37PM +0200, Georg Müller escreveu:
> > > The problem is that die_get_decl_file() uses the wrong CU to search for
> > > the file. elfutils commit e1db5cdc9f has some good explanation for this:
> > >
> > > dwarf_decl_file uses dwarf_attr_integrate to get the DW_AT_decl_file
> > > attribute. This means the attribute might come from a different DIE
> > > in a different CU. If so, we need to use the CU associated with the
> > > attribute, not the original DIE, to resolve the file name.
> > >
> > > This patch uses the same source of information as elfutils: use attribute
> > > DW_AT_decl_file and use this CU to search for the file.
> >
> > Thanks, applied to the perf-tools branch, that will be submitted for
> > Linux v6.5.
> Thanks Arnaldo and Georg,
> It sounds perfect reason why that happened. I didn't expect the case that
> the attribute comes from another CU...
> Acked-by: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
Thanks, added it to the cset.
- Arnaldo