Remove operator BINOP_IN
[deliverable/binutils-gdb.git] / gdb / std-operator.def
CommitLineData
56c12414
JK
1/* Standard language operator definitions for GDB, the GNU debugger.
2
ecd75fc8 3 Copyright (C) 1986-2014 Free Software Foundation, Inc.
56c12414
JK
4
5 This file is part of GDB.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20/* Used when it's necessary to pass an opcode which will be ignored,
21 or to catch uninitialized values. */
22OP (OP_NULL)
23
24/* BINOP_... operate on two values computed by following subexpressions,
25replacing them by one result value. They take no immediate arguments. */
26
27OP (BINOP_ADD) /* + */
28OP (BINOP_SUB) /* - */
29OP (BINOP_MUL) /* * */
30OP (BINOP_DIV) /* / */
31OP (BINOP_REM) /* % */
32OP (BINOP_MOD) /* mod (Knuth 1.2.4) */
33OP (BINOP_LSH) /* << */
34OP (BINOP_RSH) /* >> */
35OP (BINOP_LOGICAL_AND) /* && */
36OP (BINOP_LOGICAL_OR) /* || */
37OP (BINOP_BITWISE_AND) /* & */
38OP (BINOP_BITWISE_IOR) /* | */
39OP (BINOP_BITWISE_XOR) /* ^ */
40OP (BINOP_EQUAL) /* == */
41OP (BINOP_NOTEQUAL) /* != */
42OP (BINOP_LESS) /* < */
43OP (BINOP_GTR) /* > */
44OP (BINOP_LEQ) /* <= */
45OP (BINOP_GEQ) /* >= */
46OP (BINOP_REPEAT) /* @ */
47OP (BINOP_ASSIGN) /* = */
48OP (BINOP_COMMA) /* , */
49OP (BINOP_SUBSCRIPT) /* x[y] */
50OP (BINOP_EXP) /* Exponentiation */
51
52/* C++. */
53
54OP (BINOP_MIN) /* <? */
55OP (BINOP_MAX) /* >? */
56
57/* STRUCTOP_MEMBER is used for pointer-to-member constructs.
58 X . * Y translates into X STRUCTOP_MEMBER Y. */
59OP (STRUCTOP_MEMBER)
60
61/* STRUCTOP_MPTR is used for pointer-to-member constructs
62 when X is a pointer instead of an aggregate. */
63OP (STRUCTOP_MPTR)
64
65/* TYPE_INSTANCE is used when the user specifies a specific
66 type instantiation for overloaded methods/functions.
67
68 The format is:
69 TYPE_INSTANCE num_types type0 ... typeN num_types TYPE_INSTANCE. */
70OP (TYPE_INSTANCE)
71
72/* end of C++. */
73
74/* For Modula-2 integer division DIV. */
75OP (BINOP_INTDIV)
76
77/* +=, -=, *=, and so on. The following exp_element is another opcode,
78 a BINOP_, saying how to modify. Then comes another BINOP_ASSIGN_MODIFY,
79 making three exp_elements in total. */
80OP (BINOP_ASSIGN_MODIFY)
81
82/* Modula-2 standard (binary) procedures. */
83OP (BINOP_VAL)
84
85/* Concatenate two operands, such as character strings or bitstrings.
86 If the first operand is a integer expression, then it means concatenate
87 the second operand with itself that many times. */
88OP (BINOP_CONCAT)
89
56c12414
JK
90/* This is the "colon operator" used various places in (the
91 deleted) Chill. */
92OP (BINOP_RANGE)
93
94/* This must be the highest BINOP_ value, for expprint.c. */
95OP (BINOP_END)
96
97/* Operates on three values computed by following subexpressions. */
98OP (TERNOP_COND) /* ?: */
99
100/* A sub-string/sub-array. (the deleted) Chill syntax:
101 OP1(OP2:OP3). Return elements OP2 through OP3 of OP1. */
102OP (TERNOP_SLICE)
103
56c12414
JK
104/* Multidimensional subscript operator, such as Modula-2 x[a,b,...].
105 The dimensionality is encoded in the operator, like the number of
106 function arguments in OP_FUNCALL, I.E. <OP><dimension><OP>.
107 The value of the first following subexpression is subscripted
108 by each of the next following subexpressions, one per dimension. */
109OP (MULTI_SUBSCRIPT)
110
111/* The OP_... series take immediate following arguments.
112 After the arguments come another OP_... (the same one)
113 so that the grouping can be recognized from the end. */
114
115/* OP_LONG is followed by a type pointer in the next exp_element
116 and the long constant value in the following exp_element.
117 Then comes another OP_LONG.
118 Thus, the operation occupies four exp_elements. */
119OP (OP_LONG)
120
121/* OP_DOUBLE is similar but takes a DOUBLEST constant instead of a
122 long. */
123OP (OP_DOUBLE)
124
125/* OP_VAR_VALUE takes one struct block * in the following element,
126 and one struct symbol * in the following exp_element, followed
127 by another OP_VAR_VALUE, making four exp_elements. If the
128 block is non-NULL, evaluate the symbol relative to the
129 innermost frame executing in that block; if the block is NULL
130 use the selected frame. */
131OP (OP_VAR_VALUE)
132
36b11add
JK
133/* OP_VAR_ENTRY_VALUE takes one struct symbol * in the following element,
134 followed by another OP_VAR_ENTRY_VALUE, making three exp_elements.
135 somename@entry may mean parameter value as present at the entry of the
136 current function. Implemented via DW_OP_GNU_entry_value. */
137OP (OP_VAR_ENTRY_VALUE)
138
56c12414
JK
139/* OP_LAST is followed by an integer in the next exp_element.
140 The integer is zero for the last value printed,
141 or it is the absolute number of a history element.
142 With another OP_LAST at the end, this makes three exp_elements. */
143OP (OP_LAST)
144
145/* OP_REGISTER is followed by a string in the next exp_element.
146 This is the name of a register to fetch. */
147OP (OP_REGISTER)
148
149/* OP_INTERNALVAR is followed by an internalvar ptr in the next
150 exp_element. With another OP_INTERNALVAR at the end, this
151 makes three exp_elements. */
152OP (OP_INTERNALVAR)
153
154/* OP_FUNCALL is followed by an integer in the next exp_element.
155 The integer is the number of args to the function call.
156 That many plus one values from following subexpressions
157 are used, the first one being the function.
158 The integer is followed by a repeat of OP_FUNCALL,
159 making three exp_elements. */
160OP (OP_FUNCALL)
161
162/* OP_OBJC_MSGCALL is followed by a string in the next exp_element
163 and then an integer. The string is the selector string. The
164 integer is the number of arguments to the message call. That
165 many plus one values are used, the first one being the object
166 pointer. This is an Objective C message. */
167OP (OP_OBJC_MSGCALL)
168
169/* This is EXACTLY like OP_FUNCALL but is semantically different.
170 In F77, array subscript expressions, substring expressions and
171 function calls are all exactly the same syntactically. They
172 may only be disambiguated at runtime. Thus this operator,
173 which indicates that we have found something of the form
174 <name> ( <stuff> ). */
175OP (OP_F77_UNDETERMINED_ARGLIST)
176
177/* OP_COMPLEX takes a type in the following element, followed by another
178 OP_COMPLEX, making three exp_elements. It is followed by two double
179 args, and converts them into a complex number of the given type. */
180OP (OP_COMPLEX)
181
182/* OP_STRING represents a string constant.
183 Its format is the same as that of a STRUCTOP, but the string
184 data is just made into a string constant when the operation
185 is executed. */
186OP (OP_STRING)
187
56c12414
JK
188/* OP_ARRAY creates an array constant out of the following subexpressions.
189 It is followed by two exp_elements, the first containing an integer
190 that is the lower bound of the array and the second containing another
191 integer that is the upper bound of the array. The second integer is
192 followed by a repeat of OP_ARRAY, making four exp_elements total.
193 The bounds are used to compute the number of following subexpressions
194 to consume, as well as setting the bounds in the created array constant.
195 The type of the elements is taken from the type of the first subexp,
196 and they must all match. */
197OP (OP_ARRAY)
198
199/* UNOP_CAST is followed by a type pointer in the next exp_element.
200 With another UNOP_CAST at the end, this makes three exp_elements.
201 It casts the value of the following subexpression. */
202OP (UNOP_CAST)
203
9eaf6705
TT
204/* Like UNOP_CAST, but the type is a subexpression. */
205OP (UNOP_CAST_TYPE)
206
56c12414
JK
207/* The C++ dynamic_cast operator. */
208OP (UNOP_DYNAMIC_CAST)
209
210/* The C++ reinterpret_cast operator. */
211OP (UNOP_REINTERPRET_CAST)
212
213/* UNOP_MEMVAL is followed by a type pointer in the next exp_element
214 With another UNOP_MEMVAL at the end, this makes three exp_elements.
215 It casts the contents of the word addressed by the value of the
216 following subexpression. */
217OP (UNOP_MEMVAL)
218
219/* UNOP_MEMVAL_TLS is followed by a `struct objfile' pointer in the next
220 exp_element and a type pointer in the following exp_element.
221 With another UNOP_MEMVAL_TLS at the end, this makes four exp_elements.
222 It casts the contents of the word offsetted by the value of the
223 following subexpression from the TLS specified by `struct objfile'. */
224OP (UNOP_MEMVAL_TLS)
225
9eaf6705
TT
226/* Like UNOP_MEMVAL, but the type is supplied as a subexpression. */
227OP (UNOP_MEMVAL_TYPE)
228
56c12414
JK
229/* UNOP_... operate on one value from a following subexpression
230 and replace it with a result. They take no immediate arguments. */
231
232OP (UNOP_NEG) /* Unary - */
233OP (UNOP_LOGICAL_NOT) /* Unary ! */
234OP (UNOP_COMPLEMENT) /* Unary ~ */
235OP (UNOP_IND) /* Unary * */
236OP (UNOP_ADDR) /* Unary & */
237OP (UNOP_PREINCREMENT) /* ++ before an expression */
238OP (UNOP_POSTINCREMENT) /* ++ after an expression */
239OP (UNOP_PREDECREMENT) /* -- before an expression */
240OP (UNOP_POSTDECREMENT) /* -- after an expression */
241OP (UNOP_SIZEOF) /* Unary sizeof (followed by expression) */
242
243OP (UNOP_PLUS) /* Unary plus */
244
245OP (UNOP_CAP) /* Modula-2 standard (unary) procedures */
246OP (UNOP_CHR)
247OP (UNOP_ORD)
248OP (UNOP_ABS)
249OP (UNOP_FLOAT)
250OP (UNOP_HIGH)
251OP (UNOP_MAX)
252OP (UNOP_MIN)
253OP (UNOP_ODD)
254OP (UNOP_TRUNC)
255
256OP (OP_BOOL) /* Modula-2 builtin BOOLEAN type */
257OP (OP_M2_STRING) /* Modula-2 string constants */
258
259/* STRUCTOP_... operate on a value from a following subexpression
260 by extracting a structure component specified by a string
261 that appears in the following exp_elements (as many as needed).
262 STRUCTOP_STRUCT is used for "." and STRUCTOP_PTR for "->".
263 They differ only in the error message given in case the value is
264 not suitable or the structure component specified is not found.
265
266 The length of the string follows the opcode, followed by
267 BYTES_TO_EXP_ELEM(length) elements containing the data of the
268 string, followed by the length again and the opcode again. */
269
270OP (STRUCTOP_STRUCT)
271OP (STRUCTOP_PTR)
272
273/* C++: OP_THIS is just a placeholder for the class instance variable.
274 It just comes in a tight (OP_THIS, OP_THIS) pair. */
275OP (OP_THIS)
276
56c12414
JK
277/* Objective C: "@selector" pseudo-operator. */
278OP (OP_OBJC_SELECTOR)
279
280/* OP_SCOPE surrounds a type name and a field name. The type
281 name is encoded as one element, but the field name stays as
282 a string, which, of course, is variable length. */
283OP (OP_SCOPE)
284
56c12414
JK
285/* OP_TYPE is for parsing types, and used with the "ptype" command
286 so we can look up types that are qualified by scope, either with
287 the GDB "::" operator, or the Modula-2 '.' operator. */
288OP (OP_TYPE)
289
290/* An un-looked-up identifier. */
291OP (OP_NAME)
292
293/* An Objective C Foundation Class NSString constant. */
294OP (OP_OBJC_NSSTRING)
295
296/* A F90 array range operator (for "exp:exp", "exp:", ":exp" and ":"). */
297OP (OP_F90_RANGE)
298
299/* OP_DECFLOAT is followed by a type pointer in the next exp_element
300 and a dec long constant value in the following exp_element.
301 Then comes another OP_DECFLOAT. */
302OP (OP_DECFLOAT)
303
304/* OP_ADL_FUNC specifies that the function is to be looked up in an
305 Argument Dependent manner (Koenig lookup). */
306OP (OP_ADL_FUNC)
608b4967
TT
307
308/* The typeof operator. This has one expression argument, which is
309 evaluated solely for its type. */
310OP (OP_TYPEOF)
311
312/* The decltype operator. This has one expression argument, which is
313 evaluated solely for its type. This is similar to typeof, but has
314 slight different semantics. */
315OP (OP_DECLTYPE)
6e72ca20
TT
316
317/* The typeid operator. This has one expression argument. */
318OP (OP_TYPEID)
This page took 0.640684 seconds and 4 git commands to generate.