Lines Matching refs:fp

79 ctf_lookup_by_name(ctf_file_t *fp, const char *name)
90 return (ctf_set_errno(fp, EINVAL));
104 * Find a pointer to type by looking in fp->ctf_ptrtab.
112 ntype = fp->ctf_ptrtab[CTF_TYPE_TO_INDEX(type)];
114 ntype = ctf_type_resolve(fp, type);
115 if (ntype == CTF_ERR || (ntype = fp->ctf_ptrtab[
117 (void) ctf_set_errno(fp, ECTF_NOTYPE);
123 (fp->ctf_flags & LCTF_CHILD));
132 for (lp = fp->ctf_lookups; lp->ctl_prefix != NULL; lp++) {
144 if ((hp = ctf_hash_lookup(lp->ctl_hash, fp, p,
146 (void) ctf_set_errno(fp, ECTF_NOTYPE);
156 (void) ctf_set_errno(fp, ECTF_NOTYPE);
162 return (ctf_set_errno(fp, ECTF_SYNTAX));
167 if (fp->ctf_parent != NULL &&
168 (ptype = ctf_lookup_by_name(fp->ctf_parent, name)) != CTF_ERR)
179 ctf_lookup_by_symbol(ctf_file_t *fp, ulong_t symidx)
181 const ctf_sect_t *sp = &fp->ctf_symtab;
185 return (ctf_set_errno(fp, ECTF_NOSYMTAB));
187 if (symidx >= fp->ctf_nsyms)
188 return (ctf_set_errno(fp, EINVAL));
193 return (ctf_set_errno(fp, ECTF_NOTDATA));
197 return (ctf_set_errno(fp, ECTF_NOTDATA));
200 if (fp->ctf_sxlate[symidx] == -1u)
201 return (ctf_set_errno(fp, ECTF_NOTYPEDAT));
203 type = *(ushort_t *)((uintptr_t)fp->ctf_buf + fp->ctf_sxlate[symidx]);
205 return (ctf_set_errno(fp, ECTF_NOTYPEDAT));
218 ctf_file_t *fp = *fpp; /* caller passes in starting CTF container */
220 if ((fp->ctf_flags & LCTF_CHILD) && CTF_TYPE_ISPARENT(type) &&
221 (fp = fp->ctf_parent) == NULL) {
227 if (type > 0 && type <= fp->ctf_typemax) {
228 *fpp = fp; /* function returns ending CTF container */
229 return (LCTF_INDEX_TO_TYPEPTR(fp, type));
232 (void) ctf_set_errno(fp, ECTF_BADID);
241 ctf_func_info(ctf_file_t *fp, ulong_t symidx, ctf_funcinfo_t *fip)
243 const ctf_sect_t *sp = &fp->ctf_symtab;
248 return (ctf_set_errno(fp, ECTF_NOSYMTAB));
250 if (symidx >= fp->ctf_nsyms)
251 return (ctf_set_errno(fp, EINVAL));
256 return (ctf_set_errno(fp, ECTF_NOTFUNC));
260 return (ctf_set_errno(fp, ECTF_NOTFUNC));
263 if (fp->ctf_sxlate[symidx] == -1u)
264 return (ctf_set_errno(fp, ECTF_NOFUNCDAT));
266 dp = (ushort_t *)((uintptr_t)fp->ctf_buf + fp->ctf_sxlate[symidx]);
269 kind = LCTF_INFO_KIND(fp, info);
270 n = LCTF_INFO_VLEN(fp, info);
273 return (ctf_set_errno(fp, ECTF_NOFUNCDAT));
276 return (ctf_set_errno(fp, ECTF_CORRUPT));
295 ctf_func_args(ctf_file_t *fp, ulong_t symidx, uint_t argc, ctf_id_t *argv)
300 if (ctf_func_info(fp, symidx, &f) == CTF_ERR)
307 dp = (ushort_t *)((uintptr_t)fp->ctf_buf + fp->ctf_sxlate[symidx]) + 2;