1 2006-01-02 Paul N. Hilfinger <hilfinger@adacore.com>
3 * ada-exp.y: Considerable reorganization to move functionality
4 from ada-lex.l to here, where it is logically more appropriate.
5 The original reason, however, was to prevent premature name
6 lookups for selector names in record aggregates.
7 (BLOCKNAME, TYPENAME, OBJECT_RENAMING): Remove; lexer now returns
9 (VAR): New artificial token to clarify precedence rules.
11 (empty_stoken): New symbol.
12 (%union): Remove ssym, voidval.
13 (%type): Remove <voidval> type declarations.
14 (syntax definitions): Add aggregates.
15 Remove distinction between NAME, TYPENAME, BLOCKNAME, OBJECT_RENAMING.
16 Rename some non-terminals to be closer to reference manual usage.
17 Tighten up expression syntax to disallow certain non-Ada
18 constructions such as X and then Y or else Z.
19 (ada_parse): Remove initialization of left_block_context.
20 (write_var_from_name): Remove.
21 (write_var_or_type): New function, containing previous code from
22 defunct write_var_from_name and name_lookup.
23 (block_lookup): New function, moved from ada-lex.l
24 (select_possible_type_sym): New function, factored out of
25 name_lookup, which used to be in ada-lex.l.
26 (find_primitive_type): Ditto.
27 (chop_selector): Ditto.
28 (write_ambiguous_var): New function, factored out of defunct
30 (write_selectors): New function.
31 (write_name_assoc): New function.
32 (write_exp_op_with_string): New function.
34 * ada-lex.l (processId): Change interface to return stoken.
35 (tempbuf, resize_tempbuf, tempbuf_size, tempbuf_len): Remove.
36 (block_lookup, name_lookup): Remove. Functionality moved to
38 (state IN_STRING): Remove.
39 (rules): Handle string escapes in processString.
41 Return all NAMEs, BLOCKNAMEs, OBJECT_RENAMINGs, TYPENAMEs in
42 yylval.sval (as simple strings).
43 All name look-ups now handled in ada-exp.y.
44 Introduce "::" (COLONCOLON) token and return as separate token.
45 (processId): Change return convention. Comment.
46 Leave leading "'" in place.
47 (processString): New function.
48 (find_dot_all): Add note to comment.
49 Fix problem that allowed match only at the end.
51 * ada-lang.c: Introduce aggregates.
52 (find_struct_field): Add new parameter to count fields skipped, and
53 allow other output parameters to be NULL.
54 (value_tag_from_contents_and_address, ada_value_struct_elt): Use
55 new find_struct_field.
56 (ada_index_struct_field, assign_aggregate, ada_is_array_type)
57 (num_visible_fields, ada_index_struct_field_1, ada_index_struct_field)
58 (num_component_specs, assign_component, assign_aggregate):
59 (aggregate_assign_from_choices,aggregate_assign_positional)
60 (aggregate_assign_others,add_component_interval):
62 (ada_evaluate_subexp): Declare.
63 Add aggregate-related operators.
64 (ada_forward_operator_length): Declare.
65 (resolve_subexp): Add cases for new aggregate operators and OP_NAME.
66 Consolidate Ada operators, using ada_forward_operator_length.
67 (ada_search_struct_field): Search in forward order.
68 (ADA_OPERATORS): Add new aggregate operators.
69 (ada_operator_length, ada_op_name, ada_forward_operator_length)
70 (ada_dump_subexp_body, ada_print_subexp): Handle new aggregate
71 operators and OP_NAME.
72 (ada_type_of_array): Use longest_to_int.
73 (value_assign_to_component): New function.
74 (ada_forward_operator_length, ada_op_name, ada_dump_subexp_body):
76 (ada_forward_operator_length, ada_dump_subexp_body):
79 * ada-lang.h (enum ada_operator): Add OP_AGGREGATE, OP_OTHERS,
80 OP_CHOICES, OP_DISCRETE_RANGE, OP_POSITIONAL.
82 2006-01-02 Paul N. Hilfinger <hilfinger@adacore.com>
84 * ada-lang.c (process_raise_exception_name): Remove extraneous
85 definition from unsubmitted code.
87 (is_lower_alphanum): New function.
88 (ada_decode): Add support for decoding protected object subprograms
89 and entries, and of entities declared inside protected object
91 Also add missing handling for__{DIGITS}+ suffixes.
92 Allow '$<digits>' as valid overloading suffix.
93 (is_name_suffix): Add handling for protected type entriy suffixes.
94 Also add support for protected type subprogram suffixes, but keep
95 it commented out for now, as there is an ambiguity between these
96 entities and other internally generated entities.
97 Allow '$<digits>' as valid overloading suffix.
98 (is_valid_name_for_wild_match): New function.
99 (wild_match): Add an exra level of verification of the entity name
100 before declaring it a match for the given pattern.
102 (ada_type_of_array, ada_evaluate_subexp): Use more proper
103 longest_to_int rather than cast.
105 (ada_evaluate_subexp): Use "invalid" rather than "illegal" in comment.
107 (ada_coerce_to_simple_array): Call check_size to make sure
108 that the object size is reasonable.
110 (ada_value_primitive_packed_val): Use correct location in target
111 buffer for extracting packed record fields that are themselves records.
113 (add_defn_to_vec): Do not try to replace a stub type by its full
114 type. Avoids a potential infinite loop.
116 (ada_lookup_symbol): Move return incorrectly placed return statement,
117 causing a loop that should be scanning all object files to only
120 (ada_tag_name_2): New function.
121 (ada_tag_name_1): If no 'tsd' field found in the dispatching table,
122 use alternative representation.
124 (ada_find_renaming_symbol): Strip the function name suffix when
125 computing the XR type name.
127 (ada_to_fixed_type): Try determining the tag only if we have the
129 (to_fixed_array_type): Add comments.
131 (ada_check_typedef): Replace expression checking whether the given
132 type is a stub or not by a "call" to TYPE_STUB. Clearer and more
135 * ada-lang.h (ADA_KNOWN_AUXILIARY_FUNCTION_NAME_PATTERNS): Allow
136 '$' in addition to '.' for runtime auxiliary function name suffixes.
137 See changes to ada_decode above.
139 (struct task_control_block): Add field called_task. (This change is
140 to keep synchronized with our local sources; it does not affect the
143 * ada-typeprint.c (ada_print_type): Use int_string for printing
144 modulus of modular type.
146 (print_range): Trivial editorial comment fix.
148 * ada-valprint.c (ada_emit_char): Use normal Ada syntax for
149 double quote in string.
151 2006-01-01 Joel Brobecker <brobecker@adacore.com>
153 * top.c: Add 2006 to list of copyright years in file header.
155 2006-01-01 Joel Brobecker <brobecker@adacore.com>
157 * top.c (print_gdb_version): Update copyright year to 2006.
159 2006-01-01 Roger Sayle <roger@eyesopen.com>
160 Elena Zannoni <ezannoni@redhat.com>
163 * xcoffread.c (xcoff_next_symbol_text): Check this_symtab_psymtab
164 for NULL before assigning this_symtab_psymtab->objfile to objfile.
165 (scan_xcoff_symtab): Initialize next_symbol_text_func.
166 (Committed by Jim Blandy)
168 For older changes see ChangeLog-2005.
174 version-control: never