[RFA] massively speed up "info var foo" on large programs

Matt Rice ratmice@gmail.com
Fri May 25 10:04:00 GMT 2012


On Fri, May 25, 2012 at 1:21 AM, Doug Evans <dje@google.com> wrote:

> It scans separate debug files.
>
>+  if (objfile->separate_debug_objfile_backlink)
>+    main_objfile = objfile->separate_debug_objfile_backlink;
>+  else
>+    main_objfile = objfile;

I'm wondering if this is OK/necessary from objfiles.h:

Note that separate debug object are in the main chain and therefore
will be visited by ALL_OBJFILES & co iterators.

>       ALL_MSYMBOLS (objfile, msymbol)
>       {
>         QUIT;
>
>+	if (msymbol->created_by_gdb)
>+	  continue;
>+

so shouldn't ALL_MSYMBOLS (which calls ALL_OBJFILES) cover it,
and the separate debuginfo code above potentially cause symbols in
separate debuginfo objfiles to be listed twice?



More information about the Gdb-patches mailing list