GDB (xrefs)
Loading...
Searching...
No Matches
/tmp/gdb-13.1/gdb/ada-exp.h
Go to the documentation of this file.
1/* Definitions for Ada expressions
2
3 Copyright (C) 2020-2023 Free Software Foundation, Inc.
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#ifndef ADA_EXP_H
21#define ADA_EXP_H
22
23#include "expop.h"
24
25extern struct value *ada_unop_neg (struct type *expect_type,
26 struct expression *exp,
27 enum noside noside, enum exp_opcode op,
28 struct value *arg1);
29extern struct value *ada_atr_tag (struct type *expect_type,
30 struct expression *exp,
31 enum noside noside, enum exp_opcode op,
32 struct value *arg1);
33extern struct value *ada_atr_size (struct type *expect_type,
34 struct expression *exp,
35 enum noside noside, enum exp_opcode op,
36 struct value *arg1);
37extern struct value *ada_abs (struct type *expect_type,
38 struct expression *exp,
39 enum noside noside, enum exp_opcode op,
40 struct value *arg1);
41extern struct value *ada_unop_in_range (struct type *expect_type,
42 struct expression *exp,
43 enum noside noside, enum exp_opcode op,
44 struct value *arg1, struct type *type);
45extern struct value *ada_mult_binop (struct type *expect_type,
46 struct expression *exp,
47 enum noside noside, enum exp_opcode op,
48 struct value *arg1, struct value *arg2);
49extern struct value *ada_equal_binop (struct type *expect_type,
50 struct expression *exp,
51 enum noside noside, enum exp_opcode op,
52 struct value *arg1, struct value *arg2);
53extern struct value *ada_ternop_slice (struct expression *exp,
54 enum noside noside,
55 struct value *array,
56 struct value *low_bound_val,
57 struct value *high_bound_val);
58extern struct value *ada_binop_in_bounds (struct expression *exp,
59 enum noside noside,
60 struct value *arg1,
61 struct value *arg2,
62 int n);
63extern struct value *ada_binop_minmax (struct type *expect_type,
64 struct expression *exp,
65 enum noside noside, enum exp_opcode op,
66 struct value *arg1,
67 struct value *arg2);
68extern struct value *ada_pos_atr (struct type *expect_type,
69 struct expression *exp,
70 enum noside noside, enum exp_opcode op,
71 struct value *arg);
72extern struct value *ada_val_atr (enum noside noside, struct type *type,
73 struct value *arg);
74extern struct value *ada_binop_exp (struct type *expect_type,
75 struct expression *exp,
76 enum noside noside, enum exp_opcode op,
77 struct value *arg1, struct value *arg2);
78
79namespace expr
80{
81
82/* The base class for Ada type resolution. Ada operations that want
83 to participate in resolution implement this interface. */
85{
86 /* Resolve this object. EXP is the expression being resolved.
87 DEPROCEDURE_P is true if a symbol that refers to a zero-argument
88 function may be turned into a function call. PARSE_COMPLETION
89 and TRACKER are passed in from the parser context. CONTEXT_TYPE
90 is the expected type of the expression, or nullptr if none is
91 known. This method should return true if the operation should be
92 replaced by a function call with this object as the callee. */
93 virtual bool resolve (struct expression *exp,
94 bool deprocedure_p,
95 bool parse_completion,
97 struct type *context_type) = 0;
98
99 /* Possibly replace this object with some other expression object.
100 This is like 'resolve', but can return a replacement.
101
102 The default implementation calls 'resolve' and wraps this object
103 in a function call if that call returns true. OWNER is a
104 reference to the unique pointer that owns the 'this'; it can be
105 'move'd from to construct the replacement.
106
107 This should either return a new object, or OWNER -- never
108 nullptr. */
109
110 virtual operation_up replace (operation_up &&owner,
111 struct expression *exp,
112 bool deprocedure_p,
113 bool parse_completion,
115 struct type *context_type);
116};
117
118/* In Ada, some generic operations must be wrapped with a handler that
119 handles some Ada-specific type conversions. */
121 : public tuple_holding_operation<operation_up>
122{
123public:
124
126
127 value *evaluate (struct type *expect_type,
128 struct expression *exp,
129 enum noside noside) override;
130
131 enum exp_opcode opcode () const override
132 { return std::get<0> (m_storage)->opcode (); }
133};
134
135/* An Ada string constant. */
137 : public string_operation
138{
139public:
140
141 using string_operation::string_operation;
142
143 /* Return the underlying string. */
144 const char *get_name () const
145 {
146 return std::get<0> (m_storage).c_str ();
147 }
148
149 value *evaluate (struct type *expect_type,
150 struct expression *exp,
151 enum noside noside) override;
152};
153
154/* The Ada TYPE'(EXP) construct. */
156 : public tuple_holding_operation<operation_up, struct type *>
157{
158public:
159
161
162 value *evaluate (struct type *expect_type,
163 struct expression *exp,
164 enum noside noside) override;
165
166 enum exp_opcode opcode () const override
167 { return UNOP_QUAL; }
168};
169
170/* Ternary in-range operator. */
172 : public tuple_holding_operation<operation_up, operation_up, operation_up>
173{
174public:
175
177
178 value *evaluate (struct type *expect_type,
179 struct expression *exp,
180 enum noside noside) override;
181
182 enum exp_opcode opcode () const override
183 { return TERNOP_IN_RANGE; }
184};
185
191
192/* The in-range operation, given a type. */
194 : public tuple_holding_operation<operation_up, struct type *>
195{
196public:
197
199
200 value *evaluate (struct type *expect_type,
201 struct expression *exp,
202 enum noside noside) override
203 {
204 value *val = std::get<0> (m_storage)->evaluate (nullptr, exp, noside);
205 return ada_unop_in_range (expect_type, exp, noside, UNOP_IN_RANGE,
206 val, std::get<1> (m_storage));
207 }
208
209 enum exp_opcode opcode () const override
210 { return UNOP_IN_RANGE; }
211};
212
213/* The Ada + and - operators. */
215 : public tuple_holding_operation<enum exp_opcode, operation_up, operation_up>
216{
217public:
218
220
221 value *evaluate (struct type *expect_type,
222 struct expression *exp,
223 enum noside noside) override;
224
225 enum exp_opcode opcode () const override
226 { return std::get<0> (m_storage); }
227};
228
233
236
238
239/* Implement the equal and not-equal operations for Ada. */
241 : public tuple_holding_operation<enum exp_opcode, operation_up, operation_up>
242{
243public:
244
246
247 value *evaluate (struct type *expect_type,
248 struct expression *exp,
249 enum noside noside) override
250 {
251 value *arg1 = std::get<1> (m_storage)->evaluate (nullptr, exp, noside);
252 value *arg2 = std::get<2> (m_storage)->evaluate (value_type (arg1),
253 exp, noside);
254 return ada_equal_binop (expect_type, exp, noside, std::get<0> (m_storage),
255 arg1, arg2);
256 }
257
258 enum exp_opcode opcode () const override
259 { return std::get<0> (m_storage); }
260};
261
262/* Bitwise operators for Ada. */
263template<enum exp_opcode OP>
265 : public maybe_constant_operation<operation_up, operation_up>
266{
267public:
268
269 using maybe_constant_operation::maybe_constant_operation;
270
271 value *evaluate (struct type *expect_type,
272 struct expression *exp,
273 enum noside noside) override
274 {
275 value *lhs = std::get<0> (m_storage)->evaluate (nullptr, exp, noside);
276 value *rhs = std::get<1> (m_storage)->evaluate (nullptr, exp, noside);
277 value *result = eval_op_binary (expect_type, exp, noside, OP, lhs, rhs);
278 return value_cast (value_type (lhs), result);
279 }
280
281 enum exp_opcode opcode () const override
282 { return OP; }
283};
284
288
289/* Ada array- or string-slice operation. */
291 : public maybe_constant_operation<operation_up, operation_up, operation_up>,
292 public ada_resolvable
293{
294public:
295
296 using maybe_constant_operation::maybe_constant_operation;
297
298 value *evaluate (struct type *expect_type,
299 struct expression *exp,
300 enum noside noside) override
301 {
302 value *array = std::get<0> (m_storage)->evaluate (nullptr, exp, noside);
303 value *low = std::get<1> (m_storage)->evaluate (nullptr, exp, noside);
304 value *high = std::get<2> (m_storage)->evaluate (nullptr, exp, noside);
305 return ada_ternop_slice (exp, noside, array, low, high);
306 }
307
308 enum exp_opcode opcode () const override
309 { return TERNOP_SLICE; }
310
311 bool resolve (struct expression *exp,
312 bool deprocedure_p,
313 bool parse_completion,
315 struct type *context_type) override;
316};
317
318/* Implement BINOP_IN_BOUNDS for Ada. */
320 : public maybe_constant_operation<operation_up, operation_up, int>
321{
322public:
323
324 using maybe_constant_operation::maybe_constant_operation;
325
326 value *evaluate (struct type *expect_type,
327 struct expression *exp,
328 enum noside noside) override
329 {
330 value *arg1 = std::get<0> (m_storage)->evaluate (nullptr, exp, noside);
331 value *arg2 = std::get<1> (m_storage)->evaluate (nullptr, exp, noside);
332 return ada_binop_in_bounds (exp, noside, arg1, arg2,
333 std::get<2> (m_storage));
334 }
335
336 enum exp_opcode opcode () const override
337 { return BINOP_IN_BOUNDS; }
338};
339
340/* Implement several unary Ada OP_ATR_* operations. */
342 : public maybe_constant_operation<operation_up, enum exp_opcode, int>
343{
344public:
345
346 using maybe_constant_operation::maybe_constant_operation;
347
348 value *evaluate (struct type *expect_type,
349 struct expression *exp,
350 enum noside noside) override;
351
352 enum exp_opcode opcode () const override
353 { return std::get<1> (m_storage); }
354};
355
356/* Variant of var_value_operation for Ada. */
358 : public var_value_operation, public ada_resolvable
359{
360public:
361
362 using var_value_operation::var_value_operation;
363
364 value *evaluate (struct type *expect_type,
365 struct expression *exp,
366 enum noside noside) override;
367
368 value *evaluate_for_cast (struct type *expect_type,
369 struct expression *exp,
370 enum noside noside) override;
371
372 const block *get_block () const
373 { return std::get<0> (m_storage).block; }
374
375 bool resolve (struct expression *exp,
376 bool deprocedure_p,
377 bool parse_completion,
379 struct type *context_type) override;
380
381protected:
382
384};
385
386/* Variant of var_msym_value_operation for Ada. */
389{
390public:
391
392 using var_msym_value_operation::var_msym_value_operation;
393
394 value *evaluate_for_cast (struct type *expect_type,
395 struct expression *exp,
396 enum noside noside) override;
397
398protected:
399
401};
402
403/* Implement the Ada 'val attribute. */
405 : public tuple_holding_operation<struct type *, operation_up>
406{
407public:
408
410
411 value *evaluate (struct type *expect_type,
412 struct expression *exp,
413 enum noside noside) override;
414
415 enum exp_opcode opcode () const override
416 { return OP_ATR_VAL; }
417};
418
419/* The indirection operator for Ada. */
422{
423public:
424
425 using unop_ind_base_operation::unop_ind_base_operation;
426
427 value *evaluate (struct type *expect_type,
428 struct expression *exp,
429 enum noside noside) override;
430};
431
432/* Implement STRUCTOP_STRUCT for Ada. */
435{
436public:
437
438 using structop_base_operation::structop_base_operation;
439
440 value *evaluate (struct type *expect_type,
441 struct expression *exp,
442 enum noside noside) override;
443
444 enum exp_opcode opcode () const override
445 { return STRUCTOP_STRUCT; }
446
447 /* Set the completion prefix. */
448 void set_prefix (std::string &&prefix)
449 {
450 m_prefix = std::move (prefix);
451 }
452
453 bool complete (struct expression *exp, completion_tracker &tracker) override
454 {
455 return structop_base_operation::complete (exp, tracker, m_prefix.c_str ());
456 }
457
458 void dump (struct ui_file *stream, int depth) const override
459 {
460 structop_base_operation::dump (stream, depth);
461 dump_for_expression (stream, depth + 1, m_prefix);
462 }
463
464private:
465
466 /* We may need to provide a prefix to field name completion. See
467 ada-exp.y:find_completion_bounds for details. */
468 std::string m_prefix;
469};
470
471/* Function calls for Ada. */
473 : public tuple_holding_operation<operation_up, std::vector<operation_up>>,
474 public ada_resolvable
475{
476public:
477
479
480 value *evaluate (struct type *expect_type,
481 struct expression *exp,
482 enum noside noside) override;
483
484 bool resolve (struct expression *exp,
485 bool deprocedure_p,
486 bool parse_completion,
488 struct type *context_type) override;
489
490 enum exp_opcode opcode () const override
491 { return OP_FUNCALL; }
492};
493
494/* An Ada assignment operation. */
496 : public assign_operation
497{
498public:
499
500 using assign_operation::assign_operation;
501
502 value *evaluate (struct type *expect_type,
503 struct expression *exp,
504 enum noside noside) override;
505
506 enum exp_opcode opcode () const override
507 { return BINOP_ASSIGN; }
508};
509
510/* This abstract class represents a single component in an Ada
511 aggregate assignment. */
513{
514public:
515
516 /* Assign to LHS, which is part of CONTAINER. EXP is the expression
517 being evaluated. INDICES, LOW, and HIGH indicate which
518 sub-components have already been assigned; INDICES should be
519 updated by this call. */
520 virtual void assign (struct value *container,
521 struct value *lhs, struct expression *exp,
522 std::vector<LONGEST> &indices,
523 LONGEST low, LONGEST high) = 0;
524
525 /* Same as operation::uses_objfile. */
526 virtual bool uses_objfile (struct objfile *objfile) = 0;
527
528 /* Same as operation::dump. */
529 virtual void dump (ui_file *stream, int depth) = 0;
530
531 virtual ~ada_component () = default;
532
533protected:
534
535 ada_component () = default;
537};
538
539/* Unique pointer specialization for Ada assignment components. */
540typedef std::unique_ptr<ada_component> ada_component_up;
541
542/* An operation that holds a single component. */
544 : public tuple_holding_operation<ada_component_up>
545{
546public:
547
549
550 /* Assuming that LHS represents an lvalue having a record or array
551 type, evaluate an assignment of this aggregate's value to LHS.
552 CONTAINER is an lvalue containing LHS (possibly LHS itself).
553 Does not modify the inferior's memory, nor does it modify the
554 contents of LHS (unless == CONTAINER). Returns the modified
555 CONTAINER. */
556
557 value *assign_aggregate (struct value *container,
558 struct value *lhs,
559 struct expression *exp);
560
561 value *evaluate (struct type *expect_type,
562 struct expression *exp,
563 enum noside noside) override
564 {
565 error (_("Aggregates only allowed on the right of an assignment"));
566 }
567
568 enum exp_opcode opcode () const override
569 { return OP_AGGREGATE; }
570};
571
572/* A component holding a vector of other components to assign. */
574{
575public:
576
577 explicit ada_aggregate_component (std::vector<ada_component_up> &&components)
578 : m_components (std::move (components))
579 {
580 }
581
582 void assign (struct value *container,
583 struct value *lhs, struct expression *exp,
584 std::vector<LONGEST> &indices,
585 LONGEST low, LONGEST high) override;
586
587 bool uses_objfile (struct objfile *objfile) override;
588
589 void dump (ui_file *stream, int depth) override;
590
591private:
592
593 std::vector<ada_component_up> m_components;
594};
595
596/* A component that assigns according to a provided index (which is
597 relative to the "low" value). */
599{
600public:
601
603 : m_index (index),
604 m_op (std::move (op))
605 {
606 }
607
608 void assign (struct value *container,
609 struct value *lhs, struct expression *exp,
610 std::vector<LONGEST> &indices,
611 LONGEST low, LONGEST high) override;
612
613 bool uses_objfile (struct objfile *objfile) override;
614
615 void dump (ui_file *stream, int depth) override;
616
617private:
618
621};
622
623/* A component which handles an "others" clause. */
625{
626public:
627
629 : m_op (std::move (op))
630 {
631 }
632
633 void assign (struct value *container,
634 struct value *lhs, struct expression *exp,
635 std::vector<LONGEST> &indices,
636 LONGEST low, LONGEST high) override;
637
638 bool uses_objfile (struct objfile *objfile) override;
639
640 void dump (ui_file *stream, int depth) override;
641
642private:
643
645};
646
647/* An interface that represents an association that is used in
648 aggregate assignment. */
650{
651public:
652
653 /* Like ada_component::assign, but takes an operation as a
654 parameter. The operation is evaluated and then assigned into LHS
655 according to the rules of the concrete implementation. */
656 virtual void assign (struct value *container,
657 struct value *lhs,
658 struct expression *exp,
659 std::vector<LONGEST> &indices,
660 LONGEST low, LONGEST high,
661 operation_up &op) = 0;
662
663 /* Same as operation::uses_objfile. */
664 virtual bool uses_objfile (struct objfile *objfile) = 0;
665
666 /* Same as operation::dump. */
667 virtual void dump (ui_file *stream, int depth) = 0;
668
669 virtual ~ada_association () = default;
670
671protected:
672
673 ada_association () = default;
675};
676
677/* Unique pointer specialization for Ada assignment associations. */
678typedef std::unique_ptr<ada_association> ada_association_up;
679
680/* A component that holds a vector of associations and an operation.
681 The operation is re-evaluated for each choice. */
683{
684public:
685
687 : m_op (std::move (op))
688 {
689 }
690
691 /* Set the vector of associations. This is done separately from the
692 constructor because it was simpler for the implementation of the
693 parser. */
694 void set_associations (std::vector<ada_association_up> &&assoc)
695 {
696 m_assocs = std::move (assoc);
697 }
698
699 void assign (struct value *container,
700 struct value *lhs, struct expression *exp,
701 std::vector<LONGEST> &indices,
702 LONGEST low, LONGEST high) override;
703
704 bool uses_objfile (struct objfile *objfile) override;
705
706 void dump (ui_file *stream, int depth) override;
707
708private:
709
710 std::vector<ada_association_up> m_assocs;
712};
713
714/* An association that uses a discrete range. */
716{
717public:
718
720 : m_low (std::move (low)),
721 m_high (std::move (high))
722 {
723 }
724
725 void assign (struct value *container,
726 struct value *lhs, struct expression *exp,
727 std::vector<LONGEST> &indices,
728 LONGEST low, LONGEST high,
729 operation_up &op) override;
730
731 bool uses_objfile (struct objfile *objfile) override;
732
733 void dump (ui_file *stream, int depth) override;
734
735private:
736
739};
740
741/* An association that uses a name. The name may be an expression
742 that evaluates to an integer (for arrays), or an Ada string or
743 variable value operation. */
745{
746public:
747
749 : m_val (std::move (val))
750 {
751 }
752
753 void assign (struct value *container,
754 struct value *lhs, struct expression *exp,
755 std::vector<LONGEST> &indices,
756 LONGEST low, LONGEST high,
757 operation_up &op) override;
758
759 bool uses_objfile (struct objfile *objfile) override;
760
761 void dump (ui_file *stream, int depth) override;
762
763private:
764
766};
767
768/* A character constant expression. This is a separate operation so
769 that it can participate in resolution, so that TYPE'(CST) can
770 work correctly for enums with character enumerators. */
772 public ada_resolvable
773{
774public:
775
776 using long_const_operation::long_const_operation;
777
778 bool resolve (struct expression *exp,
779 bool deprocedure_p,
780 bool parse_completion,
782 struct type *context_type) override
783 {
784 /* This should never be called, because this class also implements
785 'replace'. */
786 gdb_assert_not_reached ("unexpected call");
787 }
788
790 struct expression *exp,
791 bool deprocedure_p,
792 bool parse_completion,
794 struct type *context_type) override;
795
796 value *evaluate (struct type *expect_type,
797 struct expression *exp,
798 enum noside noside) override;
799};
800
802{
803public:
804
805 using concat_operation::concat_operation;
806
807 value *evaluate (struct type *expect_type,
808 struct expression *exp,
809 enum noside noside) override;
810};
811
812} /* namespace expr */
813
814#endif /* ADA_EXP_H */
static std::vector< ada_component_up > components
Definition: ada-exp.c:361
struct value * ada_pos_atr(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg)
Definition: ada-lang.c:8932
struct value * ada_unop_neg(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1)
Definition: ada-lang.c:10129
struct value * ada_ternop_slice(struct expression *exp, enum noside noside, struct value *array, struct value *low_bound_val, struct value *high_bound_val)
Definition: ada-lang.c:10269
struct value * ada_atr_tag(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1)
Definition: ada-lang.c:10175
struct value * ada_binop_exp(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2)
Definition: ada-lang.c:10524
struct value * ada_unop_in_range(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct type *type)
Definition: ada-lang.c:10141
struct value * ada_abs(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1)
Definition: ada-lang.c:10212
struct value * ada_mult_binop(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2)
Definition: ada-lang.c:10227
struct value * ada_atr_size(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1)
Definition: ada-lang.c:10189
struct value * ada_val_atr(enum noside noside, struct type *type, struct value *arg)
Definition: ada-lang.c:8961
struct value * ada_equal_binop(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2)
Definition: ada-lang.c:10247
struct value * ada_binop_minmax(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2)
Definition: ada-lang.c:10507
struct value * ada_binop_in_bounds(struct expression *exp, enum noside noside, struct value *arg1, struct value *arg2, int n)
Definition: ada-lang.c:10350
ada_aggregate_component(std::vector< ada_component_up > &&components)
Definition: ada-exp.h:577
std::vector< ada_component_up > m_components
Definition: ada-exp.h:593
bool uses_objfile(struct objfile *objfile) override
Definition: ada-lang.c:9508
void assign(struct value *container, struct value *lhs, struct expression *exp, std::vector< LONGEST > &indices, LONGEST low, LONGEST high) override
Definition: ada-lang.c:9525
void dump(ui_file *stream, int depth) override
Definition: ada-lang.c:9517
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
Definition: ada-exp.h:561
enum exp_opcode opcode() const override
Definition: ada-exp.h:568
value * assign_aggregate(struct value *container, struct value *lhs, struct expression *exp)
Definition: ada-lang.c:9537
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
Definition: ada-lang.c:9767
enum exp_opcode opcode() const override
Definition: ada-exp.h:506
virtual bool uses_objfile(struct objfile *objfile)=0
DISABLE_COPY_AND_ASSIGN(ada_association)
virtual void dump(ui_file *stream, int depth)=0
virtual void assign(struct value *container, struct value *lhs, struct expression *exp, std::vector< LONGEST > &indices, LONGEST low, LONGEST high, operation_up &op)=0
virtual ~ada_association()=default
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
Definition: ada-lang.c:11013
enum exp_opcode opcode() const override
Definition: ada-exp.h:415
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
Definition: ada-lang.c:10792
enum exp_opcode opcode() const override
Definition: ada-exp.h:225
enum exp_opcode opcode() const override
Definition: ada-exp.h:258
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
Definition: ada-exp.h:247
enum exp_opcode opcode() const override
Definition: ada-exp.h:336
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
Definition: ada-exp.h:326
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
Definition: ada-exp.h:271
enum exp_opcode opcode() const override
Definition: ada-exp.h:281
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
Definition: ada-lang.c:10606
operation_up replace(operation_up &&owner, struct expression *exp, bool deprocedure_p, bool parse_completion, innermost_block_tracker *tracker, struct type *context_type) override
Definition: ada-lang.c:10619
bool resolve(struct expression *exp, bool deprocedure_p, bool parse_completion, innermost_block_tracker *tracker, struct type *context_type) override
Definition: ada-exp.h:778
void set_associations(std::vector< ada_association_up > &&assoc)
Definition: ada-exp.h:694
ada_choices_component(operation_up &&op)
Definition: ada-exp.h:686
void dump(ui_file *stream, int depth) override
Definition: ada-lang.c:9713
std::vector< ada_association_up > m_assocs
Definition: ada-exp.h:710
void assign(struct value *container, struct value *lhs, struct expression *exp, std::vector< LONGEST > &indices, LONGEST low, LONGEST high) override
Definition: ada-lang.c:9726
bool uses_objfile(struct objfile *objfile) override
Definition: ada-lang.c:9702
virtual void dump(ui_file *stream, int depth)=0
virtual void assign(struct value *container, struct value *lhs, struct expression *exp, std::vector< LONGEST > &indices, LONGEST low, LONGEST high)=0
ada_component()=default
virtual ~ada_component()=default
DISABLE_COPY_AND_ASSIGN(ada_component)
virtual bool uses_objfile(struct objfile *objfile)=0
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
Definition: ada-lang.c:10727
bool uses_objfile(struct objfile *objfile) override
Definition: ada-lang.c:9613
void assign(struct value *container, struct value *lhs, struct expression *exp, std::vector< LONGEST > &indices, LONGEST low, LONGEST high, operation_up &op) override
Definition: ada-lang.c:9627
ada_discrete_range_association(operation_up &&low, operation_up &&high)
Definition: ada-exp.h:719
void dump(ui_file *stream, int depth) override
Definition: ada-lang.c:9619
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
Definition: ada-lang.c:11148
enum exp_opcode opcode() const override
Definition: ada-exp.h:490
ada_name_association(operation_up val)
Definition: ada-exp.h:748
void dump(ui_file *stream, int depth) override
Definition: ada-lang.c:9655
void assign(struct value *container, struct value *lhs, struct expression *exp, std::vector< LONGEST > &indices, LONGEST low, LONGEST high, operation_up &op) override
Definition: ada-lang.c:9662
bool uses_objfile(struct objfile *objfile) override
Definition: ada-lang.c:9649
bool uses_objfile(struct objfile *objfile) override
Definition: ada-lang.c:9736
void assign(struct value *container, struct value *lhs, struct expression *exp, std::vector< LONGEST > &indices, LONGEST low, LONGEST high) override
Definition: ada-lang.c:9753
ada_others_component(operation_up &&op)
Definition: ada-exp.h:628
void dump(ui_file *stream, int depth) override
Definition: ada-lang.c:9742
ada_positional_component(int index, operation_up &&op)
Definition: ada-exp.h:602
void assign(struct value *container, struct value *lhs, struct expression *exp, std::vector< LONGEST > &indices, LONGEST low, LONGEST high) override
Definition: ada-lang.c:9596
bool uses_objfile(struct objfile *objfile) override
Definition: ada-lang.c:9578
void dump(ui_file *stream, int depth) override
Definition: ada-lang.c:9584
enum exp_opcode opcode() const override
Definition: ada-exp.h:166
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
Definition: ada-lang.c:10772
const char * get_name() const
Definition: ada-exp.h:144
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
Definition: ada-lang.c:10663
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
Definition: ada-lang.c:11106
bool complete(struct expression *exp, completion_tracker &tracker) override
Definition: ada-exp.h:453
void set_prefix(std::string &&prefix)
Definition: ada-exp.h:448
void dump(struct ui_file *stream, int depth) const override
Definition: ada-exp.h:458
enum exp_opcode opcode() const override
Definition: ada-exp.h:444
enum exp_opcode opcode() const override
Definition: ada-exp.h:182
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
Definition: ada-lang.c:10781
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
Definition: ada-exp.h:298
enum exp_opcode opcode() const override
Definition: ada-exp.h:308
enum exp_opcode opcode() const override
Definition: ada-exp.h:352
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
Definition: ada-lang.c:10832
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
Definition: ada-lang.c:11022
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
Definition: ada-exp.h:200
enum exp_opcode opcode() const override
Definition: ada-exp.h:209
value * evaluate_for_cast(struct type *expect_type, struct expression *exp, enum noside noside) override
Definition: ada-lang.c:10853
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
Definition: ada-lang.c:10899
const block * get_block() const
Definition: ada-exp.h:372
value * evaluate_for_cast(struct type *expect_type, struct expression *exp, enum noside noside) override
Definition: ada-lang.c:10877
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
Definition: ada-lang.c:10640
enum exp_opcode opcode() const override
Definition: ada-exp.h:131
virtual void do_generate_ax(struct expression *exp, struct agent_expr *ax, struct axs_value *value, struct type *cast_type)
Definition: expression.h:175
virtual void dump(struct ui_file *stream, int depth) const =0
virtual bool complete(struct expression *exp, completion_tracker &tracker)
Definition: expop.h:1008
tuple_holding_operation(Arg... args)
Definition: expop.h:371
struct value * eval_op_binary(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2)
Definition: eval.c:1369
#define OP(name)
exp_opcode
Definition: expression.h:44
noside
Definition: expression.h:55
Definition: ada-exp.h:80
std::unique_ptr< operation > operation_up
Definition: expression.h:81
std::unique_ptr< ada_association > ada_association_up
Definition: ada-exp.h:678
static void dump_for_expression(struct ui_file *stream, int depth, const operation_up &op)
Definition: expop.h:311
std::unique_ptr< ada_component > ada_component_up
Definition: ada-exp.h:540
Definition: aarch64.h:50
#define prefix(a, b, R, do)
Definition: ppc64-tdep.c:52
#define resolve(X)
Definition: block.h:109
virtual operation_up replace(operation_up &&owner, struct expression *exp, bool deprocedure_p, bool parse_completion, innermost_block_tracker *tracker, struct type *context_type)
Definition: ada-lang.c:10550
virtual bool resolve(struct expression *exp, bool deprocedure_p, bool parse_completion, innermost_block_tracker *tracker, struct type *context_type)=0
Definition: gdbtypes.h:922
Definition: value.c:181
struct value * value_cast(struct type *type, struct value *arg2)
Definition: valops.c:408
struct type * value_type(const struct value *value)
Definition: value.c:1109