Re: [patch] Speed up find_pc_section

Tom Tromey
2009-08-04T14:22:38Z

>>>>> "Paul" == Paul Pluzhnikov <ppluzhnikov@google.com> writes:

Hi Paul.

Paul> 2009-07-21 Paul Pluzhnikov <ppluzhnikov@google.com>
Paul> * objfiles.c (objfiles_updated_p): New variable.
Paul> (qsort_cmp, bsearch_cmp, update_section_map): New function.
Paul> (find_pc_section): Use bsearch.
Paul> (set_objfiles_updated_on_exe_change): New function.
Paul> (set_objfiles_updated_on_solib_activity): New function.
Paul> (_initialize_objfiles): New function.

Paul> +static int
Paul> +qsort_cmp (const void *a, const void *b)

[...]

Paul> + /* This can happen for separate debug-info files. */
Paul> + gdb_assert (obj_section_endaddr (sect1) == obj_section_endaddr (sect2));

I managed to trigger this assert yesterday.

I was debugging a gcj-compiled program on F11. I used the system gcj,
and I had the libgcj debuginfo installed. The libgcj separate debuginfo
had a section with the same start address but a different length as a
section in libgcj itself.

Would you mind looking at this and figuring out how to fix it? If you
need more information, I can provide it -- either details from debugging
or instructions on reproducing if you have F11 available.

Tom