_CTF_ITEM (ECTF_RANGE, "allowable range exceeded") \
_CTF_ITEM (ECTF_BADNAME, "string name offset is corrupt") \
_CTF_ITEM (ECTF_BADID, "invalid type identifier") \
- _CTF_ITEM (ECTF_NOTSOU, "type is not a struct or union") \
- _CTF_ITEM (ECTF_NOTENUM, "type is not an enum") \
- _CTF_ITEM (ECTF_NOTSUE, "type is not a struct, union, or enum") \
- _CTF_ITEM (ECTF_NOTINTFP, "type is not an integer, float, or enum") \
- _CTF_ITEM (ECTF_NOTARRAY, "type is not an array") \
+ _CTF_ITEM (ECTF_WRONGKIND, "inappropriate type kind") \
_CTF_ITEM (ECTF_NOTREF, "type does not reference another type") \
- _CTF_ITEM (ECTF_NOTQUAL, "type is not a cvr-qual") \
_CTF_ITEM (ECTF_NAMELEN, "buffer is too small to hold type name") \
- _CTF_ITEM (ECTF_NOTYPE, "no type found corresponding to name") \
+ _CTF_ITEM (ECTF_NOTYPE, "no type found corresponding to name, type ID, or offset") \
_CTF_ITEM (ECTF_SYNTAX, "syntax error in type name") \
_CTF_ITEM (ECTF_NOTFUNC, "symbol table entry or type is not a function") \
_CTF_ITEM (ECTF_NOFUNCDAT, "no function information available for function") \
_CTF_ITEM (ECTF_NOTDATA, "symbol table entry does not refer to a data object") \
_CTF_ITEM (ECTF_NOTYPEDAT, "no type information available for symbol") \
_CTF_ITEM (ECTF_NOTSUP, "feature not supported") \
- _CTF_ITEM (ECTF_NOENUMNAM, "enumerator name not found") \
- _CTF_ITEM (ECTF_NOMEMBNAM, "member name not found") \
- _CTF_ITEM (ECTF_RDONLY, "CTF container is read-only") \
- _CTF_ITEM (ECTF_DTFULL, "CTF type is full (no more members allowed)") \
- _CTF_ITEM (ECTF_FULL, "CTF container is full") \
+ _CTF_ITEM (ECTF_RDONLY, "CTF dict is read-only") \
+ _CTF_ITEM (ECTF_FULL, "implementation limit: CTF dict or type is full") \
_CTF_ITEM (ECTF_DUPLICATE, "duplicate member, enumerator, datasec, or variable name") \
_CTF_ITEM (ECTF_CONFLICT, "conflicting type is already defined") \
_CTF_ITEM (ECTF_COMPRESS, "failed to compress CTF data") \
_CTF_ITEM (ECTF_FLAGS, "CTF header contains flags unknown to libctf") \
_CTF_ITEM (ECTF_NEEDSBFD, "this feature needs a libctf with BFD support") \
_CTF_ITEM (ECTF_INCOMPLETE, "type is not a complete type") \
- _CTF_ITEM (ECTF_NONAME, "type name must not be empty") \
+ _CTF_ITEM (ECTF_NONAME, "invalid or nonexistent name") \
_CTF_ITEM (ECTF_BADFLAG, "invalid CTF dict flag specified") \
_CTF_ITEM (ECTF_CTFVERS_NO_SERIALIZE, "CTFv1 dicts are too old to serialize") \
_CTF_ITEM (ECTF_UNSTABLE, "attempt to write unstable file format version: set I_KNOW_LIBCTF_IS_UNSTABLE in the environment") \
_CTF_ITEM (ECTF_WRONGPARENT, "cannot ctf_import: incorrect parent provided") \
_CTF_ITEM (ECTF_NOTSERIALIZED, "CTF dict must be serialized first") \
_CTF_ITEM (ECTF_BADCOMPONENT, "declaration tag component_idx is invalid") \
- _CTF_ITEM (ECTF_NOTBITSOU, "type is not a bitfield-capable struct or union") \
_CTF_ITEM (ECTF_DESCENDING, "structure offsets may not descend") \
_CTF_ITEM (ECTF_LINKAGE, "invalid linkage") \
_CTF_ITEM (ECTF_LINKKIND, "only functions and variables have linkage") \
- _CTF_ITEM (ECTF_NEVERTAG, "cannot call this function with a tag kind") \
- _CTF_ITEM (ECTF_NOTDATASEC, "this function requires a datasec") \
- _CTF_ITEM (ECTF_NOTVAR, "this function requires a variable") \
- _CTF_ITEM (ECTF_NODATASEC, "variable not found in datasec") \
- _CTF_ITEM (ECTF_NOTDECLTAG, "this function requires a decl tag") \
- _CTF_ITEM (ECTF_NOTTAG, "this function requires a type or decl tag") \
_CTF_ITEM (ECTF_KIND_PROHIBITED, "writeout of suppressed kind attempted") \
_CTF_ITEM (ECTF_NOTBTF, "cannot write out this dict as BTF") \
_CTF_ITEM (ECTF_TOOLARGE, "prefix required for correct representation")
extern int ctf_type_cmp (ctf_dict_t *, ctf_id_t, ctf_dict_t *, ctf_id_t);
/* Get the name of an enumerator given its value, or vice versa. If many
- enumerators have the same value, the first with that value is returned. */
+ enumerators have the same value, the first with that value is returned.
+ If no name exists for a given value, or no value for a given name,
+ ECTF_NONAME is raised. */
extern const char *ctf_enum_name (ctf_dict_t *, ctf_id_t, ctf_enum_value_t);
extern ctf_ret_t ctf_enum_value (ctf_dict_t *, ctf_id_t, const char *,
*** Additions (so far)
_CTF_ITEM (ECTF_BADCOMPONENT, "Declaration tag component_idx is invalid.") \
- _CTF_ITEM (ECTF_NOTBITSOU, "Type is not a bitfield-capable struct or union.") \
_CTF_ITEM (ECTF_DESCENDING, "Structure offsets may not descend.") \
_CTF_ITEM (ECTF_LINKAGE, "Invalid linkage.") \
_CTF_ITEM (ECTF_LINKKIND, "Only functions and variables have linkage.") \
- _CTF_ITEM (ECTF_NEVERTAG, "Cannot call this function with a tag kind.") \
- _CTF_ITEM (ECTF_NOTDATASEC, "This function requires a datasec.") \
- _CTF_ITEM (ECTF_NOTVAR, "This function requires a variable.") \
- _CTF_ITEM (ECTF_NOTDECLTAG, "This function requires a decl tag.") \
- _CTF_ITEM (ECTF_NOTTAG, "This function requires a type or decl tag.")
_CTF_ITEM (ECTF_KIND_PROHIBITED, "Writeout of suppressed kind attempted.")
_CTF_ITEM (ECTF_NOTBTF, "Cannot write out this dict as BTF.") \
- _CTF_ITEM (ECTF_NODATASEC, "Variable not found in datasec.")
_CTF_ITEM (ECTF_TOOLARGE, "Prefix required for correct representation.")
A bit of reshuffling of the constants to put ECTF_NEXT_END at the top, for
if (fp->ctf_typemax + 1 >= pfp->ctf_provtypemax)
{
- ctf_set_errno (fp, ECTF_FULL);
+ ctf_err (err_locus (fp), ECTF_FULL, _("cannot add type named %s of kind %i"),
+ name ? name : _("unnamed"), kind);
return NULL;
}
return (ctf_set_typed_errno (fp, EINVAL));
if (name == NULL || name[0] == '\0')
- return (ctf_set_typed_errno (fp, ECTF_NONAME));
+ return ctf_typed_err (err_locus (fp), ECTF_NONAME,
+ _("type name cannot be empty"));
if (!ctf_assert (fp, kind == CTF_K_INTEGER || kind == CTF_K_FLOAT
|| kind == CTF_K_BTF_FLOAT))
if ((kind != CTF_K_INTEGER) && (kind != CTF_K_FLOAT) &&
(kind != CTF_K_ENUM) && (kind != CTF_K_BTF_FLOAT)
&& (ref != 0))
- return (ctf_set_typed_errno (fp, ECTF_NOTINTFP));
+ return ctf_typed_err (type_err_locus (fp, ref), ECTF_WRONGKIND,
+ _("cannot slice non-integral type kind %i"), kind);
if ((dtd = ctf_add_generic (fp, NULL, CTF_K_SLICE, 0, sizeof (ctf_slice_t),
0, NULL)) == NULL)
}
if (tag == NULL || tag[0] == '\0')
- return (ctf_set_typed_errno (fp, ECTF_NONAME));
+ return ctf_typed_err (err_locus (fp), ECTF_NONAME,
+ _("tag name cannot be empty"));
if ((dtd = ctf_add_generic (fp, tag, kind, 0, vlen_size, 0, NULL)) == NULL)
return CTF_ERR; /* errno is set for us. */
if (struct_union_unknown != CTF_K_UNKNOWN
&& struct_union_unknown != CTF_K_STRUCT
&& struct_union_unknown != CTF_K_UNION)
- return ctf_typed_err (err_locus (fp), ECTF_NOTSOU,
+ return ctf_typed_err (err_locus (fp), ECTF_WRONGKIND,
_("struct %s kind must be one of CTF_K_STRUCT, UNION or UNKNOWN, not %i"),
name ? name : "(unnamed)",
struct_union_unknown);
if (bitfield != CTF_STRUCT_NORMAL
&& bitfield != CTF_STRUCT_BITFIELD)
- return ctf_typed_err (err_locus (fp), ECTF_NOTSOU,
+ return ctf_typed_err (err_locus (fp), ECTF_WRONGKIND,
_("struct %s bitfieldness must be one of CTF_STRUCT_NORMAL or CTF_STRUCT_BITFIELD, not %i"),
name ? name : "(unnamed)", bitfield);
kind = CTF_K_ENUM64;
if (kind != CTF_K_ENUM && kind != CTF_K_ENUM64)
- return ctf_typed_err (err_locus (fp), ECTF_NOTENUM,
+ return ctf_typed_err (err_locus (fp), ECTF_WRONGKIND,
_("enum %s kind must be one of CTF_K_ENUM, ENUM64 or UNKNOWN, not %i"),
name ? name : "(unnamed)", enum_64_unknown);
ctf_id_t type = 0;
if (!ctf_forwardable_kind (kind))
- return (ctf_set_typed_errno (fp, ECTF_NOTSUE));
+ return ctf_typed_err (err_locus (fp), ECTF_WRONGKIND,
+ _("cannot add forward named %s to kind %i"), name,
+ kind);
if (name == NULL || name[0] == '\0')
- return (ctf_set_typed_errno (fp, ECTF_NONAME));
+ return ctf_typed_err (err_locus (fp), ECTF_NONAME,
+ _("type name cannot be empty"));
if (fp->ctf_flags & LCTF_NO_STR)
return (ctf_set_errno (fp, ECTF_NOPARENT));
return (ctf_set_typed_errno (fp, EINVAL));
if (name == NULL || name[0] == '\0')
- return (ctf_set_typed_errno (fp, ECTF_NONAME));
+ return ctf_typed_err (err_locus (fp), ECTF_NONAME,
+ _("type name cannot be empty"));
if (ref != 0 && ctf_lookup_by_id (&tmp, ref, NULL) == NULL)
return CTF_ERR; /* errno is set for us. */
ctf_add_qualifier (ctf_dict_t *fp, ctf_kind_t cvr_qual, ctf_id_t ref)
{
if (cvr_qual != CTF_K_CONST && cvr_qual != CTF_K_VOLATILE && cvr_qual != CTF_K_RESTRICT)
- return ctf_typed_err (err_locus (fp), ECTF_NOTQUAL,
+ return ctf_typed_err (type_err_locus (fp, ref), ECTF_WRONGKIND,
_("kind %i is not CTF_K_CONST, CTF_K_VOLATILE or CTF_K_RESTRICT"),
cvr_qual);
}
if ((kind != CTF_K_ENUM) && (kind != CTF_K_ENUM64))
- return (ctf_set_errno (ofp, ECTF_NOTENUM));
+ return ctf_err (type_err_locus (ofp, enid), ECTF_WRONGKIND, NULL);
if (vlen == CTF_MAX_VLEN)
- return (ctf_set_errno (ofp, ECTF_DTFULL));
+ return ctf_err (type_err_locus (ofp, enid), ECTF_FULL, NULL);
if (kind == CTF_K_ENUM)
{
vlen = LCTF_VLEN (fp, prefix);
if (kind != CTF_K_STRUCT && kind != CTF_K_UNION)
- return (ctf_set_errno (ofp, ECTF_NOTSOU));
+ return ctf_err (type_err_locus (ofp, souid), ECTF_WRONGKIND,
+ _("not a struct or union"));
if (!kflag && bit_width != 0)
- return (ctf_set_errno (ofp, ECTF_NOTBITSOU));
+ return ctf_err (type_err_locus (ofp, souid), ECTF_WRONGKIND,
+ _("not a bitfield-capable struct or union"));
if (vlen == CTF_MAX_VLEN)
- return (ctf_set_errno (ofp, ECTF_DTFULL));
+ return ctf_err (type_err_locus (ofp, souid), ECTF_FULL, NULL);
/* Figure out the offset of this field: all structures in DTDs
are CTF_K_BIG, which means their offsets are all encoded as
return (ctf_set_typed_errno (fp, ECTF_NOPARENT));
if (name == NULL || name[0] == '\0')
- return (ctf_set_typed_errno (fp, ECTF_NONAME));
+ return ctf_typed_err (err_locus (fp), ECTF_NONAME,
+ _("datasec name cannot be empty"));
if (linkage < 0 || linkage > 2) /* Min/max of ctf_linkages_t. */
return (ctf_set_typed_errno (fp, ECTF_LINKAGE));
if (vlen == CTF_MAX_RAW_VLEN)
{
- ctf_set_typed_errno (fp, ECTF_DTFULL);
- goto err;
- }
-
- /* DATASECs do not support CTF_K_BIG (yet). */
- if (vlen == CTF_MAX_RAW_VLEN)
- {
- ctf_set_typed_errno (fp, ECTF_DTFULL);
+ ctf_err (type_err_locus (fp, type), ECTF_FULL,
+ _("datasec %s (%lx) overflow"), name, (long) datasec_id);
goto err;
}
ctf_id_t type;
if (kind == CTF_K_TYPE_TAG || kind == CTF_K_DECL_TAG)
- return (ctf_set_typed_errno (fp, ECTF_NEVERTAG));
+ return ctf_typed_err (err_locus (fp), ECTF_WRONGKIND,
+ _("cannot call this function with a tag kind"));
if ((type = ctf_dynhash_lookup_type (ctf_name_table (fp, kind),
name)) != CTF_ERR)
name)) != CTF_ERR)
return type;
- return ctf_set_typed_errno (fp, ECTF_NOTYPE);
+ return ctf_typed_err (err_locus (fp), ECTF_NOTYPE,
+ _("type named %s of type %i"), name, kind);
}
/* Look up a single enumerator by enumeration constant name. Returns the ID of
if (type == 0 && fp->ctf_parent)
{
if ((type = ctf_lookup_enumerator (fp->ctf_parent, name, enum_value)) == 0)
- return ctf_set_typed_errno (fp, ECTF_NOENUMNAM);
+ return ctf_typed_err (err_locus (fp), ECTF_NONAME, _("enumerator %s"),
+ name);
return type;
}
/* Nothing more to do if this type didn't exist or we don't have to look up
the enum value. */
if (type == 0)
- return ctf_set_typed_errno (fp, ECTF_NOENUMNAM);
+ return ctf_typed_err (err_locus (fp), ECTF_NONAME, _("enumerator %s"),
+ name);
if (enum_value == NULL)
return type;
if (kind != CTF_K_STRUCT && kind != CTF_K_UNION)
{
- ctf_set_errno (ofp, ECTF_NOTSOU);
+ ctf_err (type_err_locus (fp, type), ECTF_WRONGKIND,
+ _("not a struct or union"));
return CTF_MEMBER_ERR;
}
if ((kind != CTF_K_ENUM) && (kind != CTF_K_ENUM64))
{
ctf_next_destroy (i);
- ctf_set_errno (ofp, ECTF_NOTENUM);
+ ctf_err (type_err_locus (ofp, type), ECTF_WRONGKIND, NULL);
return NULL;
}
return CTF_ERR; /* errno is set for us. */
if (ctf_type_kind (fp, datasec) != CTF_K_DATASEC)
- return (ctf_set_typed_errno (ofp, ECTF_NOTDATASEC));
+ return ctf_err (type_err_locus (fp, datasec), ECTF_WRONGKIND, NULL);
if ((tp = ctf_lookup_by_id (&fp, datasec, NULL)) == NULL)
return CTF_ERR; /* errno is set for us. */
return CTF_ERR; /* errno is set for us. */
if (LCTF_KIND (fp, tp) != CTF_K_DECL_TAG)
- return (ctf_set_typed_errno (ofp, ECTF_NOTDECLTAG));
+ return ctf_typed_err (type_err_locus (ofp, decl_tag), ECTF_WRONGKIND, NULL);
vlen = ctf_vlen (fp, decl_tag, tp, NULL);
cdt = (ctf_decl_tag_t *) vlen;
ctf_id_t ref;
if (kind != CTF_K_TYPE_TAG && kind != CTF_K_DECL_TAG)
- return (ctf_set_typed_errno (fp, ECTF_NOTTAG));
+ return ctf_typed_err (type_err_locus (fp, tag), ECTF_WRONGKIND, NULL);
if ((ref = ctf_type_reference (fp, tag)) == CTF_ERR)
return CTF_ERR; /* errno is set for us. */
break;
}
default:
- return (ctf_set_errno (ofp, ECTF_NOTINTFP));
+ return ctf_err (type_err_locus (ofp, type), ECTF_WRONGKIND, NULL);
}
return 0;
kind = LCTF_KIND (fp, tp);
if (kind != CTF_K_STRUCT && kind != CTF_K_UNION && kind != CTF_K_ENUM)
- return (ctf_set_errno (ofp, ECTF_NOTSUE));
+ return ctf_err (type_err_locus (ofp, type), ECTF_WRONGKIND, NULL);
return LCTF_VLEN (fp, tp);
}
kind = LCTF_KIND (fp, tp);
if (kind != CTF_K_STRUCT && kind != CTF_K_UNION)
- return (ctf_set_errno (ofp, ECTF_NOTSOU));
+ return ctf_err (type_err_locus (ofp, type), ECTF_WRONGKIND,
+ _("not a struct or union"));
vlen = ctf_vlen (fp, type, tp, &n);
}
}
- return (ctf_set_errno (ofp, ECTF_NOMEMBNAM));
+ ctf_warn (type_err_locus (ofp, type), ECTF_NONAME,
+ _("member name %s not found"), name);
+ return (ctf_set_errno (ofp, ECTF_NONAME));
}
/* Return the array type, index, and size information for the specified ARRAY. */
return -1; /* errno is set for us. */
if (LCTF_KIND (fp, tp) != CTF_K_ARRAY)
- return (ctf_set_errno (ofp, ECTF_NOTARRAY));
+ return ctf_err (type_err_locus (ofp, type), ECTF_WRONGKIND, NULL);
vlen = ctf_vlen (fp, type, tp, NULL);
ap = (const ctf_array_t *) vlen;
kind = LCTF_KIND (fp, tp);
if (kind != CTF_K_ENUM && kind != CTF_K_ENUM64)
{
- ctf_set_errno (ofp, ECTF_NOTENUM);
+ ctf_err (type_err_locus (ofp, type), ECTF_WRONGKIND, NULL);
return NULL;
}
}
}
- ctf_set_errno (ofp, ECTF_NOENUMNAM);
+ ctf_warn (type_err_locus (ofp, type), ECTF_NONAME,
+ (value.encoding.cte_format & CTF_INT_SIGNED)
+ ? _("enumerator value %" PRIi64 " has no corresponding name")
+ : _("enumerator value %" PRIu64 " has no corresponding name"),
+ value.val);
+ ctf_set_errno (ofp, ECTF_NONAME);
return NULL;
}
kind = LCTF_KIND (fp, tp);
if (kind != CTF_K_ENUM && kind != CTF_K_ENUM64)
- return ctf_set_errno (ofp, ECTF_NOTENUM);
+ return ctf_err (type_err_locus (ofp, type), ECTF_WRONGKIND, NULL);
vlen = ctf_vlen (fp, type, tp, &n);
}
}
- return ctf_set_errno (ofp, ECTF_NOENUMNAM);
+ ctf_warn (type_err_locus (ofp, type), ECTF_NONAME,
+ _("enumerator name %s not found"), name);
+ return ctf_set_errno (ofp, ECTF_NONAME);
}
/* Determine whether an enum's values are signed. Private interface. */
return -1; /* errno is set for us. */
if (kind != CTF_K_ENUM && kind != CTF_K_ENUM64)
- return (ctf_set_errno (fp, ECTF_NOTENUM));
+ return ctf_err (type_err_locus (fp, type), ECTF_WRONGKIND, NULL);
if (ctf_lookup_by_id (&fp, type, &tp) == NULL)
return -1; /* errno is set for us. */
/* Return nonzero if this struct or union uses bitfield encoding. */
ctf_bool_t
-ctf_struct_bitfield (ctf_dict_t * fp, ctf_id_t type)
+ctf_struct_bitfield (ctf_dict_t *fp, ctf_id_t type)
{
ctf_kind_t kind;
const ctf_type_t *tp; /* The suffixed kind, if prefixed */
return -1; /* errno is set for us. */
if (kind != CTF_K_STRUCT && kind != CTF_K_UNION)
- return (ctf_set_errno (fp, ECTF_NOTSOU));
+ return ctf_err (type_err_locus (fp, type), ECTF_WRONGKIND,
+ _("not a struct or union"));
if (ctf_lookup_by_id (&fp, type, &tp) == NULL)
return -1; /* errno is set for us. */
/* Search a datasec for a variable covering a given offset.
- Errors with ECTF_NODATASEC if not found. */
+ Errors with ECTF_NOTYPE if not found. */
ctf_id_t
ctf_datasec_var_offset (ctf_dict_t *fp, ctf_id_t datasec, uint32_t offset)
{
+ ctf_dict_t *ofp = fp;
ctf_dtdef_t *dtd;
const ctf_type_t *tp;
unsigned char *vlen;
return -1; /* errno is set for us. */
if (ctf_type_kind (fp, datasec) != CTF_K_DATASEC)
- return ctf_set_typed_errno (fp, ECTF_NOTDATASEC);
+ return ctf_err (type_err_locus (ofp, datasec), ECTF_WRONGKIND, NULL);
if ((dtd = ctf_dynamic_type (fp, datasec)) != NULL)
{
if ((el = bsearch (&offset, sec, vlen_len, sizeof (ctf_var_secinfo_t),
search_datasec_by_offset)) == NULL)
- return ctf_set_typed_errno (fp, ECTF_NODATASEC);
+ return ctf_typed_err (type_err_locus (ofp, datasec), ECTF_NOTYPE,
+ _("searched datasec for offset %x"), offset);
if (el->cvs_offset == offset)
return el->cvs_type;
if (el->cvs_offset < offset && el->cvs_offset + size > offset)
return el->cvs_type;
- return ctf_set_typed_errno (fp, ECTF_NODATASEC);
+ return ctf_typed_err (type_err_locus (ofp, datasec), ECTF_NOTYPE,
+ _("searched datasec for offset %x"), offset);
}
/* Return the entry corresponding to a given component_idx in a datasec.
return &sec[component_idx];
}
-/* Return the datasec that a given variable appears in, or ECTF_NODATASEC if
+/* Return the datasec that a given variable appears in, or ECTF_NOTYPE if
none. */
ctf_id_t ctf_variable_datasec (ctf_dict_t *fp, ctf_id_t var)
void *sec;
if (ctf_type_kind (fp, var) != CTF_K_VAR)
- return (ctf_set_typed_errno (fp, ECTF_NOTVAR));
+ return ctf_typed_err (type_err_locus (fp, var), ECTF_WRONGKIND, NULL);
if (ctf_dynhash_lookup_kv (fp->ctf_var_datasecs, (void *) (ptrdiff_t) var,
NULL, &sec))
return (ctf_id_t) sec;
- return (ctf_set_typed_errno (fp, ECTF_NODATASEC));
+ return ctf_typed_err (type_err_locus (fp, var), ECTF_NOTYPE, NULL);
}
/* Recursively visit the members of any type. This function is used as the
err, ctf_errmsg (ctf_errno (fp)));
if ((type = ctf_lookup_enumerator (fp, "DYNADD3", &val) != CTF_ERR) ||
- ctf_errno (fp) != ECTF_NOENUMNAM)
+ ctf_errno (fp) != ECTF_NONAME)
{
if (type != CTF_ERR)
{
char *foo;
- printf ("direct lookup: hidden lookup did not return ECTF_NOENUMNAM but rather %li in %s\n",
+ printf ("direct lookup: hidden lookup did not return ECTF_NONAME but rather %li in %s\n",
val.val, foo = ctf_type_aname (fp, type));
free (foo);
}
else
- printf ("direct lookup: hidden lookup did not return ECTF_NOENUMNAM but rather %s\n",
+ printf ("direct lookup: hidden lookup did not return ECTF_NONAME but rather %s\n",
ctf_errmsg (ctf_errno (fp)));
}
free (type_name);
if (ctf_member_info (fp, type, "should_not_appear", &mi) >= 0
- || ctf_errno (fp) != ECTF_NOMEMBNAM)
+ || ctf_errno (fp) != ECTF_NONAME)
fprintf (stderr, "should_not_appear appeared.\n");
ctf_dict_close (fp);