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: uweigand at de dot ibm dot com (Ulrich Weigand)
- Cc: ppluzhnikov at google dot com (Paul Pluzhnikov), tromey at redhat dot com (Tom Tromey), gdb-patches at sourceware dot org (gdb-patches ml)
- Date: Mon, 17 Aug 2009 21:54:25 +0200 (CEST)
- Subject: Re: [patch] Speed up find_pc_section
I wrote:
> Paul Pluzhnikov wrote:
>
> > 2009-08-08 Paul Pluzhnikov <ppluzhnikov@google.com>
> >
> > * objfiles.c (qsort_cmp): Remove assert.
> > (preferred_obj_section): New function.
> > (update_section_map): Filter duplicates.
>
> This patch breaks overlay support:
This part also doesn't really work with overlay sections:
static int
qsort_cmp (const void *a, const void *b)
{
const struct obj_section *sect1 = *(const struct obj_section **) a;
const struct obj_section *sect2 = *(const struct obj_section **) b;
const CORE_ADDR sect1_addr = obj_section_addr (sect1);
const CORE_ADDR sect2_addr = obj_section_addr (sect2);
if (sect1_addr < sect2_addr)
{
gdb_assert (obj_section_endaddr (sect1) <= sect2_addr);
return -1;
}
else if (sect1_addr > sect2_addr)
{
gdb_assert (sect1_addr >= obj_section_endaddr (sect2));
return 1;
}
Section can partially overlap with overlays ...
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com