Unit test name-component bounds searching directly
authorPedro Alves <palves@redhat.com>
Tue, 21 Nov 2017 00:02:46 +0000 (00:02 +0000)
committerPedro Alves <palves@redhat.com>
Tue, 21 Nov 2017 00:03:10 +0000 (00:03 +0000)
commit5c58de74c9acb346513c974fcdede270be2a77c3
treec26d52b8c6d9e6228b7c391a2f33520a36baba33
parente1ef7d7a5166f846b14bea5a77acb0dec76661a8
Unit test name-component bounds searching directly

This commit factors out the name-components-vector building and bounds
searching out of dw2_expand_symtabs_matching_symbol into separate
functions, and adds unit tests that:

 - expose both the latent bug mentioned in the previous commit, and
   also,

 - for completeness exercise the 0xff character handling fixed in the
   previous commit more directly.

The actual fix for the now-exposed bug is left for the following
patch.

gdb/ChangeLog:
2017-11-21  Pedro Alves  <palves@redhat.com>

* dwarf2read.c (mapped_index::name_components_casing): New field.
(mapped_index) <build_name_components,
find_name_components_bounds): Declare new methods.
(mapped_index::find_name_components_bounds)
(mapped_index::build_name_components): New methods, factored out
from dw2_expand_symtabs_matching_symbol.
(check_find_bounds_finds)
(test_mapped_index_find_name_component_bounds): New.
(run_test): Rename to ...
(test_dw2_expand_symtabs_matching_symbol): ... this.
(run_test): Reimplement.
gdb/ChangeLog
gdb/dwarf2read.c
This page took 0.026074 seconds and 4 git commands to generate.