3 Copyright (C
) 1992-2023 Free Software Foundation
, Inc.
5 This file is part of GDB.
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.
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.
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
/>.
*/
20 OP (TYPE_CODE_PTR
) /**< Pointer type
*/
22 /* * Array type with lower
& upper bounds.
24 Regardless of the language
, GDB represents multidimensional
25 array types the way C does
: as arrays of arrays. So an
26 instance of a GDB array type T can always be seen as a series
27 of instances of T
->target_type () laid out sequentially in
30 Row
-major languages like C lay out multi
-dimensional arrays so
31 that incrementing the rightmost index in a subscripting
32 expression results in the smallest change in the address of the
33 element referred to. Column
-major languages like Fortran lay
34 them out so that incrementing the leftmost index results in the
37 This means that
, in column
-major languages
, working our way
38 from type to target type corresponds to working through indices
39 from right to left
, not left to right.
*/
42 OP (TYPE_CODE_STRUCT
) /**< C struct or Pascal record
*/
43 OP (TYPE_CODE_UNION
) /**< C union or Pascal variant part
*/
44 OP (TYPE_CODE_ENUM
) /**< Enumeration type
*/
45 OP (TYPE_CODE_FLAGS
) /**< Bit flags type
*/
46 OP (TYPE_CODE_FUNC
) /**< Function type
*/
47 OP (TYPE_CODE_INT
) /**< Integer type
*/
49 /* * Floating type. This is
*NOT* a complex type.
*/
52 /* * Void type. The length field specifies the
length (probably
53 always one
) which is used in pointer arithmetic involving
54 pointers to this type
, but actually dereferencing such a
55 pointer is invalid
; a void type has no length and no actual
56 representation in memory or registers. A pointer to a void
57 type is a generic pointer.
*/
60 OP (TYPE_CODE_SET
) /**< Pascal sets
*/
61 OP (TYPE_CODE_RANGE
) /**< Range (integers within spec
'd bounds). */
63 /* * A string type which is like an array of character but prints
64 differently. It does not contain a length field as Pascal
65 strings (for many Pascals, anyway) do; if we want to deal with
66 such strings, we should use a new type code. */
69 /* * Unknown type. The length field is valid if we were able to
70 deduce that much about the type, or 0 if we don't even know
75 OP (TYPE_CODE_METHOD
) /**< Method type
*/
77 /* * Pointer
-to
-member
-function type. This describes how to access a
78 particular member function of a
class (possibly a virtual
79 member function
). The representation may vary between different
81 OP (TYPE_CODE_METHODPTR
)
83 /* * Pointer
-to
-member type. This is the offset within a class to
84 some particular data member. The only currently supported
85 representation uses an unbiased offset
, with
-1 representing
86 NULL
; this is used by the Itanium C
++ ABI (used by GCC on all
88 OP (TYPE_CODE_MEMBERPTR
)
90 OP (TYPE_CODE_REF
) /**< C
++ Reference types
*/
92 OP (TYPE_CODE_RVALUE_REF
) /**< C
++ rvalue reference types
*/
94 OP (TYPE_CODE_CHAR
) /**< *real
* character type
*/
96 /* * Boolean type.
0 is false
, 1 is true
, and other values are
97 non
-boolean (e.g. FORTRAN
"logical" used as unsigned int
).
*/
101 OP (TYPE_CODE_COMPLEX
) /**< Complex float
*/
103 OP (TYPE_CODE_TYPEDEF
)
105 OP (TYPE_CODE_NAMESPACE
) /**< C
++ namespace.
*/
107 OP (TYPE_CODE_DECFLOAT
) /**< Decimal floating point.
*/
109 OP (TYPE_CODE_MODULE
) /**< Fortran module.
*/
111 /* * Internal function type.
*/
112 OP (TYPE_CODE_INTERNAL_FUNCTION
)
114 /* * Methods implemented in extension languages.
*/
115 OP (TYPE_CODE_XMETHOD
)
117 /* * Fixed Point type.
*/
118 OP (TYPE_CODE_FIXED_POINT
)
120 /* * Fortran namelist is a group of variables or arrays that can be
123 Namelist syntax
: NAMELIST
/ groupname
/ namelist_items ...
124 NAMELIST statement assign a group name to a collection of variables
125 called as namelist items. The namelist items can be of any data type
126 and can be variables or arrays.
128 Compiler emit DW_TAG_namelist for group name and DW_TAG_namelist_item
129 for each of the namelist items. GDB process these namelist dies
130 and print namelist variables during print and ptype commands.
*/
131 OP (TYPE_CODE_NAMELIST
)