Lines Matching refs:g_fp
85 static ctf_file_t *g_fp; variable
193 if (ctf_object_iter(g_fp, ctfdump_objects_cb, NULL) == CTF_ERR) { in ctfdump_objects()
195 ctf_errmsg(ctf_errno(g_fp))); in ctfdump_objects()
221 if (ctf_func_args(g_fp, symidx, g_nfargc, g_fargc) == CTF_ERR) in ctfdump_functions_cb()
223 "%s: %s\n", name, ctf_errmsg(ctf_errno(g_fp))); in ctfdump_functions_cb()
249 if (ctf_function_iter(g_fp, ctfdump_functions_cb, NULL) == CTF_ERR) { in ctfdump_functions()
251 ctf_errmsg(ctf_errno(g_fp))); in ctfdump_functions()
263 ctf_dataptr(g_fp, (const void **)&hp, NULL); in ctfdump_header()
269 ctf_flags(g_fp)); in ctfdump_header()
270 parname = ctf_parent_name(g_fp); in ctfdump_header()
271 parlabel = ctf_parent_label(g_fp); in ctfdump_header()
302 if (ctf_label_iter(g_fp, ctfdump_labels_cb, NULL) == CTF_ERR) { in ctfdump_labels()
304 ctf_errmsg(ctf_errno(g_fp))); in ctfdump_labels()
329 if (ctf_string_iter(g_fp, ctfdump_strings_cb, &stroff) == CTF_ERR) { in ctfdump_strings()
331 ctf_errmsg(ctf_errno(g_fp))); in ctfdump_strings()
526 if ((kind = ctf_type_kind(g_fp, id)) == CTF_ERR) in ctfdump_types_cb()
528 "have a kind: %s\n", name, ctf_errmsg(ctf_errno(g_fp))); in ctfdump_types_cb()
530 if (ctf_type_name(g_fp, id, name, sizeof (name)) == NULL) { in ctfdump_types_cb()
531 if (ctf_errno(g_fp) != ECTF_NOPARENT) in ctfdump_types_cb()
533 ctf_errmsg(ctf_errno(g_fp))); in ctfdump_types_cb()
535 ctf_kind_name(g_fp, kind)); in ctfdump_types_cb()
548 if (ctf_type_encoding(g_fp, id, &cte) == CTF_ERR) in ctfdump_types_cb()
550 "for %s: %s\n", name, ctf_errmsg(ctf_errno(g_fp))); in ctfdump_types_cb()
557 if (ctf_type_encoding(g_fp, id, &cte) == CTF_ERR) in ctfdump_types_cb()
559 "for %s: %s\n", name, ctf_errmsg(ctf_errno(g_fp))); in ctfdump_types_cb()
568 if ((ref = ctf_type_reference(g_fp, id)) == CTF_ERR) in ctfdump_types_cb()
570 "%s\n", name, ctf_errmsg(ctf_errno(g_fp))); in ctfdump_types_cb()
575 if (ctf_array_info(g_fp, id, &ar) == CTF_ERR) in ctfdump_types_cb()
577 "%s: %s\n", name, ctf_errmsg(ctf_errno(g_fp))); in ctfdump_types_cb()
582 if (ctf_func_info_by_id(g_fp, id, &ctc) == CTF_ERR) in ctfdump_types_cb()
584 "%s\n", name, ctf_errmsg(ctf_errno(g_fp))); in ctfdump_types_cb()
587 if (ctf_func_args_by_id(g_fp, id, g_nfargc, g_fargc) == in ctfdump_types_cb()
591 ctf_errmsg(ctf_errno(g_fp))); in ctfdump_types_cb()
606 size = ctf_type_size(g_fp, id); in ctfdump_types_cb()
609 ctf_errmsg(ctf_errno(g_fp))); in ctfdump_types_cb()
615 if (ctf_member_iter(g_fp, id, ctfdump_member_cb, &count) != 0) in ctfdump_types_cb()
617 name, ctf_errmsg(ctf_errno(g_fp))); in ctfdump_types_cb()
631 size = ctf_type_size(g_fp, id); in ctfdump_types_cb()
642 if (ctf_enum_iter(g_fp, id, ctfdump_enum_cb, &count) != 0) in ctfdump_types_cb()
644 "%s\n", name, ctf_errmsg(ctf_errno(g_fp))); in ctfdump_types_cb()
652 if ((ref = ctf_type_reference(g_fp, id)) == CTF_ERR) in ctfdump_types_cb()
654 "%s\n", name, ctf_errmsg(ctf_errno(g_fp))); in ctfdump_types_cb()
659 if ((ref = ctf_type_reference(g_fp, id)) == CTF_ERR) in ctfdump_types_cb()
661 "%s\n", name, ctf_errmsg(ctf_errno(g_fp))); in ctfdump_types_cb()
666 if ((ref = ctf_type_reference(g_fp, id)) == CTF_ERR) in ctfdump_types_cb()
668 "%s\n", name, ctf_errmsg(ctf_errno(g_fp))); in ctfdump_types_cb()
673 if ((ref = ctf_type_reference(g_fp, id)) == CTF_ERR) in ctfdump_types_cb()
675 "%s\n", name, ctf_errmsg(ctf_errno(g_fp))); in ctfdump_types_cb()
694 if (ctf_type_iter(g_fp, B_TRUE, ctfdump_types_cb, NULL) == CTF_ERR) { in ctfdump_types()
696 ctf_errmsg(ctf_errno(g_fp))); in ctfdump_types()
717 if ((ref = ctf_type_reference(g_fp, id)) == CTF_ERR) { in ctfsrc_refname()
719 "%s\n", id, ctf_errmsg(ctf_errno(g_fp))); in ctfsrc_refname()
722 return (ctf_type_name(g_fp, ref, buf, bufsize)); in ctfsrc_refname()
731 if (ctf_type_cname(g_fp, type, name, sizeof (name), member) == NULL) { in ctfsrc_member_cb()
732 if (ctf_errno(g_fp) != ECTF_NOPARENT) { in ctfsrc_member_cb()
734 ctf_errmsg(ctf_errno(g_fp))); in ctfsrc_member_cb()
766 (void) ctf_type_name(g_fp, id, idnames[id].ci_name, in ctfsrc_collect_types_cb()
780 if ((kind = ctf_type_kind(g_fp, id)) == CTF_ERR) { in ctfsrc_type()
782 "have a kind: %s\n", name, ctf_errmsg(ctf_errno(g_fp))); in ctfsrc_type()
795 if ((size = ctf_type_size(g_fp, id)) == CTF_ERR) { in ctfsrc_type()
797 ctf_errmsg(ctf_errno(g_fp))); in ctfsrc_type()
802 if (ctf_member_iter(g_fp, id, ctfsrc_member_cb, NULL) != 0) { in ctfsrc_type()
804 name, ctf_errmsg(ctf_errno(g_fp))); in ctfsrc_type()
819 if (ctf_enum_iter(g_fp, id, ctfsrc_enum_cb, NULL) != 0) { in ctfsrc_type()
821 "%s\n", name, ctf_errmsg(ctf_errno(g_fp))); in ctfsrc_type()
824 size = ctf_type_size(g_fp, id); in ctfsrc_type()
844 (void) ctf_type_cname(g_fp, in ctfsrc_type()
845 ctf_type_reference(g_fp, id), refname, in ctfsrc_type()
852 ref = ctf_type_reference(g_fp, id); in ctfsrc_type()
854 if (ctf_type_kind(g_fp, ref) == CTF_K_ENUM) { in ctfsrc_type()
857 if (ctf_enum_iter(g_fp, ref, in ctfsrc_type()
861 ctf_errmsg(ctf_errno(g_fp))); in ctfsrc_type()
866 if ((size = ctf_type_size(g_fp, ref)) == CTF_ERR) { in ctfsrc_type()
868 refname, ctf_errmsg(ctf_errno(g_fp))); in ctfsrc_type()
874 if (ctf_member_iter(g_fp, ref, in ctfsrc_type()
878 ctf_errmsg(ctf_errno(g_fp))); in ctfsrc_type()
928 if (ctf_type_cname(g_fp, id, tname, sizeof (tname), name) == NULL) { in ctfsrc_object()
929 if (ctf_errno(g_fp) != ECTF_NOPARENT) { in ctfsrc_object()
931 ctf_errmsg(ctf_errno(g_fp))); in ctfsrc_object()
960 (void) ctf_type_name(g_fp, cfi->ctc_return, name, sizeof (name)); in ctfsrc_function()
966 if (ctf_func_args(g_fp, idn->ci_symidx, in ctfsrc_function()
970 ctf_errmsg(ctf_errno(g_fp))); in ctfsrc_function()
978 (void) ctf_type_name(g_fp, aid, name, sizeof (name)); in ctfsrc_function()
1018 (void) ctf_type_name(g_fp, l->ci_funcinfo.ctc_return, lname, in idname_compare()
1020 (void) ctf_type_name(g_fp, r->ci_funcinfo.ctc_return, rname, in idname_compare()
1040 if (ctf_func_args(g_fp, l->ci_symidx, arity, largs) == CTF_ERR) { in idname_compare()
1045 ctf_errmsg(ctf_errno(g_fp))); in idname_compare()
1048 if (ctf_func_args(g_fp, r->ci_symidx, arity, rargs) == CTF_ERR) { in idname_compare()
1053 ctf_errmsg(ctf_errno(g_fp))); in idname_compare()
1058 (void) ctf_type_name(g_fp, largs[i], lname, sizeof (lname)); in idname_compare()
1061 (void) ctf_type_name(g_fp, rargs[i], rname, sizeof (rname)); in idname_compare()
1078 ulong_t nr_syms = ctf_nr_syms(g_fp); in ctfdump_source()
1079 ctf_id_t max_id = ctf_max_id(g_fp); in ctfdump_source()
1098 if (ctf_type_iter(g_fp, B_TRUE, ctfsrc_collect_types_cb, in ctfdump_source()
1101 ctf_errmsg(ctf_errno(g_fp))); in ctfdump_source()
1121 if (ctf_object_iter(g_fp, ctfsrc_collect_objects_cb, in ctfdump_source()
1124 ctf_errmsg(ctf_errno(g_fp))); in ctfdump_source()
1144 if (ctf_function_iter(g_fp, ctfsrc_collect_functions_cb, in ctfdump_source()
1147 ctf_errmsg(ctf_errno(g_fp))); in ctfdump_source()
1166 ctf_dataptr(g_fp, &data, &len); in ctfdump_output()
1266 g_fp = ctf_fdopen(fd, &err); in main()
1267 if (g_fp == NULL) in main()
1278 if (ctf_parent_name(g_fp) == NULL) { in main()
1296 explabel = ctf_parent_label(g_fp); in main()
1309 if (ctf_import(g_fp, pfp) != 0) in main()
1311 parent, ctf_errmsg(ctf_errno(g_fp))); in main()
1316 ctf_parent_name(g_fp)); in main()
1320 ctf_parent_name(g_fp)); in main()