dwarves: check if the current pos is NULL in cu__for_each_function

To match cu__for_each_type handling of entries set with
cu__table_nullify_type_entry.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2009-03-06 11:02:16 -03:00
parent fa82c1b623
commit 7cf49c14e7
1 changed files with 2 additions and 1 deletions

View File

@ -60,7 +60,8 @@ struct ptr_table {
for (id = 0, pos = tag__function(cu->tags_table.entries[id]); \
id < cu->tags_table.nr_entries; \
pos = tag__function(cu->tags_table.entries[++id])) \
if (pos->proto.tag.tag != DW_TAG_subprogram) \
if (pos == NULL || \
pos->proto.tag.tag != DW_TAG_subprogram) \
continue; \
else