[PATCH] Add a trie to map quickly from address range to compilation unit.
Steinar H. Gunderson
sesse@google.com
Wed Mar 23 22:24:20 GMT 2022
On Wed, Mar 23, 2022 at 02:14:31PM +0000, Nick Clifton wrote:
> This patch appears to introduce some new failures into the various testsuites.
I found the issue; I had swapped the linenumber_ptr and
discriminator_ptr in the two calls to
comp_unit_find_nearest_narrowest_line(). Fixing that makes the test
suite pass.
But I noticed something else that's probably not good in the existing
code; the “found” variable leaks out of the loop from the last iteration
(only). So if you find a match without a line number of the
second-to-last compilation unit but not in the last, found = false on
return, but if you find a similar match in the last compilation unit,
found = true.
I suppose this isn't intentional, but what is the intention? Should
there be a “found = false;” before the test on *linenumber_ptr?
/* Steinar */
More information about the Binutils
mailing list