f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson/*
69fe9aaafdd6a141610e86a777d325db75422070Mark Andrews * CDDL HEADER START
499b34cea04a46823d003d4c0520c8b03e8513cbBrian Wellington *
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence * The contents of this file are subject to the terms of the
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson * Common Development and Distribution License, Version 1.0 only
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson * (the "License"). You may not use this file except in compliance
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson * with the License.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence *
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * or http://www.opensolaris.org/os/licensing.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * See the License for the specific language governing permissions
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * and limitations under the License.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews *
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * When distributing Covered Code, include this CDDL HEADER in each
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson * If applicable, add the following below this CDDL HEADER, with the
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson * fields enclosed by brackets "[]" replaced with your own identifying
69fe9aaafdd6a141610e86a777d325db75422070Mark Andrews * information: Portions Copyright [yyyy] [name of copyright owner]
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein *
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * CDDL HEADER END
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence */
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson/*
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence * Use is subject to license terms.
6028d1ce0380d0ba7f6c6ecd1ad20b31ddd1becbDavid Lawrence */
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson#ifndef _DT_ERRTAGS_H
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington#define _DT_ERRTAGS_H
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington#pragma ident "%Z%%M% %I% %E% SMI"
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson#ifdef __cplusplus
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrenceextern "C" {
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson#endif
3b2f0d1d660486abf9d6c450b39e015836d97373Brian Wellington
3b2f0d1d660486abf9d6c450b39e015836d97373Brian Wellington/*
9259fed3d8ac5d1efa9b5a647969e40c9c934484Andreas Gustafsson * This enum definition is used to define a set of error tags associated with
9259fed3d8ac5d1efa9b5a647969e40c9c934484Andreas Gustafsson * the D compiler's various error conditions. The shell script mkerrtags.sh is
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson * used to parse this file and create a corresponding dt_errtags.c source file.
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson * If you do something other than add a new error tag here, you may need to
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson * update the mkerrtags shell script as it is based upon simple regexps.
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson */
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafssontypedef enum {
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson D_UNKNOWN, /* unknown D compiler error */
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson D_SYNTAX, /* syntax error in input stream */
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson D_EMPTY, /* empty translation unit */
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington D_TYPE_ERR, /* type definition missing */
14c5931d3d52baf17a786153c35c05fa62f916dcBrian Wellington D_TYPE_MEMBER, /* type member not found */
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson D_ASRELO, /* relocation remains against symbol */
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson D_CG_EXPR, /* tracing function called from expr */
14c5931d3d52baf17a786153c35c05fa62f916dcBrian Wellington D_CG_DYN, /* expression returns dynamic result */
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson D_ATTR_MIN, /* attributes less than amin setting */
029f5aa86138aa9c32b3dc3c8a00626eea961d35James Brister D_ID_OFLOW, /* identifier space overflow */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_PDESC_ZERO, /* probedesc matches zero probes */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_PDESC_INVAL, /* probedesc is not valid */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_PRED_SCALAR, /* predicate must be of scalar type */
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington D_FUNC_IDENT, /* function designator is not ident */
23fdb6a5a3d3d0e427682b68eea9553d2d326ad4Mark Andrews D_FUNC_UNDEF, /* function ident is not defined */
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson D_FUNC_IDKIND, /* function ident is of wrong idkind */
14c5931d3d52baf17a786153c35c05fa62f916dcBrian Wellington D_OFFSETOF_TYPE, /* offsetof arg is not sou type */
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson D_OFFSETOF_BITFIELD, /* offsetof applied to field member */
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson D_SIZEOF_TYPE, /* invalid sizeof type */
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson D_SIZEOF_BITFIELD, /* sizeof applied to field member */
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington D_STRINGOF_TYPE, /* invalid stringof type */
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington D_OP_IDENT, /* operand must be an identifier */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_OP_INT, /* operand must be integral type */
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington D_OP_SCALAR, /* operand must be scalar type */
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington D_OP_ARITH, /* operand must be arithmetic type */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_OP_WRITE, /* operand must be writable variable */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_OP_LVAL, /* operand must be lvalue */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_OP_INCOMPAT, /* operand types are not compatible */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_OP_VFPTR, /* operand cannot be void or func ptr */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_OP_ARRFUN, /* operand cannot be array or func */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_OP_PTR, /* operand must be a pointer */
23fdb6a5a3d3d0e427682b68eea9553d2d326ad4Mark Andrews D_OP_SOU, /* operand must be struct or union */
a14762f207c36eb0171328802a570ceeddef581dDanny Mayer D_OP_INCOMPLETE, /* operand is an incomplete type */
23fdb6a5a3d3d0e427682b68eea9553d2d326ad4Mark Andrews D_OP_DYN, /* operand cannot be of dynamic type */
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington D_OP_ACT, /* operand cannot be action */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_AGG_REDEF, /* aggregation cannot be redefined */
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington D_AGG_FUNC, /* aggregating function required */
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington D_AGG_MDIM, /* aggregation used as multi-dim arr */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_ARR_BADREF, /* access non-array using tuple */
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington D_ARR_LOCAL, /* cannot define local assc array */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_DIV_ZERO, /* division by zero detected */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_DEREF_NONPTR, /* dereference non-pointer type */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_DEREF_VOID, /* dereference void pointer */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_DEREF_FUNC, /* dereference function pointer */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_ADDROF_LVAL, /* unary & applied to non-lvalue */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_ADDROF_VAR, /* unary & applied to variable */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_ADDROF_BITFIELD, /* unary & applied to field member */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_XLATE_REDECL, /* translator redeclared */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_XLATE_NOCONV, /* no conversion for member defined */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_XLATE_NONE, /* no translator for type combo */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_XLATE_SOU, /* dst must be struct or union type */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_XLATE_INCOMPAT, /* translator member type incompat */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_XLATE_MEMB, /* translator member is not valid */
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington D_CAST_INVAL, /* invalid cast expression */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_PRAGERR, /* #pragma error message */
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington D_PRAGCTL_INVAL, /* invalid control directive */
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington D_PRAGMA_INVAL, /* invalid compiler pragma */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_PRAGMA_UNUSED, /* unused compiler pragma */
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington D_PRAGMA_MALFORM, /* malformed #pragma argument list */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_PRAGMA_OPTSET, /* failed to set #pragma option */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_PRAGMA_SCOPE, /* #pragma identifier scope error */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_PRAGMA_DEPEND, /* #pragma dependency not satisfied */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_MACRO_UNDEF, /* macro parameter is not defined */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_MACRO_OFLOW, /* macro parameter integer overflow */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_MACRO_UNUSED, /* macro parameter is never used */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_INT_OFLOW, /* integer constant overflow */
909e3c228813f05bcdebf403a69ed18406f86ec4Brian Wellington D_INT_DIGIT, /* integer digit is not valid */
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington D_STR_NL, /* newline in string literal */
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson D_CHR_NL, /* newline in character constant */
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson D_CHR_NULL, /* empty character constant */
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson D_CHR_OFLOW, /* character constant is too long */
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson D_IDENT_BADREF, /* identifier expected type mismatch */
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson D_IDENT_UNDEF, /* identifier is not known/defined */
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson D_IDENT_AMBIG, /* identifier is ambiguous (var/enum) */
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson D_SYM_BADREF, /* kernel/user symbol ref mismatch */
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson D_SYM_NOTYPES, /* no CTF data available for sym ref */
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson D_SYM_MODEL, /* module/program data model mismatch */
D_VAR_UNDEF, /* reference to undefined variable */
D_VAR_UNSUP, /* unsupported variable specification */
D_PROTO_LEN, /* prototype length mismatch */
D_PROTO_ARG, /* prototype argument mismatch */
D_ARGS_MULTI, /* description matches unstable set */
D_ARGS_XLATOR, /* no args[] translator defined */
D_ARGS_NONE, /* no args[] available */
D_ARGS_TYPE, /* invalid args[] type */
D_ARGS_IDX, /* invalid args[] index */
D_REGS_IDX, /* invalid regs[] index */
D_KEY_TYPE, /* invalid agg or array key type */
D_PRINTF_DYN_PROTO, /* dynamic size argument missing */
D_PRINTF_DYN_TYPE, /* dynamic size type mismatch */
D_PRINTF_AGG_CONV, /* improper use of %@ conversion */
D_PRINTF_ARG_PROTO, /* conversion missing value argument */
D_PRINTF_ARG_TYPE, /* conversion arg has wrong type */
D_PRINTF_ARG_EXTRA, /* extra arguments specified */
D_PRINTF_ARG_FMT, /* format string is not a constant */
D_PRINTF_FMT_EMPTY, /* format string is empty */
D_DECL_CHARATTR, /* bad attributes for char decl */
D_DECL_VOIDATTR, /* bad attributes for void decl */
D_DECL_SIGNINT, /* sign/unsign with non-integer decl */
D_DECL_LONGINT, /* long with non-arithmetic decl */
D_DECL_IDENT, /* old-style declaration or bad type */
D_DECL_CLASS, /* more than one storage class given */
D_DECL_BADCLASS, /* decl class not supported in D */
D_DECL_PARMCLASS, /* invalid class for parameter type */
D_DECL_COMBO, /* bad decl specifier combination */
D_DECL_ARRSUB, /* const int required for array size */
D_DECL_ARRNULL, /* array decl requires dim or tuple */
D_DECL_ARRBIG, /* array size too big */
D_DECL_IDRED, /* decl identifier redeclared */
D_DECL_TYPERED, /* decl type redeclared */
D_DECL_MNAME, /* member name missing */
D_DECL_SCOPE, /* scoping operator used in decl */
D_DECL_BFCONST, /* bit-field requires const size expr */
D_DECL_BFSIZE, /* bit-field size too big for type */
D_DECL_BFTYPE, /* bit-field type is not valid */
D_DECL_ENCONST, /* enum tag requires const size expr */
D_DECL_ENOFLOW, /* enumerator value overflows INT_MAX */
D_DECL_USELESS, /* useless external declaration */
D_DECL_LOCASSC, /* attempt to decl local assc array */
D_DECL_VOIDOBJ, /* attempt to decl void object */
D_DECL_DYNOBJ, /* attempt to decl dynamic object */
D_DECL_INCOMPLETE, /* declaration uses incomplete type */
D_DECL_PROTO_VARARGS, /* varargs not allowed in prototype */
D_DECL_PROTO_TYPE, /* type not allowed in prototype */
D_DECL_PROTO_VOID, /* void must be sole parameter */
D_DECL_PROTO_NAME, /* void parameter may not have a name */
D_DECL_PROTO_FORM, /* parameter name has no formal */
D_COMM_COMM, /* commit() after commit() */
D_COMM_DREC, /* commit() after data action */
D_SPEC_SPEC, /* speculate() after speculate() */
D_SPEC_COMM, /* speculate() after commit() */
D_SPEC_DREC, /* speculate() after data action */
D_AGG_COMM, /* aggregating act after commit() */
D_AGG_SPEC, /* aggregating act after speculate() */
D_AGG_NULL, /* aggregation stmt has null effect */
D_AGG_SCALAR, /* aggregating function needs scalar */
D_ACT_SPEC, /* destructive action after speculate */
D_EXIT_SPEC, /* exit() action after speculate */
D_DREC_COMM, /* data action after commit() */
D_PRINTA_PROTO, /* printa() prototype mismatch */
D_PRINTA_AGGARG, /* aggregation arg type mismatch */
D_PRINTA_AGGBAD, /* printa() aggregation not defined */
D_PRINTA_AGGKEY, /* printa() aggregation key mismatch */
D_PRINTA_AGGPROTO, /* printa() aggregation mismatch */
D_TRACE_VOID, /* trace() argument has void type */
D_TRACE_DYN, /* trace() argument has dynamic type */
D_TRACEMEM_ADDR, /* tracemem() address bad type */
D_TRACEMEM_SIZE, /* tracemem() size bad type */
D_STACK_PROTO, /* stack() prototype mismatch */
D_STACK_SIZE, /* stack() size argument bad type */
D_USTACK_FRAMES, /* ustack() frames arg bad type */
D_USTACK_STRSIZE, /* ustack() strsize arg bad type */
D_USTACK_PROTO, /* ustack() prototype mismatch */
D_LQUANT_BASETYPE, /* lquantize() bad base type */
D_LQUANT_BASEVAL, /* lquantize() bad base value */
D_LQUANT_LIMTYPE, /* lquantize() bad limit type */
D_LQUANT_LIMVAL, /* lquantize() bad limit value */
D_LQUANT_MISMATCH, /* lquantize() limit < base */
D_LQUANT_STEPTYPE, /* lquantize() bad step type */
D_LQUANT_STEPVAL, /* lquantize() bad step value */
D_LQUANT_STEPLARGE, /* lquantize() step too large */
D_LQUANT_STEPSMALL, /* lquantize() step too small */
D_QUANT_PROTO, /* quantize() prototype mismatch */
D_PROC_OFF, /* byte offset exceeds function size */
D_PROC_ALIGN, /* byte offset has invalid alignment */
D_PROC_NAME, /* invalid process probe name */
D_PROC_GRAB, /* failed to grab process */
D_PROC_DYN, /* process is not dynamically linked */
D_PROC_LIB, /* invalid process library name */
D_PROC_FUNC, /* no such function in process */
D_PROC_CREATEFAIL, /* pid probe creation failed */
D_PROC_NODEV, /* fasttrap device is not installed */
D_PROC_BADPID, /* user probe pid invalid */
D_PROC_BADPROV, /* user probe provider invalid */
D_PROC_USDT, /* problem initializing usdt */
D_CLEAR_PROTO, /* clear() prototype mismatch */
D_CLEAR_AGGARG, /* aggregation arg type mismatch */
D_CLEAR_AGGBAD, /* clear() aggregation not defined */
D_NORMALIZE_PROTO, /* normalize() prototype mismatch */
D_NORMALIZE_SCALAR, /* normalize() value must be scalar */
D_NORMALIZE_AGGARG, /* aggregation arg type mismatch */
D_NORMALIZE_AGGBAD, /* normalize() aggregation not def. */
D_TRUNC_PROTO, /* trunc() prototype mismatch */
D_TRUNC_SCALAR, /* trunc() value must be scalar */
D_TRUNC_AGGARG, /* aggregation arg type mismatch */
D_TRUNC_AGGBAD, /* trunc() aggregation not def. */
D_PROV_BADNAME, /* invalid provider name */
D_PROV_INCOMPAT, /* provider/probe interface mismatch */
D_PROV_PRDUP, /* duplicate probe declaration */
D_PROV_PRARGLEN, /* probe argument list too long */
D_PROV_PRXLATOR, /* probe argument translator missing */
D_FREOPEN_INVALID, /* frename() filename is invalid */
D_LQUANT_MATCHBASE, /* lquantize() mismatch on base */
D_LQUANT_MATCHLIM, /* lquantize() mismatch on limit */
D_LQUANT_MATCHSTEP /* lquantize() mismatch on step */
} dt_errtag_t;
extern const char *dt_errtag(dt_errtag_t);
#ifdef __cplusplus
}
#endif
#endif /* _DT_ERRTAGS_H */