Lines Matching refs:state
509 read_address (struct read_address_state *state, Dwarf_Addr *addr)
511 if ((state->n = getline (&state->line, &state->linesz, state->f)) < 1 ||
512 state->line[state->n - 2] == ']')
514 *addr = strtoull (state->line, &state->p, 16);
515 state->p += strspn (state->p, " \t");
516 state->type = strsep (&state->p, " \t\n");
517 if (state->type == NULL)
519 return state->p != NULL && state->p != state->line;
527 struct read_address_state state = { NULL, NULL, 0, 0, NULL, NULL };
531 state.f = fopen (KSYMSFILE, "r");
532 if (state.f == NULL)
535 (void) __fsetlocking (state.f, FSETLOCKING_BYCALLER);
539 result = read_address (&state, start) ? 0 : -1;
540 while (result == 0 && strchr ("TtRr", *state.type) == NULL);
546 while (read_address (&state, &addr) && addr >= *end)
549 if (*notes == 0 && !strcmp (state.p, "__start_notes\n"))
560 free (state.line);
563 result = ferror_unlocked (state.f) ? errno : ENOEXEC;
565 fclose (state.f);