Re: Two observations using GDB 13 snapshot

Tom Tromey
2022-12-28T16:37:16Z

Eli> And one more thing: this is a native 32-bit Windows build of GDB, so
Eli> it has DWARF2 info in PE-COFF file, not in ELF. Maybe this could
Eli> explain the difference? Or maybe the C++ code is a factor?

The object file format shouldn't make a difference. The DWARF code just
reads the appropriate sections (this code hasn't changed since GDB 12)
and the actual parsing is independent of the object file format.

C++ being used in the executable would possibly explain the difference
between reading GDB and reading Emacs, but I don't think it could
explain the performance difference between GDB 12 and 13 reading the
same executable.

I don't have a theory for what could be wrong. Maybe profiling is the
best way. It might also be interesting to verify that the
parallel_for_each in gdb/dwarf2/read.c is the culprit; that can be done
by setting breakpoints before and after it and measuring the time it
takes to "cont" from one to the other. The idea of this is that if the
new reader is the source of the problem, it would show up here.

Tom