struct stab_find_info *info;
bfd_size_type stabsize, strsize;
bfd_byte *stab, *str;
- bfd_byte *last_stab = NULL;
+ bfd_byte *last_stab, *last_str;
bfd_size_type stroff;
struct indexentry *indexentry;
char *file_name;
file_name = NULL;
directory_name = NULL;
saw_fun = 1;
+ stroff = 0;
- for (i = 0, stroff = 0, stab = info->stabs, str = info->strs;
+ for (i = 0, last_stab = stab = info->stabs, last_str = str = info->strs;
i < info->indextablesize && stab < info->stabs + stabsize;
stab += STABSIZE)
{
{
info->indextable[i].val = bfd_get_32 (abfd, last_stab + VALOFF);
info->indextable[i].stab = last_stab;
- info->indextable[i].str = str;
+ info->indextable[i].str = last_str;
info->indextable[i].directory_name = directory_name;
info->indextable[i].file_name = file_name;
info->indextable[i].function_name = NULL;
else
{
last_stab = stab;
+ last_str = str;
if (stab + STABSIZE >= info->stabs + stabsize
|| *(stab + STABSIZE + TYPEOFF) != (bfd_byte) N_SO)
{
{
info->indextable[i].val = bfd_get_32 (abfd, last_stab + VALOFF);
info->indextable[i].stab = last_stab;
- info->indextable[i].str = str;
+ info->indextable[i].str = last_str;
info->indextable[i].directory_name = directory_name;
info->indextable[i].file_name = file_name;
info->indextable[i].function_name = NULL;