* dwarf2read.c (dw2_expand_symtabs_matching): Add missing
MAYBE_SWAPs. (dw2_map_symbol_names): Likewise.
This commit is contained in:
parent
2a7d6a257f
commit
4b5246aacb
|
@ -1,3 +1,9 @@
|
||||||
|
2010-09-24 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* dwarf2read.c (dw2_expand_symtabs_matching): Add missing
|
||||||
|
MAYBE_SWAPs.
|
||||||
|
(dw2_map_symbol_names): Likewise.
|
||||||
|
|
||||||
2010-09-24 Sami Wagiaalla <swagiaal@redhat.com>
|
2010-09-24 Sami Wagiaalla <swagiaal@redhat.com>
|
||||||
|
|
||||||
* valops.c (find_oload_champ_namespace_loop): replace incorrect
|
* valops.c (find_oload_champ_namespace_loop): replace incorrect
|
||||||
|
|
|
@ -2382,10 +2382,12 @@ dw2_expand_symtabs_matching (struct objfile *objfile,
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
offset_type iter;
|
offset_type iter;
|
||||||
|
struct mapped_index *index;
|
||||||
|
|
||||||
dw2_setup (objfile);
|
dw2_setup (objfile);
|
||||||
if (!dwarf2_per_objfile->index_table)
|
if (!dwarf2_per_objfile->index_table)
|
||||||
return;
|
return;
|
||||||
|
index = dwarf2_per_objfile->index_table;
|
||||||
|
|
||||||
for (i = 0; i < (dwarf2_per_objfile->n_comp_units
|
for (i = 0; i < (dwarf2_per_objfile->n_comp_units
|
||||||
+ dwarf2_per_objfile->n_type_comp_units); ++i)
|
+ dwarf2_per_objfile->n_type_comp_units); ++i)
|
||||||
|
@ -2411,28 +2413,24 @@ dw2_expand_symtabs_matching (struct objfile *objfile,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (iter = 0;
|
for (iter = 0; iter < index->index_table_slots; ++iter)
|
||||||
iter < dwarf2_per_objfile->index_table->index_table_slots;
|
|
||||||
++iter)
|
|
||||||
{
|
{
|
||||||
offset_type idx = 2 * iter;
|
offset_type idx = 2 * iter;
|
||||||
const char *name;
|
const char *name;
|
||||||
offset_type *vec, vec_len, vec_idx;
|
offset_type *vec, vec_len, vec_idx;
|
||||||
|
|
||||||
if (dwarf2_per_objfile->index_table->index_table[idx] == 0
|
if (index->index_table[idx] == 0 && index->index_table[idx + 1] == 0)
|
||||||
&& dwarf2_per_objfile->index_table->index_table[idx + 1] == 0)
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
name = (dwarf2_per_objfile->index_table->constant_pool
|
name = index->constant_pool + MAYBE_SWAP (index->index_table[idx]);
|
||||||
+ dwarf2_per_objfile->index_table->index_table[idx]);
|
|
||||||
|
|
||||||
if (! (*name_matcher) (name, data))
|
if (! (*name_matcher) (name, data))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* The name was matched, now expand corresponding CUs that were
|
/* The name was matched, now expand corresponding CUs that were
|
||||||
marked. */
|
marked. */
|
||||||
vec = (offset_type *) (dwarf2_per_objfile->index_table->constant_pool
|
vec = (offset_type *) (index->constant_pool
|
||||||
+ dwarf2_per_objfile->index_table->index_table[idx + 1]);
|
+ MAYBE_SWAP (index->index_table[idx + 1]));
|
||||||
vec_len = MAYBE_SWAP (vec[0]);
|
vec_len = MAYBE_SWAP (vec[0]);
|
||||||
for (vec_idx = 0; vec_idx < vec_len; ++vec_idx)
|
for (vec_idx = 0; vec_idx < vec_len; ++vec_idx)
|
||||||
{
|
{
|
||||||
|
@ -2476,25 +2474,24 @@ dw2_map_symbol_names (struct objfile *objfile,
|
||||||
void *data)
|
void *data)
|
||||||
{
|
{
|
||||||
offset_type iter;
|
offset_type iter;
|
||||||
|
struct mapped_index *index;
|
||||||
|
|
||||||
dw2_setup (objfile);
|
dw2_setup (objfile);
|
||||||
|
|
||||||
if (!dwarf2_per_objfile->index_table)
|
if (!dwarf2_per_objfile->index_table)
|
||||||
return;
|
return;
|
||||||
|
index = dwarf2_per_objfile->index_table;
|
||||||
|
|
||||||
for (iter = 0;
|
for (iter = 0; iter < index->index_table_slots; ++iter)
|
||||||
iter < dwarf2_per_objfile->index_table->index_table_slots;
|
|
||||||
++iter)
|
|
||||||
{
|
{
|
||||||
offset_type idx = 2 * iter;
|
offset_type idx = 2 * iter;
|
||||||
const char *name;
|
const char *name;
|
||||||
offset_type *vec, vec_len, vec_idx;
|
offset_type *vec, vec_len, vec_idx;
|
||||||
|
|
||||||
if (dwarf2_per_objfile->index_table->index_table[idx] == 0
|
if (index->index_table[idx] == 0 && index->index_table[idx + 1] == 0)
|
||||||
&& dwarf2_per_objfile->index_table->index_table[idx + 1] == 0)
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
name = (dwarf2_per_objfile->index_table->constant_pool
|
name = (index->constant_pool + MAYBE_SWAP (index->index_table[idx]));
|
||||||
+ dwarf2_per_objfile->index_table->index_table[idx]);
|
|
||||||
|
|
||||||
(*fun) (name, data);
|
(*fun) (name, data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue