1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
|
2003-12-20 Daniel Jacobowitz <drow@mvista.com>
* cp-names.y (%union): Remove abstract_fn. Add abstract.
(abstract_declarator_fn): Change type to abstract. Fold function
arglists lazily. Handle start_opt after function_arglist
and :: after more complex function types.
(abstract_declarator): Change type to abstract. Fold function
arglists eagerly.
(direct_abstract_declarator): Change type to abstract. Fold function
arglists only when necessary.
(function): Move start_opt into abstract_declarator_fn. Handle
bare conversion typespecs and unfolded arglists.
(declarator_1): Handle local names inside more complex function
declarations.
(main): Support --debug.
2003-12-20 Daniel Jacobowitz <drow@mvista.com>
* cp-names.y (%union): Add abstract_fn.
(conversion_op): New non-terminal, broken out of operator.
(conversion_op_name, abstract_declarator_fn): New non-terminals.
(ptr_operator_seq): Remove.
(function): Use D_COMP_LOCAL_NAME. Handle conversion operators.
(declarator_1): Use D_COMP_LOCAL_NAME.
(tokentab2, tokentab3): Remove.
(HANDLE_TOKEN3): Fix typo.
(yylex): Call HANDLE_TOKEN3 before HANDLE_TOKEN2.
2003-12-19 Daniel Jacobowitz <drow@mvista.com>
* cp-names.y (tokentab2, tokentab3): Remove.
(HANDLE_TOKEN2, HANDLE_TOKEN3): New macros.
(yylex): Use them.
2003-12-19 Daniel Jacobowitz <drow@mvista.com>
* cp-names.y (%union): Remove typed_val_float.
(INT, FLOAT): Change to type comp.
(CONSTRUCTION_VTABLE): Change to untyped.
(demangler_special): Use D_COMP_CONSTRUCTION_VTABLE.
(array_indicator, exp): Update for new types of INT and FLOAT.
Handle D_COMP_LITERAL_NEG.
(parse_number): Simplify. Use D_COMP_LITERAL_NEG.
(HANDLE_SPECIAL): Define.
(tokentab_big): Remove.
(yylex): Remove unused variables. Optimize calls to strncmp
and handling of multi-word tokens.
2003-12-19 Daniel Jacobowitz <drow@mvista.com>
* cp-names.y (symbol_end): New function.
(trim_chars): Use it.
(start_opt, function): New non-terminals used to support
function-local names.
(GLOBAL): New terminal.
(start): Use start_opt.
(demangler_special): Handle GLOBAL.
(array_indicator): Swap arguments to D_COMP_ARRAY_TYPE.
(direct_abstract_declarator, direct_declarator)
(direct_declarator_1): Likewise.
(declarator_1): Use declarator_1 instead of declarator after
a ptr_operator. Support function-local names.
(yylex): Handle GLOBAL specially.
2003-12-19 Daniel Jacobowitz <drow@mvista.com>
* cp-names.y (demangler_special): New non-terminal.
(DEMANGLER_SPECIAL, CONSTRUCTION_VTABLE, CONSTRUCTION_IN): New
terminals.
(GLOBAL_CONSTRUCTORS, GLOBAL_DESTRUCTORS): New enums.
(tokentab_big): New struct.
(yylex): Recognize them. Handle negative literals.
(parse_number): Handle negative literals.
(start): Use demangler_special.
(operator): Correct typos for ->* and (). Use typespec_2 instead of
typespec.
(unqualified_name): Allow operator templates.
(template_arg): Create a unary operation, not a reference type.
(exp): Set the type of D_COMP_LITERALs instead of adding a cast
operation.
(cp_print, trim_chars): New helper functions.
(main): Use them.
2003-12-18 Daniel Jacobowitz <drow@mvista.com>
* cp-names.y (ext_name): Remove.
(colon_ext_only, ext_only_name): New non-terminals.
(colon_ext_name): Use colon_ext_only.
(declarator_1, direct_declarator_1): New non-terminals.
('('): Remove %right precedence.
(result): New non-terminal.
(start): Assign to $$. Use declarator_1. Handle functions
without return types.
(template_arg): Use start instead of colon_ext_name.
(yylex): Fix typo in "char" case.
(yyerror): Add newline.
(main): Behave like c++filt when started with no arguments.
2003-12-18 Daniel Jacobowitz <drow@mvista.com>
* cp-names.y (basic_exp): Remove.
(function_arglist, declarator, abstract_declarator)
(direct_declarator, direct_abstract_declarator): Change type to
nested.
(array_indicator): New rule.
(start): Add actions.
(operator): Correct actions for conversion operators.
(template_arg): Use exp instead of basic_exp.
(abstract_declarator, type, declarator): Add missing actions.
(direct_abstract_declarator, direct_declarator): Likewise.
Use array_indicator. Correct use of function_arglist.
2003-12-17 Daniel Jacobowitz <drow@mvista.com>
* cp-names.y (ptr_operator_1, ptr_operator_2): Merge back into
ptr_operator.
(qualified, decl1b): Remove.
(NEW, DELETE): Give higher precedence than '['.
(typespec, typespec_2, declarator, direct_declarator)
(abstract_declarator, direct_abstract_declarator): New.
(start, type): Use them.
(operator): Add rules for conversion operators.
(exp): Avoid a conflict for function-style casts; allow
function-style casts to typenames.
2003-12-17 Daniel Jacobowitz <drow@mvista.com>
* cp-names.y: Use precedence to resolve shift/reduce conflicts for
COLONCOLON. Merge type1a, type1b, and type2 rules.
2003-12-16 Daniel Jacobowitz <drow@mvista.com>
* cp-names.y (function_arglist): Call d_qualify.
(ptr_operator_seq): Reverse the list.
(decl1b): Add the declarator-id.
2003-12-14 Daniel Jacobowitz <drow@mvista.com>
* Makefile.in: Add cp-names.y.
* cp-names.y: New file.
2002-11-22 David Carlton <carlton@math.stanford.edu>
* symtab.h: Add opaque declarations for struct namespace_info and
struct obstack.
(struct block): The language_specific stuff is now a struct
namespace_info rather than a struct using_direct_node.
(BLOCK_NAMESPACE): New macro.
Delete macro BLOCK_USING.
Add declarations for block_using, block_all_usings,
block_set_using, block_scope, block_set_scope.
* symtab.c: #include "gdb_assert.h"
(lookup_symbol_aux): Move minsym stuff inside
lookup_symbol_aux_nonlocal, and always do global search via
lookup_symbol_aux_using.
(lookup_symbol_aux_nonlocal): Do minsym search.
(lookup_symbol_aux_using): Calculate usings via block_all_usings;
handle namespace scope.
(lookup_symbol_aux_using_loop): New function, not to be confused
with the previous function of the same name. (Sorry about that.)
(lookup_symbol_namespace): Renamed from
lookup_symbol_aux_using_loop.
(lookup_symbol_aux_minsyms): Add block_index argument, delete
is_a_field_of_this argument, and only check either global or
static symbols rather than both of them.
(block_using): New function.
(block_all_usings): New function.
(block_set_using): New function.
(block_scope): New function.
(block_set_scope): New function.
(block_initialize_namespace): New function.
* jv-lang.c (get_java_class_symtab): BLOCK_NAMESPACE instead of
BLOCK_USING.
* dwarf2read.c: Delete variable current_namespace, and replace its
uses by processing_current_namespace (from buildsym.h).
(scan_partial_symbols): Allow empty pdi.name if we're
reading a namespace.
* cp-support.h (struct namespace_info): New struct.
* cp-support.c: Add comment.
* buildsym.h: New variable processing_current_namespace.
* buildsym.c (add_symbol_to_list): Do fast search for
"(anonymous namespace)".
(scan_for_anonymous_namespaces): Delete FIXME. Convert for loop
into a clearer while loop.
(finish_block): Replace BLOCK_USING by BLOCK_NAMESPACE.
(finish_block): Set block_scope of function blocks rather than
generating using directives that would have a similar effect.
(end_symtab): Set using via block_set_using rather than
BLOCK_USING.
* Makefile.in (symtab.o): Depend on gdb_assert_h.
2002-11-01 Daniel Jacobowitz <drow@mvista.com>
* c-typeprint.c (c_type_print_args): Remove.
(cp_type_print_method_args): Remove unused PREFIX argument.
Simplify logic. Skip FIELD_ARTIFICIAL arguments.
(c_type_print_varspec_suffix): Call cp_type_print_method_args.
(c_type_print_base): Handle template classes when looking for
constructor field names. Update call to cp_type_print_method_args.
2002-11-01 Daniel Jacobowitz <drow@mvista.com>
* gdbtypes.c (get_destructor_fn_field): Return obvious destructors
based on method name.
2002-10-30 Daniel Jacobowitz <drow@mvista.com>
* c-typeprint.c (c_type_print_modifier_before): New function.
(c_type_print_modifier_after): New function.
(c_type_print_base): Call c_type_print_modifier_before and
c_type_print_modifier_after.
2002-10-28 Daniel Jacobowitz <drow@mvista.com>
* c-typeprint.c (c_type_print_base): Print method qualifiers.
2002-10-22 David Carlton <carlton@math.stanford.edu>
* Makefile.in (buildsym.o): Depend on $(gdb_assert_h) and
$(cp_support_h).
(cp-support.o): Fix dependencies and add $(gdb_obstack_h) and
$(gdb_assert_h).
(symtab.o): Depend on $(cp_support_h).
* symtab.h: Add opaque declaration for struct using_direct_node.
(struct block): Add member 'language_specific'.
(BLOCK_USING): New macro.
* symtab.c: #include "cp-support.h"
(lookup_symbol_aux): Call lookup_symbol_aux_nonlocal and
lookup_symbol_aux_using when appropriate.
(lookup_symbol_aux_nonlocal): New function.
(lookup_symbol_aux_using): New function.
(lookup_symbol_aux_using_loop): New function.
* symfile.h: Add opaque declaration for struct obstack.
Declare obsavestring to take a const char *.
* symfile.c (obsavestring): Make first argument a const char *.
* jv-lang.c (get_java_class_symtab): Initialize BLOCK_USING.
* dwarf2read.c: New variable current_namespace.
(scan_partial_symbols): Handle DW_TAG_namespace.
(psymtab_to_symtab_1): Initialize current_namespace.
(process_die): Handle DW_TAG_namespace,
DW_TAG_imported_declaration, DW_TAG_imported_module.
(read_namespace): New function.
(dwarf2_name): New function.
(dwarf2_extension): New function.
(dwarf_tag_name): Add DWARF 3 names.
(dwarf_attr_name): Ditto.
(dwarf_type_encoding_name): Ditto.
* cp-support.h: Opaque declaration for struct obstack.
(struct using_direct): New struct.
(struct using_direct_node): New struct.
Add declarations for cp_add_using_obstack, cp_add_using_xmalloc,
cp_copy_usings, cp_free_usings, cp_find_first_component.
* cp-support.c: #include "gdb_obstack.h", "gdb_assert.h".
Comment on demangled name pitfalls.
(cp_add_using_obstack): New function.
(cp_add_using_xmalloc): New function.
(cp_copy_usings): New function.
(cp_free_usings): New function.
(cp_find_first_component): New function.
* buildsym.h: Declare processing_has_namespace_info.
Declare add_using_directive.
* buildsym.c: #include "gdb_assert.h", "cp-support.h".
Change comment after #include "symfile.h".
New variable using_list.
(add_symbol_to_list): Scan for anonymous namespaces when
appropriate.
(scan_for_anonymous_namespaces): New function.
(add_using_directive): New function.
(start_symtab): Initialize processing_has_namespace_info,
using_list.
(end_symtab): Copy using_list into block.
(copy_usings_to_obstack): New function.
(finish_block): Set BLOCK_USING in general case and in C++
function case.
2002-10-11 David Carlton <carlton@math.stanford.edu>
* symtab.c (lookup_symbol_aux): Move chunks of code into separate
functions.
(lookup_symbol_aux_local): New function.
(lookup_symbol_aux_symtabs): New function.
(lookup_symbol_aux_psymtabs): New function.
(lookup_symbol_aux_minsyms): New function.
2002-10-05 Daniel Jacobowitz <drow@mvista.com>
* stabsread.c (read_member_functions): Update comment.
Set TYPE_NAME if possible.
2002-10-05 Daniel Jacobowitz <drow@mvista.com>
* c-typeprint.c (cp_type_print_method_args): Don't recursively
expand classes in the arguments to methods.
(c_type_print_base): Use the name of the method to figure out
if it is a constructor or destructor. Use the type information
to print out the method signature, instead of using the demangled
name.
|