This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
pending/985: [RFA] add ada expression types to expression.h
- From: Aidan Skinner <aidan at velvet dot net>
- To: gdb-gnats at sources dot redhat dot com
- Date: 30 Nov 2002 03:01:09 +0000
- Subject: pending/985: [RFA] add ada expression types to expression.h
>Number: 985
>Category: pending
>Synopsis: [RFA] add ada expression types to expression.h
>Confidential: yes
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: change-request
>Submitter-Id: unknown
>Arrival-Date: Fri Jan 31 05:08:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:
>Release:
>Organization:
>Environment:
>Description:
--=-xazbreGxjdOl8aM7dS2y
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
This is part of the ada-gdb merge. It had been discussed previously
(http://sources.redhat.com/ml/gdb-patches/2002-09/msg00237.html) but
languished due to lack of time on my part, and needed to be tweaked a
bit, so I'm resubmitting it.
Cheers.
- Aidan
--
aidan@velvet.net http://www.velvet.net/~aidan/ aim:aidans42
http://www.livejournal.com/users/aidan_skinner/
finger for pgp key: 01AA 1594 2DB0 09E3 B850 C2D0 9A2C 4CC9 3EC4 75E1
--=-xazbreGxjdOl8aM7dS2y
Content-Disposition: attachment; filename=gdb-exp.h.patch
Content-Type: text/x-patch; name=gdb-exp.h.patch; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Index: expression.h
===================================================================
RCS file: /cvs/src/src/gdb/expression.h,v
retrieving revision 1.6
diff -u -r1.6 expression.h
--- expression.h 19 Sep 2002 03:58:41 -0000 1.6
+++ expression.h 22 Sep 2002 17:13:14 -0000
@@ -90,6 +90,10 @@
/* end of C++. */
+ /* Ada: exp IN exp'RANGE(N). N is an immediate operand, surrounded by
+ BINOP_MEMBER_OF before and after. */
+ BINOP_MEMBER_OF,
+
/* For Modula-2 integer division DIV */
BINOP_INTDIV,
@@ -131,6 +135,9 @@
element OP2. */
TERNOP_SLICE_COUNT,
+ /* Ada: exp IN exp .. exp */
+ TERNOP_MEMBER_OF,
+
/* 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. <OP><dimension><OP>.
@@ -158,6 +165,17 @@
executing in that block; if the block is NULL use the selected frame. */
OP_VAR_VALUE,
+ /* OP_UNRESOLVED_VALUE takes a single struct block* and a char* in the
+ following exp_elements, followed by another OP_UNRESOLVED_VALUE. The
+ block indicates where to begin looking for matching symbols.
+ This is for use with overloaded names in Ada, and must
+ be resolved into an OP_VAR_VALUE before evaluation in EVAL_NORMAL
+ mode. When evaluated in EVAL_AVOID_SIDE_EFFECTS mode, it is
+ resolved (if possible) to an OP_VAR_VALUE entry, with its block and
+ symbol entries replaced by the block and symbol from the resolving
+ entry. */
+ OP_UNRESOLVED_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.
@@ -192,6 +210,14 @@
literal. It is followed by exactly two args that are doubles. */
OP_COMPLEX,
+ /* Ada attribute call. OP_ADA_ATTRIBUTE is followed by an integer in the
+ next exp_element, which is the number of extra arguments to the attribute
+ (thus, x'tag would specify 0, whereas x'length would specify 1).
+ The integer is followed by another integer indicating the identity of
+ the attribute (of type enum ada_attribute, see ada-lang.h), and then
+ by a repeat of OP_ADA_ATTRIBUTE */
+ OP_ADA_ATTRIBUTE,
+
/* OP_STRING represents a string constant.
Its format is the same as that of a STRUCTOP, but the string
data is just made into a string constant when the operation
@@ -220,6 +246,10 @@
It casts the value of the following subexpression. */
UNOP_CAST,
+ /* UNOP_QUAL is Ada type qualification. It is encoded as for
+ UNOP_CAST, above, and denotes the TYPE'(EXPR) construct. */
+ UNOP_QUAL,
+
/* UNOP_MEMVAL is followed by a type pointer in the next exp_element
With another UNOP_MEMVAL at the end, this makes three exp_elements.
It casts the contents of the word addressed by the value of the
@@ -256,4 +286,8 @@
/* (OBSOLETE) Chill (OBSOLETE) builtin functions. */
UNOP_LOWER, UNOP_UPPER, UNOP_LENGTH, UNOP_CARD, UNOP_CHMAX, UNOP_CHMIN,
+ /* Ada: exp IN type. The `type' argument is immediate, with UNOP_MEMBER_OF
+ before and after it. */
+ UNOP_MEMBER_OF,
+
OP_BOOL, /* Modula-2 builtin BOOLEAN type */
OP_M2_STRING, /* Modula-2 string constants */
--=-xazbreGxjdOl8aM7dS2y--
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: