dt_errtags.h revision 237624
1139749Simp/* 255992Swpaul * CDDL HEADER START 355992Swpaul * 455992Swpaul * The contents of this file are subject to the terms of the 555992Swpaul * Common Development and Distribution License, Version 1.0 only 655992Swpaul * (the "License"). You may not use this file except in compliance 755992Swpaul * with the License. 855992Swpaul * 955992Swpaul * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 1055992Swpaul * or http://www.opensolaris.org/os/licensing. 1155992Swpaul * See the License for the specific language governing permissions 1255992Swpaul * and limitations under the License. 1355992Swpaul * 1455992Swpaul * When distributing Covered Code, include this CDDL HEADER in each 1555992Swpaul * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1655992Swpaul * If applicable, add the following below this CDDL HEADER, with the 1755992Swpaul * fields enclosed by brackets "[]" replaced with your own identifying 1855992Swpaul * information: Portions Copyright [yyyy] [name of copyright owner] 1955992Swpaul * 2055992Swpaul * CDDL HEADER END 2155992Swpaul */ 2255992Swpaul/* 2355992Swpaul * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 2455992Swpaul * Use is subject to license terms. 2555992Swpaul */ 2655992Swpaul 2755992Swpaul#ifndef _DT_ERRTAGS_H 2855992Swpaul#define _DT_ERRTAGS_H 2955992Swpaul 3055992Swpaul#pragma ident "%Z%%M% %I% %E% SMI" 3155992Swpaul 3255992Swpaul#ifdef __cplusplus 3355992Swpaulextern "C" { 3455992Swpaul#endif 35110531Sambrisko 3655992Swpaul/* 3777217Sphk * This enum definition is used to define a set of error tags associated with 3877217Sphk * the D compiler's various error conditions. The shell script mkerrtags.sh is 3955992Swpaul * used to parse this file and create a corresponding dt_errtags.c source file. 4055992Swpaul * If you do something other than add a new error tag here, you may need to 4155992Swpaul * update the mkerrtags shell script as it is based upon simple regexps. 4255992Swpaul */ 4355992Swpaultypedef enum { 4455992Swpaul D_UNKNOWN, /* unknown D compiler error */ 4555992Swpaul D_SYNTAX, /* syntax error in input stream */ 4655992Swpaul D_EMPTY, /* empty translation unit */ 4755992Swpaul D_TYPE_ERR, /* type definition missing */ 4855992Swpaul D_TYPE_MEMBER, /* type member not found */ 4955992Swpaul D_ASRELO, /* relocation remains against symbol */ 5055992Swpaul D_CG_EXPR, /* tracing function called from expr */ 5155992Swpaul D_CG_DYN, /* expression returns dynamic result */ 5255992Swpaul D_ATTR_MIN, /* attributes less than amin setting */ 5355992Swpaul D_ID_OFLOW, /* identifier space overflow */ 5455992Swpaul D_PDESC_ZERO, /* probedesc matches zero probes */ 5555992Swpaul D_PDESC_INVAL, /* probedesc is not valid */ 5655992Swpaul D_PRED_SCALAR, /* predicate must be of scalar type */ 5755992Swpaul D_FUNC_IDENT, /* function designator is not ident */ 5855992Swpaul D_FUNC_UNDEF, /* function ident is not defined */ 5955992Swpaul D_FUNC_IDKIND, /* function ident is of wrong idkind */ 6055992Swpaul D_OFFSETOF_TYPE, /* offsetof arg is not sou type */ 61108401Sambrisko D_OFFSETOF_BITFIELD, /* offsetof applied to field member */ 62108401Sambrisko D_SIZEOF_TYPE, /* invalid sizeof type */ 63108401Sambrisko D_SIZEOF_BITFIELD, /* sizeof applied to field member */ 64108401Sambrisko D_STRINGOF_TYPE, /* invalid stringof type */ 65108401Sambrisko D_OP_IDENT, /* operand must be an identifier */ 66108401Sambrisko D_OP_INT, /* operand must be integral type */ 67108401Sambrisko D_OP_SCALAR, /* operand must be scalar type */ 68108401Sambrisko D_OP_ARITH, /* operand must be arithmetic type */ 69108401Sambrisko D_OP_WRITE, /* operand must be writable variable */ 70108401Sambrisko D_OP_LVAL, /* operand must be lvalue */ 71108401Sambrisko D_OP_INCOMPAT, /* operand types are not compatible */ 72108401Sambrisko D_OP_VFPTR, /* operand cannot be void or func ptr */ 73108401Sambrisko D_OP_ARRFUN, /* operand cannot be array or func */ 74108401Sambrisko D_OP_PTR, /* operand must be a pointer */ 75108401Sambrisko D_OP_SOU, /* operand must be struct or union */ 76108401Sambrisko D_OP_INCOMPLETE, /* operand is an incomplete type */ 77108401Sambrisko D_OP_DYN, /* operand cannot be of dynamic type */ 78108401Sambrisko D_OP_ACT, /* operand cannot be action */ 79108401Sambrisko D_AGG_REDEF, /* aggregation cannot be redefined */ 80108401Sambrisko D_AGG_FUNC, /* aggregating function required */ 81108401Sambrisko D_AGG_MDIM, /* aggregation used as multi-dim arr */ 82108401Sambrisko D_ARR_BADREF, /* access non-array using tuple */ 83108401Sambrisko D_ARR_LOCAL, /* cannot define local assc array */ 84108401Sambrisko D_DIV_ZERO, /* division by zero detected */ 85108401Sambrisko D_DEREF_NONPTR, /* dereference non-pointer type */ 86108401Sambrisko D_DEREF_VOID, /* dereference void pointer */ 87108401Sambrisko D_DEREF_FUNC, /* dereference function pointer */ 88108401Sambrisko D_ADDROF_LVAL, /* unary & applied to non-lvalue */ 89108401Sambrisko D_ADDROF_VAR, /* unary & applied to variable */ 90108401Sambrisko D_ADDROF_BITFIELD, /* unary & applied to field member */ 9155992Swpaul D_XLATE_REDECL, /* translator redeclared */ 9255992Swpaul D_XLATE_NOCONV, /* no conversion for member defined */ 9355992Swpaul D_XLATE_NONE, /* no translator for type combo */ 9455992Swpaul D_XLATE_SOU, /* dst must be struct or union type */ 9555992Swpaul D_XLATE_INCOMPAT, /* translator member type incompat */ 96108401Sambrisko D_XLATE_MEMB, /* translator member is not valid */ 97108401Sambrisko D_CAST_INVAL, /* invalid cast expression */ 98119156Sambrisko D_PRAGERR, /* #pragma error message */ 99108401Sambrisko D_PRAGCTL_INVAL, /* invalid control directive */ 100108401Sambrisko D_PRAGMA_INVAL, /* invalid compiler pragma */ 10155992Swpaul D_PRAGMA_UNUSED, /* unused compiler pragma */ 10255992Swpaul D_PRAGMA_MALFORM, /* malformed #pragma argument list */ 10355992Swpaul D_PRAGMA_OPTSET, /* failed to set #pragma option */ 10455992Swpaul D_PRAGMA_SCOPE, /* #pragma identifier scope error */ 105108401Sambrisko D_PRAGMA_DEPEND, /* #pragma dependency not satisfied */ 106108401Sambrisko D_MACRO_UNDEF, /* macro parameter is not defined */ 107108401Sambrisko D_MACRO_OFLOW, /* macro parameter integer overflow */ 108108401Sambrisko D_MACRO_UNUSED, /* macro parameter is never used */ 109108401Sambrisko D_INT_OFLOW, /* integer constant overflow */ 110108401Sambrisko D_INT_DIGIT, /* integer digit is not valid */ 111108401Sambrisko D_STR_NL, /* newline in string literal */ 112108401Sambrisko D_CHR_NL, /* newline in character constant */ 113108401Sambrisko D_CHR_NULL, /* empty character constant */ 11455992Swpaul D_CHR_OFLOW, /* character constant is too long */ 11555992Swpaul D_IDENT_BADREF, /* identifier expected type mismatch */ 11655992Swpaul D_IDENT_UNDEF, /* identifier is not known/defined */ 11755992Swpaul D_IDENT_AMBIG, /* identifier is ambiguous (var/enum) */ 11855992Swpaul D_SYM_BADREF, /* kernel/user symbol ref mismatch */ 11955992Swpaul D_SYM_NOTYPES, /* no CTF data available for sym ref */ 12055992Swpaul D_SYM_MODEL, /* module/program data model mismatch */ 12155992Swpaul D_VAR_UNDEF, /* reference to undefined variable */ 12255992Swpaul D_VAR_UNSUP, /* unsupported variable specification */ 12355992Swpaul D_PROTO_LEN, /* prototype length mismatch */ 12455992Swpaul D_PROTO_ARG, /* prototype argument mismatch */ 12555992Swpaul D_ARGS_MULTI, /* description matches unstable set */ 126110253Sambrisko D_ARGS_XLATOR, /* no args[] translator defined */ 12755992Swpaul D_ARGS_NONE, /* no args[] available */ 12855992Swpaul D_ARGS_TYPE, /* invalid args[] type */ 12955992Swpaul D_ARGS_IDX, /* invalid args[] index */ 13074698Sarchie D_REGS_IDX, /* invalid regs[] index */ 13155992Swpaul D_KEY_TYPE, /* invalid agg or array key type */ 13255992Swpaul D_PRINTF_DYN_PROTO, /* dynamic size argument missing */ 13355992Swpaul D_PRINTF_DYN_TYPE, /* dynamic size type mismatch */ 13455992Swpaul D_PRINTF_AGG_CONV, /* improper use of %@ conversion */ 135108401Sambrisko D_PRINTF_ARG_PROTO, /* conversion missing value argument */ 13655992Swpaul D_PRINTF_ARG_TYPE, /* conversion arg has wrong type */ 13755992Swpaul D_PRINTF_ARG_EXTRA, /* extra arguments specified */ 13855992Swpaul D_PRINTF_ARG_FMT, /* format string is not a constant */ 13955992Swpaul D_PRINTF_FMT_EMPTY, /* format string is empty */ 14055992Swpaul D_DECL_CHARATTR, /* bad attributes for char decl */ 14155992Swpaul D_DECL_VOIDATTR, /* bad attributes for void decl */ 14255992Swpaul D_DECL_SIGNINT, /* sign/unsign with non-integer decl */ 14355992Swpaul D_DECL_LONGINT, /* long with non-arithmetic decl */ 14455992Swpaul D_DECL_IDENT, /* old-style declaration or bad type */ 145108401Sambrisko D_DECL_CLASS, /* more than one storage class given */ 146108401Sambrisko D_DECL_BADCLASS, /* decl class not supported in D */ 147108401Sambrisko D_DECL_PARMCLASS, /* invalid class for parameter type */ 148108401Sambrisko D_DECL_COMBO, /* bad decl specifier combination */ 149108401Sambrisko D_DECL_ARRSUB, /* const int required for array size */ 150108401Sambrisko D_DECL_ARRNULL, /* array decl requires dim or tuple */ 151108401Sambrisko D_DECL_ARRBIG, /* array size too big */ 152108401Sambrisko D_DECL_IDRED, /* decl identifier redeclared */ 153108401Sambrisko D_DECL_TYPERED, /* decl type redeclared */ 154108401Sambrisko D_DECL_MNAME, /* member name missing */ 155108401Sambrisko D_DECL_SCOPE, /* scoping operator used in decl */ 156108401Sambrisko D_DECL_BFCONST, /* bit-field requires const size expr */ 157108401Sambrisko D_DECL_BFSIZE, /* bit-field size too big for type */ 158108401Sambrisko D_DECL_BFTYPE, /* bit-field type is not valid */ 159108401Sambrisko D_DECL_ENCONST, /* enum tag requires const size expr */ 160108401Sambrisko D_DECL_ENOFLOW, /* enumerator value overflows INT_MAX */ 161108401Sambrisko D_DECL_USELESS, /* useless external declaration */ 162108401Sambrisko D_DECL_LOCASSC, /* attempt to decl local assc array */ 163108401Sambrisko D_DECL_VOIDOBJ, /* attempt to decl void object */ 164108401Sambrisko D_DECL_DYNOBJ, /* attempt to decl dynamic object */ 165108401Sambrisko D_DECL_INCOMPLETE, /* declaration uses incomplete type */ 166108401Sambrisko D_DECL_PROTO_VARARGS, /* varargs not allowed in prototype */ 167108401Sambrisko D_DECL_PROTO_TYPE, /* type not allowed in prototype */ 168108401Sambrisko D_DECL_PROTO_VOID, /* void must be sole parameter */ 169108401Sambrisko D_DECL_PROTO_NAME, /* void parameter may not have a name */ 170108401Sambrisko D_DECL_PROTO_FORM, /* parameter name has no formal */ 171108401Sambrisko D_COMM_COMM, /* commit() after commit() */ 172108401Sambrisko D_COMM_DREC, /* commit() after data action */ 173108401Sambrisko D_SPEC_SPEC, /* speculate() after speculate() */ 174108401Sambrisko D_SPEC_COMM, /* speculate() after commit() */ 175108401Sambrisko D_SPEC_DREC, /* speculate() after data action */ 176108401Sambrisko D_AGG_COMM, /* aggregating act after commit() */ 177108401Sambrisko D_AGG_SPEC, /* aggregating act after speculate() */ 178108401Sambrisko D_AGG_NULL, /* aggregation stmt has null effect */ 179108401Sambrisko D_AGG_SCALAR, /* aggregating function needs scalar */ 180108401Sambrisko D_ACT_SPEC, /* destructive action after speculate */ 181108401Sambrisko D_EXIT_SPEC, /* exit() action after speculate */ 182108401Sambrisko D_DREC_COMM, /* data action after commit() */ 183108401Sambrisko D_PRINTA_PROTO, /* printa() prototype mismatch */ 184119156Sambrisko D_PRINTA_AGGARG, /* aggregation arg type mismatch */ 185119156Sambrisko D_PRINTA_AGGBAD, /* printa() aggregation not defined */ 186119156Sambrisko D_PRINTA_AGGKEY, /* printa() aggregation key mismatch */ 187119156Sambrisko D_PRINTA_AGGPROTO, /* printa() aggregation mismatch */ 188119156Sambrisko D_TRACE_VOID, /* trace() argument has void type */ 189108401Sambrisko D_TRACE_DYN, /* trace() argument has dynamic type */ 190108401Sambrisko D_TRACEMEM_ADDR, /* tracemem() address bad type */ 191108401Sambrisko D_TRACEMEM_SIZE, /* tracemem() size bad type */ 192108401Sambrisko D_STACK_PROTO, /* stack() prototype mismatch */ 193108401Sambrisko D_STACK_SIZE, /* stack() size argument bad type */ 194108401Sambrisko D_USTACK_FRAMES, /* ustack() frames arg bad type */ 195108401Sambrisko D_USTACK_STRSIZE, /* ustack() strsize arg bad type */ 196108401Sambrisko D_USTACK_PROTO, /* ustack() prototype mismatch */ 197108401Sambrisko D_LQUANT_BASETYPE, /* lquantize() bad base type */ 198108401Sambrisko D_LQUANT_BASEVAL, /* lquantize() bad base value */ 199108401Sambrisko D_LQUANT_LIMTYPE, /* lquantize() bad limit type */ 200108401Sambrisko D_LQUANT_LIMVAL, /* lquantize() bad limit value */ 201108401Sambrisko D_LQUANT_MISMATCH, /* lquantize() limit < base */ 202108401Sambrisko D_LQUANT_STEPTYPE, /* lquantize() bad step type */ 203108401Sambrisko D_LQUANT_STEPVAL, /* lquantize() bad step value */ 204108401Sambrisko D_LQUANT_STEPLARGE, /* lquantize() step too large */ 205108401Sambrisko D_LQUANT_STEPSMALL, /* lquantize() step too small */ 206108401Sambrisko D_QUANT_PROTO, /* quantize() prototype mismatch */ 207108401Sambrisko D_PROC_OFF, /* byte offset exceeds function size */ 208108401Sambrisko D_PROC_ALIGN, /* byte offset has invalid alignment */ 20955992Swpaul D_PROC_NAME, /* invalid process probe name */ 21055992Swpaul D_PROC_GRAB, /* failed to grab process */ 21155992Swpaul D_PROC_DYN, /* process is not dynamically linked */ 21255992Swpaul D_PROC_LIB, /* invalid process library name */ 21355992Swpaul D_PROC_FUNC, /* no such function in process */ 21455992Swpaul D_PROC_CREATEFAIL, /* pid probe creation failed */ 21555992Swpaul D_PROC_NODEV, /* fasttrap device is not installed */ 21655992Swpaul D_PROC_BADPID, /* user probe pid invalid */ 21755992Swpaul D_PROC_BADPROV, /* user probe provider invalid */ 21855992Swpaul D_PROC_USDT, /* problem initializing usdt */ 21955992Swpaul D_CLEAR_PROTO, /* clear() prototype mismatch */ 22055992Swpaul D_CLEAR_AGGARG, /* aggregation arg type mismatch */ 22155992Swpaul D_CLEAR_AGGBAD, /* clear() aggregation not defined */ 22255992Swpaul D_NORMALIZE_PROTO, /* normalize() prototype mismatch */ 22355992Swpaul D_NORMALIZE_SCALAR, /* normalize() value must be scalar */ 22455992Swpaul D_NORMALIZE_AGGARG, /* aggregation arg type mismatch */ 22555992Swpaul D_NORMALIZE_AGGBAD, /* normalize() aggregation not def. */ 22655992Swpaul D_TRUNC_PROTO, /* trunc() prototype mismatch */ 22755992Swpaul D_TRUNC_SCALAR, /* trunc() value must be scalar */ 22855992Swpaul D_TRUNC_AGGARG, /* aggregation arg type mismatch */ 22955992Swpaul D_TRUNC_AGGBAD, /* trunc() aggregation not def. */ 23055992Swpaul D_PROV_BADNAME, /* invalid provider name */ 23155992Swpaul D_PROV_INCOMPAT, /* provider/probe interface mismatch */ 23255992Swpaul D_PROV_PRDUP, /* duplicate probe declaration */ 23355992Swpaul D_PROV_PRARGLEN, /* probe argument list too long */ 23455992Swpaul D_PROV_PRXLATOR, /* probe argument translator missing */ 23555992Swpaul D_FREOPEN_INVALID, /* frename() filename is invalid */ 23655992Swpaul D_LQUANT_MATCHBASE, /* lquantize() mismatch on base */ 23755992Swpaul D_LQUANT_MATCHLIM, /* lquantize() mismatch on limit */ 23855992Swpaul D_LQUANT_MATCHSTEP, /* lquantize() mismatch on step */ 23955992Swpaul D_LLQUANT_FACTORTYPE, /* llquantize() bad magnitude type */ 24055992Swpaul D_LLQUANT_FACTORVAL, /* llquantize() bad magnitude value */ 24155992Swpaul D_LLQUANT_FACTORMATCH, /* llquantize() mismatch on magnitude */ 24255992Swpaul D_LLQUANT_LOWTYPE, /* llquantize() bad low mag type */ 24355992Swpaul D_LLQUANT_LOWVAL, /* llquantize() bad low mag value */ 24455992Swpaul D_LLQUANT_LOWMATCH, /* llquantize() mismatch on low mag */ 24555992Swpaul D_LLQUANT_HIGHTYPE, /* llquantize() bad high mag type */ 24655992Swpaul D_LLQUANT_HIGHVAL, /* llquantize() bad high mag value */ 247119156Sambrisko D_LLQUANT_HIGHMATCH, /* llquantize() mismatch on high mag */ 24855992Swpaul D_LLQUANT_NSTEPTYPE, /* llquantize() bad # steps type */ 24955992Swpaul D_LLQUANT_NSTEPVAL, /* llquantize() bad # steps value */ 25055992Swpaul D_LLQUANT_NSTEPMATCH, /* llquantize() mismatch on # steps */ 25155992Swpaul D_LLQUANT_MAGRANGE, /* llquantize() bad magnitude range */ 25255992Swpaul D_LLQUANT_FACTORNSTEPS, /* llquantize() # steps < factor */ 25355992Swpaul D_LLQUANT_FACTOREVEN, /* llquantize() bad # steps/factor */ 25455992Swpaul D_LLQUANT_FACTORSMALL, /* llquantize() magnitude too small */ 25555992Swpaul D_LLQUANT_MAGTOOBIG, /* llquantize() high mag too large */ 25655992Swpaul D_PRINTM_ADDR, /* printm() memref bad type */ 25755992Swpaul D_PRINTM_SIZE, /* printm() size bad type */ 25855992Swpaul D_PRINTT_ADDR, /* printt() typeref bad type */ 25955992Swpaul D_PRINTT_SIZE /* printt() size bad type */ 26055992Swpaul} dt_errtag_t; 26155992Swpaul 26255992Swpaulextern const char *dt_errtag(dt_errtag_t); 26355992Swpaul 26455992Swpaul#ifdef __cplusplus 26555992Swpaul} 26655992Swpaul#endif 26755992Swpaul 26855992Swpaul#endif /* _DT_ERRTAGS_H */ 26955992Swpaul