Re: [patch] Speed up find_pc_section

Joel Brobecker
2009-09-10T18:30:11Z

> I was wrong (I don't even understand now why I thought that) -- they don't
> and this patch doesn't fix MacOS. A separate patch, something like
> http://sourceware.org/ml/gdb-patches/2009-08/msg00195.html
> is needed.

Clever approach, I like it. Are you setup to test this change
on MacOS by any chance, now? Otherwise, since MacOS is completely
broken, verifying that it helps with any program should be sufficient.
In any case, we need to test this patch in a non-MacOS target as well,
to test the opposite situation, just in case.

Would you mind doing that? If it simplifies things for you, you may
check-in the two other pending patches that I reviewed, even if I said
to wait for Friday. If there is any objection or issue, it's easy enough
to revert or fix.

> I am not sure calling complaint rather than warning is really the right
> thing here: complaints are silent unless the user explicitly turns them on,
> and overlapping sections indicate a real problem of some sort.

I still think we should use a complaint in this case. This is still
similar to what we do in dwarf2read - we detected a problem with
the debugging info, and we emit a complaint. The idea is that,
we don't know how many times we're going to encounter that problem,
and flooding the user with the same message over something that he
probably has little control over is counter productive.

> 2009-09-10 Paul Pluzhnikov <ppluzhnikov@google.com>
>
> * objfiles.c (qsort_cmp): Remove asserts.
> (insert_section_p, filter_debuginfo_sections): New function.
> (filter_overlapping_sections): Likewise.
> (update_section_map): Adjust.

That being said, it's not a very strong opinion, and if you really
prefer a warning, please go ahead with this version of the patch.
You're fixing the issue on MacOS anyway, so it's making this discussion
less important.

--
Joel