This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Speed up find_pc_section
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: ppluzhnikov at google dot com (Paul Pluzhnikov)
- Cc: Ulrich dot Weigand at de dot ibm dot com (Ulrich Weigand), gdb-patches at sourceware dot org (gdb-patches ml), tromey at redhat dot com (Tom Tromey)
- Date: Thu, 20 Aug 2009 20:22:01 +0200 (CEST)
- Subject: Re: [patch] Speed up find_pc_section
Paul Pluzhnikov wrote:
> Could you please test attached patch?
>
> I believe it is correct to simply not insert any overlay sections into
> the section map. Tested on Linux/x86_64 with no new failures.
Unfortunately, this doesn't help. First of all "section_is_mapped"
depends on the target's current overlay state, which changes all the
time as overlays get swapped in and out. If your section map were
to depend on section_is_mapped, it would have to be re-generated
every time the overlay state changes.
If you want to remove *all* overlay sections, mapped or not, you
could attempt to use "section_is_overlay" instead. But that won't
work either -- all the overlay routines have a shortcut that says
"no" to all such questions before the user actually enabled overlay
support. This means that when loading a binary with overlays,
you still crash at the assertion before the user even has the
chance to give the "overlay auto" command.
It used to be the case that you could debug -to some extent- binaries
with overlays even in "overlay off" mode, e.g. because GDB does not
support the particular overlay manager. I think this should be preserved;
at least GDB should not run into assertion failures just because section
addresses overlap ...
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com