summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* * Makefile.in (cp-names-main.tab.o): Rename to test-cp-names.tab.o.drow-cplus-branchcvs/drow-cplus-branchDaniel Jacobowitz2004-02-293-5/+10
| | | | * config/djgpp/config.sed: Handle new *cp-names.tab.* references.
* * config/djgpp/fnchange.lst: Add cp-names.tab.c.Daniel Jacobowitz2004-02-092-0/+5
|
* Merge drow-cplus-merge-20040208 to drow-cplus-branch.Daniel Jacobowitz2004-02-09347-13688/+19191
|
* * Makefile.in (cp_demangle_h): Remove.Daniel Jacobowitz2004-01-134-58/+73
| | | | | | | | | | | | (libiberty_h): Add. (cp-names.tab.o, cp-names-main.tab.o, cp-support.o): Update dependencies. * cp-support.c: Don't include "cp-demangle.h". (d_left, d_right): New macros. (cp_canonicalize_string, class_name_from_physname, method_name_from_physname): Fix types and component names. * cp-support.h (demangled_name_to_comp, mangled_name_to_comp) (cp_comp_to_string): Update prototypes.
* Remove dead fles.Daniel Jacobowitz2004-01-133-316/+0
|
* * cp-names.y: Don't include "cp-demangle.h". Convert all referencesDaniel Jacobowitz2004-01-133-252/+369
| | | | | | | | | | | | | | | | | | | to d_info, d_comp, and D_COMP_* to demangle_info, demangle_component, and DEMANGLE_COMPONENT_*. Convert all calls to cp_v3_d_* functions to new wrapper functions. Add precedences for VOID and ')'. (struct demangle_info): New type. (d_grab, d_left, d_right): New macros. (fill_comp, make_empty, make_operator, make_dtor, make_builtin_type) (make_name): New wrapper functions. (function_args): Remove D_PRINT_VOID test. (function_arglist): Handle '(' VOID ')'. (allocate_info): New function. (demangled_name_to_comp): Use it. Call free. (mangled_name_to_comp): Use cplus_demangle_v3_components. (cp_print, main): Use fputs instead of puts. * cp-support.c (cp_canonicalize_string, class_name_from_physname) (method_name_from_physname): Remove calls to cp_v3_d_free_info. Test demangled_name before freeing it.
* Merge mainline to branch. GDB is broken until I update cp-names.y.Daniel Jacobowitz2004-01-13269-53270/+61877
|
* * cp-names.y (orig_lexptr): New variable.Daniel Jacobowitz2004-01-122-4/+19
| | | | | | (exp1): New production for parenthesized references. (yyerror): Print out complete string on parse error. (demangled_name_to_comp, main): Set orig_lexptr.
* * Makefile.in (cp_names_h): Remove.Daniel Jacobowitz2004-01-047-148/+225
| | | | | | | | | | | | | | | | | | | (cp_demangle_h): New. (cp-names.tab.o, cp-names-main.tab.o): Use $(cp_demangle_h) and remove $(cp_names_h). (cp-support.o): Use $(cp_demangle_h). * cp-names.y: Don't include cp-names.h. (cp_comp_to_string): Export. (cp_canonicalize_string): Move to cp-support.c. (demangled_name_to_comp, mangled_name_to_comp): New functions. * cp-support.c: Include "cp-demangle.h". (cp_canonicalize_string): New function, moved from cp-names.y and updated. (class_name_from_physname, method_name_from_physname): Rewritten. (find_last_component): Removed. * cp-support.h: Add new opaque types and prototypes. * dwarf2read.c: Don't include cp-names.h. * cp-names.h: Remove file.
* * Makefile.in (cp-names.tab.o, cp-names-main.tab.o, test-cpnames):Daniel Jacobowitz2004-01-043-177/+151
| | | | | | | Update dependencies. Link the correct libiberty. * cp-names.y: Include cp-demangle.h instead of cp-demangle.c. Update names of exported functions from cp-demangle.c. Use cp_v3_d_init_info_alloc and cp_v3_d_free_info.
* * cp-demangle.h: New file.Daniel Jacobowitz2004-01-042-0/+293
|
* Add cplus branch changelogDaniel Jacobowitz2004-01-041-0/+23
|
* * cp-demangle.c: Include cp-demangle.h. Export some publicDaniel Jacobowitz2004-01-042-348/+190
| | | | | | | | | | | | | | | | | | | | | | | functions and variables. (cp_v3_d_init_info_alloc, cp_v3_d_free_info): New functions. (d_make_operator_from_string): New function. (cp_v3_d_make_empty, cp_v3_d_make_comp, cp_v3_d_make_name) (cp_v3_d_make_builtin_type, cp_v3_d_make_extended_operator) (cp_v3_d_make_ctor, cp_v3_d_make_dtor, cp_v3_d_print): Renamed and made global. Update calls to renamed functions. (d_make_template_param, d_make_sub, d_encoding, d_name, d_prefix) (d_identifier, d_operator_name, d_special_name, d_ctor_dtor_name) (d_type, d_cv_qualifiers, d_bare_function_type, d_array_type) (d_pointer_to_member_type, d_template_args, d_expression) (d_expr_primary, d_local_name, d_demangle): Update calls to renamed functions. (cp_v3_d_make_builtin_type): Accept a character instead of a pointer to struct d_builtin_type_info. (d_type): Update call to d_make_builtin_type. * Makefile.in: Update dependencies for cp-demangle.o.
* * cp-names.y (yylex): Fix thinko for character constants.Daniel Jacobowitz2003-12-303-5/+23
| | | | | * dwarf2read.c: Include "cp-names.h". (read_structure_scope): Canonicalize class names.
* * gdb.cp/templates.exp: Formatting changes to match demangler styleDaniel Jacobowitz2003-12-302-14/+26
| | | | | for template names. New tests for member variable Foo::x with different spellings of the template argument.
* * Makefile.in (cp_names_h): New variable.Daniel Jacobowitz2003-12-244-44/+137
| | | | | | | | | | | | | | | (cp-names.tab.o, cp-names-main.tab.o): Depend on cp-names.h. * cp-names.h: New file. * cp-names.y: Include "cp-names.h". (lexptr, prev_lexptr): Make const. (symbol_end): Make argument and return type const. Move outside of TEST_CPNAMES. (parse_number): Make argument const. Use an ISO C declaration. (parse_escape): Make argument const. (yylex): Make some pointers const. (cp_comp_to_string, cp_canonicalize_string): New functions. (trim_chars): Cast symbol_end's return value to non-const in this case.
* Merge from mainline.Daniel Jacobowitz2003-12-2416-371/+647
|
* * cp-names.y (LONGEST, ULONGEST, DOUBLEST): Remove.Daniel Jacobowitz2003-12-243-154/+231
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (d_qualify): Take an int argument. Update for new INT_LLONG handling. (INT_CHAR, INT_SHORT, INT_LONG, INT_LLONG, INT_SIGNED) (INT_UNSIGNED): Change into bitflags. (%union): Change lval and typed_val_int.val to ints. (scope_id, typespec): Inline non-terminals at their use sites. (sign, size, int_type): Remove. (int_part, int_seq): New non-terminals. (result): Add missing semicolon. (name, nested_name): Inline scope_id here. (template_arg, function_args): Inline type here. (builtin_type): Use int_seq. Add missing semicolon. (typespec_2): Inline typespec and colon_name here. (start, qualifiers_opt, qualifiers): Remove redundant action. (abstract_declarator, direct_abstract_declarator): Likewise. (abstract_declarator_fn): Likewise. (d_builtin_type): New helper function. (parse_number): Use d_builtin_type. (HANDLE_SPECIAL): Only take one argument. (yylex): Remove unused variable unquoted_expr. Use d_builtin_type. Update calls to HANDLE_SPECIAL. Jump around case '-' instead of falling through it. Use ISALNUM and ISALPHA. Add a return statement after a call to error. Match trailing speaces on special tokens. (cp_print): Take a len argument, and pass it to d_print. Print the string instead of returning it. (main): Pass len to cp_print. Allocate and free myinfo.comps. Use putchar and puts instead of printf. * Makefile.in (safe_ctype_h): Add. (test-cpnames, cp-names-main.tab.o): New rules. (clean): Remove test-cpnames. (cp-names.tab.o): Update dependencies.
* Merge from mainline.Daniel Jacobowitz2003-12-2076-1610/+6207
|
* * cp-names.y (%union): Remove abstract_fn. Add abstract.Daniel Jacobowitz2003-12-202-37/+101
| | | | | | | | | | | | | | | (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.
* * cp-names.y (%union): Add abstract_fn.Daniel Jacobowitz2003-12-202-19/+86
| | | | | | | | | | | (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.
* * cp-names.y (tokentab2, tokentab3): Remove.Daniel Jacobowitz2003-12-202-55/+74
| | | | | (HANDLE_TOKEN2, HANDLE_TOKEN3): New macros. (yylex): Use them.
* * cp-names.y (%union): Remove typed_val_float.Daniel Jacobowitz2003-12-192-264/+143
| | | | | | | | | | | | | (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.
* * cp-names.y (symbol_end): New function.Daniel Jacobowitz2003-12-192-20/+93
| | | | | | | | | | | | | | | (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.
* * cp-names.y (demangler_special): New non-terminal.Daniel Jacobowitz2003-12-192-18/+207
| | | | | | | | | | | | | | | | | | (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.
* * cp-names.y (ext_name): Remove.Daniel Jacobowitz2003-12-192-23/+132
| | | | | | | | | | | | | | (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.
* * cp-names.y (basic_exp): Remove.Daniel Jacobowitz2003-12-182-24/+88
| | | | | | | | | | | | | (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.
* * cp-names.y (ptr_operator_1, ptr_operator_2): Merge back intoDaniel Jacobowitz2003-12-182-120/+84
| | | | | | | | | | | | 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.
* * cp-names.y: Use precedence to resolve shift/reduce conflicts forDaniel Jacobowitz2003-12-172-31/+22
| | | | COLONCOLON. Merge type1a, type1b, and type2 rules.
* 2003-12-16 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz2003-12-162-12/+19
| | | | | | * cp-names.y (function_arglist): Call d_qualify. (ptr_operator_seq): Reverse the list. (decl1b): Add the declarator-id.
* * Makefile.in: Add cp-names.y.Daniel Jacobowitz2003-12-163-0/+1851
| | | | * cp-names.y: New file.
* Merge fixes.Daniel Jacobowitz2003-12-152-9/+9
|
* Merge drow-cplus-branch to:Daniel Jacobowitz2003-12-143642-258213/+792054
| | | | cvs rtag -D 2003-12-14 00:00:00 UTC drow-cplus-merge-20031214 gdb+dejagnu
* 2002-11-22 David Carlton <carlton@math.stanford.edu>David Carlton2002-11-2210-178/+452
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* * c-typeprint.c (c_type_print_args): Remove.Daniel Jacobowitz2002-11-012-63/+38
| | | | | | | | (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.
* * gdbtypes.c (get_destructor_fn_field): Return obvious destructorsDaniel Jacobowitz2002-11-012-0/+12
| | | | based on method name.
* * gdb.c++/templates.exp: Correct some undoubled backslashes.Daniel Jacobowitz2002-11-012-6/+12
| | | | | Make a synthetic operator= optional. (print Garply<Garply<char> >::garply): Allow const THIS pointer.
* * gdb.c++/method.exp (print this): Allow "A const".Daniel Jacobowitz2002-10-303-3/+9
| | | | | * gdb.c++/templates.exp (ptype fvpchar) (print Foo<volatile char *>::Foo): Allow consts after type names.
* * c-typeprint.c (c_type_print_modifier_before): New function.Daniel Jacobowitz2002-10-302-7/+30
| | | | | | (c_type_print_modifier_after): New function. (c_type_print_base): Call c_type_print_modifier_before and c_type_print_modifier_after.
* * c-typeprint.c (c_type_print_base): Print method qualifiers.Daniel Jacobowitz2002-10-292-0/+24
|
* Merge drow-cplus-merge-20021025 to drow-cplus-branch.Daniel Jacobowitz2002-10-26190-2791/+5944
|
* 2002-10-22 David Carlton <carlton@math.stanford.edu>David Carlton2002-10-2215-39/+1135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-22 David Carlton <carlton@math.stanford.edu> * gdb.c++/namespace.exp: Add tests involving namespaces starting from C. * gdb.c++/namespace.cc: Add namespaces with names starting from C and their contents.
* 2002-10-11 David Carlton <carlton@math.stanford.edu>David Carlton2002-10-112-345/+271
| | | | | | | | | * 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.
* * stabsread.c (read_member_functions): Update comment.Daniel Jacobowitz2002-10-062-0/+36
| | | | Set TYPE_NAME if possible.
* * c-typeprint.c (cp_type_print_method_args): Don't recursivelyDaniel Jacobowitz2002-10-06737-121726/+28
| | | | | | | | 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.
* 2002-10-04 Michael Snyder <msnyder@redhat.com>drow-cplus-branchpointMichael Snyder2002-10-042-5/+18
| | | | | * m32r-stub.c (handle_exception): Make sure exception is "trap" before treating it as a single-step event.
* 2002-10-03 Adam Fedor <fedor@gnu.org>Adam Fedor2002-10-043-26/+52
| | | | | | | | | | | | | | | * objc-lang.c: ARI fixes. Change string.h to gdb_string.h. (objc_demangle): Remove assignment in if statements, Replace free with xfree. (add_msglist): Likewise. (end_msglist): Likewise. (complare_selectors): Likewise. (selectors_info): Likewise. (compare_classes): Likewise. (classes_info): Likewise. (print_object_command): Likewise. (find_objc_msgcall_submethod): Replace PTR with void *. * objc-lang.h: Remove check for __STDC__.
* *** empty log message ***gdbadmin2002-10-041-1/+1
|
* daily updateAlan Modra2002-10-041-1/+1
|
* 2002-10-03 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2002-10-034-4/+39
| | | | | | | | | * ui-out.h (ui_out_field_fmt_int): New prototype. * ui-out.c (ui_out_field_fmt_int): New function allowing specification of field width and alignment. * stack.c (print_frame_info_base): When printing frame level, use ui_out_field_fmt_int with a width of 2 and left alignment. Fix for PR gdb/192