X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gdb%2Fstd-operator.def;h=1297c1edeb1ef3881e0a32aa8b92761efc095718;hb=15146ff7370d5abad01dbecfacb0bf0e66a93cd6;hp=9c6a01be329485261516f820f18d5b0517afa91f;hpb=9eaf670568f57fc78fe40d30fc89ac5b442693fb;p=external%2Fbinutils.git diff --git a/gdb/std-operator.def b/gdb/std-operator.def index 9c6a01b..1297c1e 100644 --- a/gdb/std-operator.def +++ b/gdb/std-operator.def @@ -1,7 +1,6 @@ /* Standard language operator definitions for GDB, the GNU debugger. - Copyright (C) 1986, 1989, 1992, 1994, 2000, 2003, 2005, 2007-2012 - Free Software Foundation, Inc. + Copyright (C) 1986-2018 Free Software Foundation, Inc. This file is part of GDB. @@ -88,28 +87,16 @@ OP (BINOP_VAL) the second operand with itself that many times. */ OP (BINOP_CONCAT) -/* For (the deleted) Chill and Pascal. */ -OP (BINOP_IN) /* Returns 1 iff ARG1 IN ARG2. */ - -/* This is the "colon operator" used various places in (the - deleted) Chill. */ -OP (BINOP_RANGE) - /* This must be the highest BINOP_ value, for expprint.c. */ OP (BINOP_END) /* Operates on three values computed by following subexpressions. */ OP (TERNOP_COND) /* ?: */ -/* A sub-string/sub-array. (the deleted) Chill syntax: - OP1(OP2:OP3). Return elements OP2 through OP3 of OP1. */ +/* A sub-string/sub-array. Ada syntax: OP1(OP2..OP3). Return + elements OP2 through OP3 of OP1. */ OP (TERNOP_SLICE) -/* A sub-string/sub-array. (The deleted) Chill syntax: OP1(OP2 UP - OP3). Return OP3 elements of OP1, starting with element - OP2. */ -OP (TERNOP_SLICE_COUNT) - /* Multidimensional subscript operator, such as Modula-2 x[a,b,...]. The dimensionality is encoded in the operator, like the number of function arguments in OP_FUNCALL, I.E. . @@ -127,9 +114,9 @@ OP (MULTI_SUBSCRIPT) Thus, the operation occupies four exp_elements. */ OP (OP_LONG) -/* OP_DOUBLE is similar but takes a DOUBLEST constant instead of a - long. */ -OP (OP_DOUBLE) +/* OP_FLOAT is similar but takes a floating-point constant encoded in + the target format for the given type instead of a long. */ +OP (OP_FLOAT) /* OP_VAR_VALUE takes one struct block * in the following element, and one struct symbol * in the following exp_element, followed @@ -142,9 +129,15 @@ OP (OP_VAR_VALUE) /* OP_VAR_ENTRY_VALUE takes one struct symbol * in the following element, followed by another OP_VAR_ENTRY_VALUE, making three exp_elements. somename@entry may mean parameter value as present at the entry of the - current function. Implemented via DW_OP_GNU_entry_value. */ + current function. Implemented via DW_OP_entry_value. */ OP (OP_VAR_ENTRY_VALUE) +/* OP_VAR_MSYM_VALUE takes one struct objfile * in the following + element, and one struct minimal_symbol * in the following + exp_element, followed by another OP_VAR_MSYM_VALUE, making four + exp_elements. */ +OP (OP_VAR_MSYM_VALUE) + /* OP_LAST is followed by an integer in the next exp_element. The integer is zero for the last value printed, or it is the absolute number of a history element. @@ -194,12 +187,6 @@ OP (OP_COMPLEX) is executed. */ OP (OP_STRING) -/* OP_BITSTRING represents a packed bitstring constant. - Its format is the same as that of a STRUCTOP, but the bitstring - data is just made into a bitstring constant when the operation - is executed. */ -OP (OP_BITSTRING) - /* OP_ARRAY creates an array constant out of the following subexpressions. It is followed by two exp_elements, the first containing an integer that is the lower bound of the array and the second containing another @@ -231,13 +218,6 @@ OP (UNOP_REINTERPRET_CAST) following subexpression. */ OP (UNOP_MEMVAL) -/* UNOP_MEMVAL_TLS is followed by a `struct objfile' pointer in the next - exp_element and a type pointer in the following exp_element. - With another UNOP_MEMVAL_TLS at the end, this makes four exp_elements. - It casts the contents of the word offsetted by the value of the - following subexpression from the TLS specified by `struct objfile'. */ -OP (UNOP_MEMVAL_TLS) - /* Like UNOP_MEMVAL, but the type is supplied as a subexpression. */ OP (UNOP_MEMVAL_TYPE) @@ -254,6 +234,7 @@ OP (UNOP_POSTINCREMENT) /* ++ after an expression */ OP (UNOP_PREDECREMENT) /* -- before an expression */ OP (UNOP_POSTDECREMENT) /* -- after an expression */ OP (UNOP_SIZEOF) /* Unary sizeof (followed by expression) */ +OP (UNOP_ALIGNOF) /* Unary alignof (followed by expression) */ OP (UNOP_PLUS) /* Unary plus */ @@ -285,6 +266,9 @@ OP (OP_M2_STRING) /* Modula-2 string constants */ OP (STRUCTOP_STRUCT) OP (STRUCTOP_PTR) +/* Anonymous field access, e.g. "foo.3". Used in Rust. */ +OP (STRUCTOP_ANONYMOUS) + /* C++: OP_THIS is just a placeholder for the class instance variable. It just comes in a tight (OP_THIS, OP_THIS) pair. */ OP (OP_THIS) @@ -297,18 +281,35 @@ OP (OP_OBJC_SELECTOR) a string, which, of course, is variable length. */ OP (OP_SCOPE) -/* Used to represent named structure field values in brace - initializers (or tuples as they are called in (the deleted) - Chill). +/* OP_FUNC_STATIC_VAR refers to a function local static variable. The + function is taken from the following subexpression. The length of + the variable name as a string follows the opcode, followed by + BYTES_TO_EXP_ELEM(length) elements containing the data of the + string, followed by the length again and the opcode again. + + Note this is used by C++, but not C. The C parser handles local + static variables in the parser directly. Also, this is only used + in C++ if the function/method name is not quoted, like e.g.: - The gcc C syntax is NAME:VALUE or .NAME=VALUE, the (the - deleted) Chill syntax is .NAME:VALUE. Multiple labels (as in - the (the deleted) Chill syntax .NAME1,.NAME2:VALUE) is - represented as if it were .NAME1:(.NAME2:VALUE) (though that is - not valid (the deleted) Chill syntax). + p S:method()::var + p S:method() const::var - The NAME is represented as for STRUCTOP_STRUCT; VALUE follows. */ -OP (OP_LABELED) + If the function/method is quoted like instead: + + p 'S:method() const'::var + + then the C-specific handling directly in the parser takes over (see + "block/variable productions). + + Also, if the whole function+var is quoted like this: + + p 'S:method() const::var' + + then the whole quoted expression is interpreted as a single symbol + name and we don't use OP_FUNC_STATIC_VAR either. In that case, the + C++-specific symbol lookup routines take care of the + function-local-static search. */ +OP (OP_FUNC_STATIC_VAR) /* OP_TYPE is for parsing types, and used with the "ptype" command so we can look up types that are qualified by scope, either with @@ -321,14 +322,26 @@ OP (OP_NAME) /* An Objective C Foundation Class NSString constant. */ OP (OP_OBJC_NSSTRING) -/* A F90 array range operator (for "exp:exp", "exp:", ":exp" and ":"). */ -OP (OP_F90_RANGE) - -/* OP_DECFLOAT is followed by a type pointer in the next exp_element - and a dec long constant value in the following exp_element. - Then comes another OP_DECFLOAT. */ -OP (OP_DECFLOAT) +/* An array range operator (in Fortran 90, for "exp:exp", "exp:", + ":exp" and ":"). */ +OP (OP_RANGE) /* OP_ADL_FUNC specifies that the function is to be looked up in an Argument Dependent manner (Koenig lookup). */ OP (OP_ADL_FUNC) + +/* The typeof operator. This has one expression argument, which is + evaluated solely for its type. */ +OP (OP_TYPEOF) + +/* The decltype operator. This has one expression argument, which is + evaluated solely for its type. This is similar to typeof, but has + slight different semantics. */ +OP (OP_DECLTYPE) + +/* The typeid operator. This has one expression argument. */ +OP (OP_TYPEID) + +/* This is used for the Rust [expr; N] form of array construction. It + takes two expression arguments. */ +OP (OP_RUST_ARRAY)