summaryrefslogtreecommitdiff
path: root/gdb/cp-namespace.c
Commit message (Collapse)AuthorAgeFilesLines
* move gdbarch object from objfile to per-BFDTom Tromey2013-08-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the "gdbarch" field from the objfile into the BFD. This field's value is derived from the BFD and is immutable over the lifetime of the BFD. This makes it a reasonable candidate for pushing into the per-BFD object. This is part of the long-term objfile splitting project. In the long run I think this patch will make it simpler to moves types from the objfile to the per-BFD object; but the patch makes sense as a minor cleanup by itself. Built and regtested on x86-64 Fedora 18. * cp-namespace.c (cp_lookup_symbol_imports_or_template): Use get_objfile_arch. * elfread.c (elf_rel_plt_read, elf_gnu_ifunc_record_cache) (elf_gnu_ifunc_resolve_by_got): Use get_objfile_arch. * jit.c (jit_object_close_impl): Update. * jv-lang.c (get_dynamics_objfile): Update. * linespec.c (add_minsym): Use get_dynamics_objfile. * objfiles.c (get_objfile_bfd_data): Initialize 'gdbarch' field. (allocate_objfile): Don't initialize 'gdbarch' field. (get_objfile_arch): Update. * objfiles.h (struct objfile_per_bfd_storage) <gdbarch>: New field, moved from... (struct objfile) <gdbarch>: ... here. Remove. * stap-probe.c (stap_can_evaluate_probe_arguments): Use get_objfile_arch. * symfile.c (init_entry_point_info): Use get_objfile_arch.
* PR 15519Doug Evans2013-06-051-15/+19
| | | | | | | | | | | | | | | * cp-namespace.c (find_symbol_in_baseclass): Call cp_lookup_symbol_in_namespace instead of cp_lookup_symbol_namespace. Check result of call to lookup_symbol_static. Call lookup_static_symbol_aux unconditionally. Call check_typedef on base types before accessing them. (cp_lookup_nested_symbol): Fix comment. testsuite/ * gdb.cp/derivation2.cc: New file. * gdb.cp/derivation.cc (main): Call foo2. * gdb.cp/derivation.exp: Add tests for typedefs in another file, and when there's an active block.
* fix cp-namespace.cTom Tromey2013-05-301-1/+4
| | | | | | | | cp_lookup_symbol_imports_or_template could return without running cleanups. * cp-namespace.c (cp_lookup_symbol_imports_or_template): Call do_cleanups on all return paths.
* From: Sergio Durigan Junior <sergiodj@redhat.com>sergiodj2013-03-141-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Subject: [PATCH] Fix for PR c++/15203 and PR c++/15210 Date: Sat, 09 Mar 2013 02:50:49 -0300 (5 days, 4 hours, 57 minutes ago) Message-ID: <m3a9qdnmti.fsf@redhat.com> Hi, This bug was reported internally at our Bugzilla, along with a proposed fix. After talking to Keith about it, he investigated and came up with another patch needed to really fix the issue on CVS HEAD. The first part of the fix is the patch to cp-namespace.c. It handles the case when we are accessing a static variable inside a function (inside a class) by the full linespec (is it right, Keith?). E.g.: class foo { public: int bar() { static int var = 0; } }; And then, printing the value of `var': (gdb) print 'foo::bar()::var' GDB would fall in an internal_error: gdb/cp-namespace.c:816: internal-error: cp_lookup_nested_symbol called on a non-aggregate type. This is because `cp_lookup_nested_symbol' is not handling the case when TYPE_CODE is either _FUNC or _METHOD. This patch fixes it by returning NULL in this case. The second part of the fix is the patch to elfread.c. It is needed because the BSF_GNU_UNIQUE flag was added to some symbols in <http://sourceware.org/ml/binutils/2009-06/msg00016.html>. Because of that, (still) the command: (gdb) print 'foo::bar()::var' where `var' is a static variable returns: "No symbol "foo::bar()::var" in current context." So with the second patch applied the command finally DTRT: (gdb) print 'foo::bar()::var' $1 = 0 This may not be the ideal solution, according to Keith it would be good to implement productions on c-exp.y in order to recognize CLASS::FUNCTION::VARIABLE, but it is a solution which works with what we have today. I regtested it in Fedora 17 x86_64 with -m64 and -m32, including gdbserver, without regressions. gdb/: 2013-03-14 Keith Seitz <keiths@redhat.com> Alan Matsuoka <alanm@redhat.com> PR c++/15203 PR c++/15210 * cp-namespace.c (cp_lookup_nested_symbol): Handle TYPE_CODE_FUNC and TYPE_CODE_METHOD. * elfread.c (elf_symtab_read): Handle BSF_GNU_UNIQUE for certain symbols. gdb/testsuite/: 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com> PR c++/15203 PR c++/15210 * gdb.cp/m-static.cc (keepalive_int): New function. (gnu_obj_1::method): New variable `sintvar', call `keepalive_int'. * gdb.cp/m-static.exp: New test for `sintvar'.
* 2013-01-31 Aleksandar Ristovski <aristovski@qnx.com>Aleksandar Ristovski2013-01-311-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * charset.c (intermediate_encoding): Remove unused i. * completer.c (signal_completer): Remove unused i. * continuations.c (discard_my_continuations_1): Remove unused continuation_ptr. * corelow.c (core_close): Remove unuseD name. (get_core_siginfo): Remove unused pid. * cp-namespace.c (cp_lookup_symbol_imports_or_template): Remove unused i, cps. * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove unused base_offset. (loclist_describe_location): Remove unused first. * event-top.c (command_line_handler): Remove unused got_eof. * exec.c (exec_close_1): Remove unused need_symtab_cleanup. (resize_section_table): Remove unused old_value. * gdb_bfd.c (gdb_bfd_map_section): Remove unused header. * gnu-v3-abi.c (compute_vtable_size): Remove unused addr. * i386-tdep.c (i386_process_record): Remove unused rex. * infcmd.c (get_return_value): Remove unused uiout. * jv-lang.c (type_from_class): Remove unused is_array. * jv-valprint.c (java_val_print): Remove unused i. * linux-nat.c (linux_nat_stop_lwp): Remove unused ptid. * linux-thread-db.c (thread_db_find_new_threads_2): Remove unuseD pid. * m2-typeprint.c (m2_print_type): Remove unused code. * macroexp.c (get_character_constant): Remove unused body_start. (macro_stringify): Remove unused result. * objc-lang.c (find_methods): Remove unused gdbarch. * objfiles.c (filter_overlapping_sections): Remove unused abfd1, abfd2. * regcache.c (regcache_cooked_read): Remove unused gdbarch. * stack.c (print_frame_args): Remove unused summary. * thread.c (thread_apply_command): Remove unused p. * valarith.c (value_x_unop): Remove unused mangle_ptr. * valops.c (search_struct_method): Remove unused skip. * valprint.c (generic_val_print): Remove unused byte_order. * varobj.c (varobj_update): Remove unused changed. * cli/cli-cmds.c (complete_command): Remove unused next_item. (alias_command): Remove unused c. * mi/mi-cmd-catch.c (mi_catch_load_unload): Remove unused c. * mi/mi-main.c (mi_cmd_data_write_register_values): Remove unused format. (mi_cmd_data_write_memory): Remove unused word_format. (mi_cmd_data_write_memory_bytes): Remove unused r. * python/py-gdb-readline.c (gdbpy_readline_wrapper): Remove unused p_start, p_end. * python/python.c (_initialize_python): Remove unused cmd_name, cmd. * tui/tui-disasm.c (tui_set_disassem_content): Remove unused line_width. Reference: http://sourceware.org/ml/gdb-patches/2013-01/msg00766.html
* * cp-namespace.c (cp_set_block_scope): Remove.Tom Tromey2013-01-251-37/+0
| | | | | | | | * cp-support.h (cp_set_block_scope): Remove. * dbxread.c: Include block.h. (cp_set_block_scope): New function. (process_one_symbol): Update. * dwarf2read.c (read_func_scope): Use block_set_scope.
* * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.Tom Tromey2013-01-251-8/+22
| | | | | | | | | (cp_add_using_directive): Add 'copy_names' argument. * cp-support.h (cp_add_using_directive): Update. (struct using_direct) <import_src, import_dest, alias, declaration>: Now const. * dwarf2read.c (read_import_statement): Use obconcat. Don't copy names passed to cp_add_using_directive.
* * symfile.h (obsavestring): Don't declare.Tom Tromey2013-01-211-9/+8
| | | | | | | | | | | | | | | * symfile.c (obsavestring): Remove. * ada-exp.y: Use obstack_copy0, not obsavestring. * ada-lang.c: Use obstack_copy0, not obsavestring. * coffread.c: Use obstack_copy0, not obsavestring. * cp-namespace.c: Use obstack_copy0, not obsavestring. * dbxread.c: Use obstack_copy0, not obsavestring. * dwarf2read.c: Use obstack_copy0, not obsavestring. * jit.c: Use obstack_copy0, not obsavestring. * mdebugread.c: Use obstack_copy0, not obsavestring. * psymtab.c: Use obstack_copy0, not obsavestring. * stabsread.c: Use obstack_copy0, not obsavestring. * xcoffread.c: Use obstack_copy0, not obsavestring.
* Update years in copyright notice for the GDB files.Joel Brobecker2013-01-011-1/+1
| | | | | | | Two modifications: 1. The addition of 2013 to the copyright year range for every file; 2. The use of a single year range, instead of potentially multiple year ranges, as approved by the FSF.
* PR c++/13615Keith Seitz2012-11-161-15/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cp-namespace.c (cp_lookup_symbol_in_namespace): Add SEARCH parameter and pass it to lookup_symbol_file. (cp_lookup_symbol_imports): Tell cp_lookup_symbol_in_namespace to search base classes. (cp_lookup_symbol_namespace): Likewise. (lookup_namespace_scope): Likewise. (lookup_symbol_file): Add SEARCH parameter. If SEARCH is non-zero and no symbol is found, lookup the class and call cp_lookup_nested_symbol. (find_symbol_in_baseclass): New function. (cp_lookup_nested_symbol): Do not let cp_lookup_symbol_in_namespace search through base classes. Do that later when there is no global symbol match. PR c++/13615 * gdb.cp/baseenum.cc: New file. * gdb.cp/baseenum.exp: New file. * gdb.cp/derivation.cc (A): Add copyright. Add a typedef. (B): Use A::value_type instead of int. Change all references. (D): Use value_type instead of int. Change all references. (E): Likewise. (F); Likewise. (Z): New class. (ZZ): New class. (N, Base, Derived): New namespace and classes. (main): Add instances of Z and ZZ. Make sure all symbols from N are kept. * gdb.cp/derivation.exp: Update typedef changes in tests. Add tests for class typedefs both before and after starting the inferior. Add tests for searching for a typedef while stopped in a method.
* ARI fixes: Avoid sprintf function use rule.Pierre Muller2012-11-131-3/+4
| | | | | | | | | | | | | | | | | | | * charset.c (convert_between_encodings): Use xsnprintf. * cli-out.c (cli_field_int): Likewise. * cp-namespace.c (cp_lookup_nested_symbol): Likewise. * expprint.c (op_name_standard): Likewise. * frv-tdep.c (set_variant_num_gprs): Likewise. (set_variant_num_fprs): Likewise. * m68hc11-tdep.c (m68hc11_initialize_register_info): Likewise. * nto-tdep.c (nto_find_and_open_solib): Likewise. (nto_init_solib_absolute_prefix): Likewise. * source.c (init_source_path): Likewise. (print_source_lines_base): Likewise. * valprint.c (print_wchar): Likewise. * mi/mi-out.c (mi_field_int): Likewise. windows-nat.c (windows_pid_to_exec_file): Likewise. (windows_create_inferior): Likewise. (_initialize_check_for_gdb_ini): Likewise.
* gdb/Jan Kratochvil2012-06-131-12/+11
| | | | | | | | | | | | | | | | | | | | | | PR c++/14177 - Fix parsing TYPENAME:: in parentheses. * c-exp.y (classify_inner_name): Remove caller assumptions in the function comment. Return ERROR for unresolved cases. Implement returning proper NAME. (yylex): Accept also NAME from classify_inner_name. * cp-namespace.c (cp_lookup_nested_type): Rename to ... (cp_lookup_nested_symbol): ... here. Return any found symbol, not just LOC_TYPEDEF type. * cp-support.h (cp_lookup_nested_type): Update its declaration. gdb/testsuite/ PR c++/14177 - Fix parsing TYPENAME:: in parentheses. * gdb.cp/cpexprs.cc (class CV, CV::i, ATTRIBUTE_USED, CV_f): New. (test_function): Call CV_f. * gdb.cp/cpexprs.exp (p 'CV::m(int)', p CV::m(int)) (p 'CV::m(int) const', p CV::m(int) const, p 'CV::m(int) volatile') (p CV::m(int) volatile, p 'CV::m(int) const volatile') (p CV::m(int) const volatile, p CV_f(int), p CV_f(CV::t)) (p CV_f(CV::i)): New tests.
* Copyright year update in most files of the GDB Project.Joel Brobecker2012-01-041-2/+1
| | | | | | gdb/ChangeLog: Copyright year update in most files of the GDB Project.
* * cp-namespace.c (cp_lookup_symbol_imports): Reindent.Tom Tromey2011-11-041-65/+65
|
* * cp-namespace.c (cp_scan_for_anonymous_namespaces): Changed functionAleksandar Ristovski2011-10-201-2/+3
| | | | | | | | | | | arguments by adding OBJFILE. Instead of getting objfile from symbol's symtab, use new argument OBJFILE. * cp-support.h (cp_scan_for_anonymous_namespaces): Changed function arguments by adding OBJFILE. * gdb/dwarf2read.c (new_symbol_full): Change call to cp_scan_for_anonymous_namespaces to match new signature. * gdb/stabsread.c (define_symbol): Change call to cp_scan_for_anonymous_namespaces to match new signature.
* gdb/Jan Kratochvil2011-06-291-4/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix non-only rename list for Fortran modules import. * cp-namespace.c (cp_scan_for_anonymous_namespaces): Adjust the cp_add_using_directive caller. (cp_add_using_directive): New parameter excludes, describe it. New variables ix and param. Compare if also excludes match. Allocate NEW with variable size, initialize EXCLUDES there. (cp_lookup_symbol_imports): New variable excludep, test current->EXCLUDES with it. * cp-support.h: Include vec.h. (struct using_direct): New field excludes, describe it. (DEF_VEC_P (const_char_ptr)): New. (cp_add_using_directive): New parameter excludes. * defs.h (const_char_ptr): New typedef. * dwarf2read.c (read_import_statement): New variables child_die, excludes and cleanups, read in excludes. (read_namespace): Adjust the cp_add_using_directive caller. gdb/testsuite/ Fix non-only rename list for Fortran modules import. * gdb.fortran/module.exp (print var_x, print var_y, print var_z): New tests. * gdb.fortran/module.f90 (module moduse): New. (program module): use moduse, test var_x, var_y and var_z.
* gdb/Jan Kratochvil2011-06-291-9/+17
| | | | | | Code cleanup. * cp-namespace.c (cp_add_using_directive): Turn positive comparison to negative comparisons.
* PR symtab/12704Keith Seitz2011-05-311-8/+5
| | | | | | | | | | | | | * cp-namespace.c (ANONYMOUS_NAMESPACE_LEN): Remove. (cp_scan_for_anonymous_namespaces): Use CP_ANONYMOUS_NAMESPACE_STR and CP_ANONYMOUS_NAMESPACE_LEN. (cp_is_anonymous): Likewise. * cp-support.h (CP_ANONYMOUS_NAMESPACE_STR): Define. (CP_ANONYMOUS_NAMESPACE_LEN): Define. * dwarf2read.c (namespace_name): Likewise. (fixup_partial_die): Likewise. * linespec.c (decode_compound): If CP_ANONYMOUS_NAMESPACE_STR is seen in the input, keep it.
* gdb/Jan Kratochvil2011-05-061-1/+7
| | | | | | | | | | | | | | | | * c-exp.y (qualified_name): Call destructor_name_p with $1.type. (classify_inner_name): Call cp_lookup_nested_type with yylval.tsym.type. * cp-namespace.c (cp_lookup_nested_type): New variable saved_parent_type. Call CHECK_TYPEDEF for parent_type. Call type_name_no_tag_or_error with saved_parent_type. * dwarf2read.c (load_partial_dies): Read in any children of DW_TAG_typedef with complaint in such case. * gdbtypes.c (type_name_no_tag_or_error): New function. * gdbtypes.h (type_name_no_tag_or_error): New prototype. * valops.c (destructor_name_p): New comment for parameter type. Remove type const. Make dname and cp const. Call type_name_no_tag_or_error. * value.h (destructor_name_p): Remove type const.
* gdbTom Tromey2011-04-041-276/+11
| | | | | | | | | | | | | | | | | | | | | * symfile.c (reread_symbols): Update. * objfiles.h (struct objfile) <cp_namespace_symtab>: Remove field. * objfiles.c (allocate_objfile): Update. * cp-support.h (cp_check_possible_namespace_symbols): Don't declare. * cp-namespace.c (lookup_symbol_file): Don't call lookup_possible_namespace_symbol. (initialize_namespace_symtab, get_possible_namespace_block) (free_namespace_block, cp_check_possible_namespace_symbols) (check_possible_namespace_symbols_loop) (check_one_possible_namespace_symbol) (lookup_possible_namespace_symbol): Remove. (maintenance_cplus_namespace): Replace with notice. (_initialize_cp_namespace): Deprecate `maint cplus namespace'. gdb/testsuite * gdb.cp/maint.exp (test_help): Update. (test_namespace): Likewise.
* 2011-02-25 Michael Snyder <msnyder@vmware.com>Michael Snyder2011-02-261-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * arm-tdep.c: Fix typos in comments. * bsd-uthread.c: Ditto. * completer.c: Ditto. * corelow.c: Ditto. * cp-namespace.c: Ditto. * cp-support.c: Ditto. * cris-tdep.c: Ditto. * dbxread.c: Ditto. * dwarf2read.c: Ditto. * frame.h: Ditto. * gdbtypes.h: Ditto. * inferior.h: Ditto. * mdebugread.c: Ditto. * mips-tdep.c: Ditto. * ppc-linux-nat.c: Ditto. * ppc-linux-tdep.c: Ditto. * printcmd.c: Ditto. * sol-thread.c: Ditto. * solib-frv.c: Ditto. * solist.h: Ditto. * sparc64-tdep.c: Ditto. * spu-tdep.c: Ditto. * stabsread.c: Ditto. * symfile.c: Ditto. * valops.c: Ditto. * varobj.c: Ditto. * vax-nat.c: Ditto. * python/py-block.c: Ditto. * python/py-symbol.c: Ditto. * python/py-symtab.c: Ditto. * python/py-value.c: Ditto. * tui/tui-win.c: Ditto.
* 2011-01-05 Michael Snyder <msnyder@vmware.com>Michael Snyder2011-01-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * addrmap.c: Shorten lines of >= 80 columns. * arch-utils.c: Ditto. * arch-utils.h: Ditto. * ax-gdb.c: Ditto. * ax-general.c: Ditto. * bcache.c: Ditto. * blockframe.c: Ditto. * breakpoint.c: Ditto. * buildsym.c: Ditto. * c-lang.c: Ditto. * c-typeprint.c: Ditto. * charset.c: Ditto. * coffread.c: Ditto. * command.h: Ditto. * corelow.c: Ditto. * cp-abi.c: Ditto. * cp-namespace.c: Ditto. * cp-support.c: Ditto. * dbug-rom.c: Ditto. * dbxread.c: Ditto. * defs.h: Ditto. * dfp.c: Ditto. * dfp.h: Ditto. * dictionary.c: Ditto. * disasm.c: Ditto. * doublest.c: Ditto. * dwarf2-frame.c: Ditto. * dwarf2expr.c: Ditto. * dwarf2loc.c: Ditto. * dwarf2read.c: Ditto. * elfread.c: Ditto. * eval.c: Ditto. * event-loop.c: Ditto. * event-loop.h: Ditto. * exceptions.h: Ditto. * exec.c: Ditto. * expprint.c: Ditto. * expression.h: Ditto. * f-lang.c: Ditto. * f-valprint.c: Ditto. * findcmd.c: Ditto. * frame-base.c: Ditto. * frame-unwind.c: Ditto. * frame-unwind.h: Ditto. * frame.c: Ditto. * frame.h: Ditto. * gcore.c: Ditto. * gdb-stabs.h: Ditto. * gdb_assert.h: Ditto. * gdb_dirent.h: Ditto. * gdb_obstack.h: Ditto. * gdbcore.h: Ditto. * gdbtypes.c: Ditto. * gdbtypes.h: Ditto. * inf-ttrace.c: Ditto. * infcall.c: Ditto. * infcmd.c: Ditto. * inflow.c: Ditto. * infrun.c: Ditto. * inline-frame.h: Ditto. * language.c: Ditto. * language.h: Ditto. * libunwind-frame.c: Ditto. * libunwind-frame.h: Ditto. * linespec.c: Ditto. * linux-nat.c: Ditto. * linux-nat.h: Ditto. * linux-thread-db.c: Ditto. * machoread.c: Ditto. * macroexp.c: Ditto. * macrotab.c: Ditto. * main.c: Ditto. * maint.c: Ditto. * mdebugread.c: Ditto. * memattr.c: Ditto. * minsyms.c: Ditto. * monitor.c: Ditto. * monitor.h: Ditto. * objfiles.c: Ditto. * objfiles.h: Ditto. * osabi.c: Ditto. * p-typeprint.c: Ditto. * p-valprint.c: Ditto. * parse.c: Ditto. * printcmd.c: Ditto. * proc-events.c: Ditto. * procfs.c: Ditto. * progspace.c: Ditto. * progspace.h: Ditto. * psympriv.h: Ditto. * psymtab.c: Ditto. * record.c: Ditto. * regcache.c: Ditto. * regcache.h: Ditto. * remote-fileio.c: Ditto. * remote.c: Ditto. * ser-mingw.c: Ditto. * ser-tcp.c: Ditto. * ser-unix.c: Ditto. * serial.c: Ditto. * serial.h: Ditto. * solib-frv.c: Ditto. * solib-irix.c: Ditto. * solib-osf.c: Ditto. * solib-pa64.c: Ditto. * solib-som.c: Ditto. * solib-sunos.c: Ditto. * solib-svr4.c: Ditto. * solib-target.c: Ditto. * solib.c: Ditto. * somread.c: Ditto. * source.c: Ditto. * stabsread.c: Ditto. * stabsread.c: Ditto. * stack.c: Ditto. * stack.h: Ditto. * symfile-mem.c: Ditto. * symfile.c: Ditto. * symfile.h: Ditto. * symmisc.c: Ditto. * symtab.c: Ditto. * symtab.h: Ditto. * target-descriptions.c: Ditto. * target-memory.c: Ditto. * target.c: Ditto. * target.h: Ditto. * terminal.h: Ditto. * thread.c: Ditto. * top.c: Ditto. * tracepoint.c: Ditto. * tracepoint.h: Ditto. * ui-file.c: Ditto. * ui-file.h: Ditto. * ui-out.h: Ditto. * user-regs.c: Ditto. * user-regs.h: Ditto. * utils.c: Ditto. * valarith.c: Ditto. * valops.c: Ditto. * valprint.c: Ditto. * valprint.h: Ditto. * value.c: Ditto. * varobj.c: Ditto. * varobj.h: Ditto. * vec.h: Ditto. * xcoffread.c: Ditto. * xcoffsolib.c: Ditto. * xcoffsolib.h: Ditto. * xml-syscall.c: Ditto. * xml-tdesc.c: Ditto.
* run copyright.sh for 2011.Joel Brobecker2011-01-011-1/+1
|
* 2010-12-31 Michael Snyder <msnyder@vmware.com>Michael Snyder2010-12-311-102/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | * charset.c: Comment cleanup and long line wrapping. * charset.h: Ditto. * c-lang.c: Ditto. * c-lang.h: Ditto. * coff-pe-read.c: Ditto. * coff-pe-read.h: Ditto. * coffread.c: Ditto. * command.h: Ditto. * complaints.c: Ditto. * complaints.h: Ditto. * completer.c: Ditto. * completer.h: Ditto. * corefile.c: Ditto. * corelow.c: Ditto. * core-regset.c: Ditto. * cp-abi.c: Ditto. * cp-abi.h: Ditto. * cp-namespace.c: Ditto. * cp-support.c: Ditto. * cp-support.h: Ditto. * cp-valprint.c: Ditto. * cp-typeprint.c: Ditto. * c-valprint.c: Ditto.
* create and use symbol_set_language.swagiaal2010-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | 2010-08-09 Sami Wagiaalla <swagiaal@redhat.com> * symtab.h: Renamed SYMBOL_INIT_LANGUAGE_SPECIFIC to SYMBOL_SET_LANGUAGE. (symbol_init_language_specific): Renamed to symbol_set_language. * symtab.c (symbol_init_language_specific): Removed redundant check for language_cplus. Renamed to symbol_set_language. * stabsread.c (define_symbol): Updated. (read_enum_type): Updated * psymtab.c (add_psymbol_to_bcache): Updated. * minsyms.c (install_minimal_symbols): Updated. * coffread.c (process_coff_symbol): SYMBOL_SET_LANGUAGE instead of SYMBOL_LANGUAGE to set the language. * minsyms.c (prim_record_minimal_symbol_full): Ditto. * mdebugread.c (new_symbol): Ditto. * cp-namespace.c (check_one_possible_namespace_symbol): Ditto. * dwarf2read.c (new_symbol_full): Ditto. * jv-lang.c (add_class_symbol): Ditto.
* gdbTom Tromey2010-07-281-0/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR c++/9946: * symfile.c (reread_symbols): Clear template_symbols. * symtab.h (struct symbol) <is_cplus_template_function>: New field. (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): New macro. (struct template_symbol): New. * symtab.c (lookup_symbol_aux_local): Use cp_lookup_symbol_imports_or_template. * objfiles.h (struct objfile) <template_symbols>: New field. * objfiles.c (relocate_one_symbol): New function. (objfile_relocate1): Use it. Relocate isolated symbols. * gdbtypes.h (struct cplus_struct_type) <n_template_arguments, template_arguments>: New fields. (TYPE_N_TEMPLATE_ARGUMENTS): New macro. (TYPE_TEMPLATE_ARGUMENTS): Likewise. (TYPE_TEMPLATE_ARGUMENT): Likewise. (lookup_typename): Update. * gdbtypes.c (lookup_typename): Constify "block" argument. * dwarf2read.c: Include vec.h. (symbolp): New typedef. (read_func_scope): Read template arguments. Allocate a template_symbol when needed. (read_structure_type): Read template arguments. (new_symbol_full): New function, from new_symbol. Handle DW_TAG_template_type_param and DW_TAG_template_value_param. (new_symbol): Rewrite as wrapper. * cp-support.h (cp_lookup_symbol_imports_or_template): Declare. * cp-namespace.c: Include language.h. (search_symbol_list): New function. (cp_lookup_symbol_imports_or_template): Likewise. gdb/testsuite PR c++/9946: * gdb.cp/temargs.exp: New file. * gdb.cp/temargs.cc: New file.
* gdb/Jan Kratochvil2010-06-281-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cp-namespace.c (cp_lookup_nested_type): New variable concatenated_name. Turn the current return condition into a reverse one. Call also lookup_static_symbol_aux on the constructed qualified name. * symtab.c (lookup_symbol_aux): Move variable objfile and searching in other files into a called ... (lookup_static_symbol_aux): ... new function here. * symtab.h (lookup_static_symbol_aux): New prototype. * valops.c (value_maybe_namespace_elt): Call also lookup_static_symbol_aux if we failed otherwise. gdb/testsuite/ * gdb.cp/namespace.exp (whatis C::cOtherFileType) (whatis ::C::cOtherFileType, whatis C::cOtherFileVar) (whatis ::C::cOtherFileVar, print C::cOtherFileVar) (print ::C::cOtherFileVar) (whatis C::OtherFileClass::cOtherFileClassType) (whatis ::C::OtherFileClass::cOtherFileClassType) (print C::OtherFileClass::cOtherFileClassVar) (print ::cOtherFileClassVar) (print ::C::OtherFileClass::cOtherFileClassVar): New tests. (ptype OtherFileClass, ptype ::C::OtherFileClass): Permit arbitrary trailing content. * gdb.cp/namespace1.cc (C::OtherFileClass::cOtherFileClassType) (C::OtherFileClass::cOtherFileClassVar) (C::OtherFileClass::cOtherFileClassVar_use, C::cOtherFileType) (C::cOtherFileVar, C::cOtherFileVar_use): New.
* 2010-05-13 Michael Snyder <msnyder@vmware.com>Michael Snyder2010-05-131-0/+4
| | | | | | | | | | | | | | | | | * charset.c: White space. * c-lang.c: White space. * cli-out.c: White space. * coffread.c: White space. * complaints.c: White space. * completer.c: White space. * corefile.c: White space. * corelow.c: White space. * cp-abi.c: White space. * cp-namespace.c: White space. * cp-support.c: White space. * cp-valprint.c: White space. * c-typeprint.c: White space. * c-valprint.c: White space.
* 2010-05-06 Michael Snyder <msnyder@vmware.com>Michael Snyder2010-05-071-1/+0
| | | | | | | | | | | | | | | * frame-unwind.c (frame_unwind_find_by_frame): Delete unused variable. * gnu-v2-abi.c (gnuv2_value_rtti_type): Delete unused variable. * cp-support.c (mangled_name_to_comp): Delete unused variable. (method_name_from_physname): Delete unused variable. (cp_func_name): Delete unused variable. (cp_validate_operator): Delete unused variable. * cp-namespace.c (cp_scan_for_anonymous_namespaces): Delete unused variable. * trad-frame.c (trad_frame_get_prev_register): Delete unused variable. * tramp-frame.c (tramp_frame_cache): Delete unused variable.
* gdb/Jan Kratochvil2010-05-031-5/+7
| | | | | | * cp-namespace.c (cp_lookup_symbol_imports): Support ALIAS for the CURRENT->DECLARATION case. * cp-support.h (struct using_direct): Provide extended comment.
* gdb/Jan Kratochvil2010-04-261-2/+2
| | | | | * cp-namespace.c (cp_lookup_symbol_in_namespace): Fix alloca size. Fix whitespace.
* 2010-03-15 Sami Wagiaalla <swagiaal@redhat.com>swagiaal2010-03-151-17/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | PR c++/7936: * cp-support.h: Added char *declaration element to using_direct data struct. (cp_add_using): Added char *declaration argument. (cp_add_using_directive): Ditto. (cp_lookup_symbol_imports): made extern. * cp-namespace.c: Updated with the above changes. * dwarf2read.c (read_import_statement): Ditto. (read_namespace): Ditto. (read_import_statement): Support import declarations. * cp-namespace.c (cp_lookup_symbol_imports): Check for imported declarations. Added support for 'declaration_only' search. (cp_lookup_symbol_namespace): Attempt to search for the name as is before consideration of imports. * symtab.c (lookup_symbol_aux_local): Added a 'declaration_only' search at every block level search. Now takes language argument. (lookup_symbol_aux): Updated. 2010-03-15 Sami Wagiaalla <swagiaal@redhat.com> * gdb.cp/shadow.exp: Removed kfail; test has been fix. * gdb.cp/nsusing.exp: Ditto.
* 2010-03-09 Sami Wagiaalla <swagiaal@redhat.com>swagiaal2010-03-101-36/+25
| | | | | | | | | | | | PR C++/11236: * cp-namespace.c (cp_add_using): Deleted. (cp_add_using_directive): Use obstack allocations. Merged the function cp_add_using into this one. Added 'struct obstack *' argument. (cp_scan_for_anonymous_namespaces): Updated. * cp-support.h: Updated. * dwarf2read.c (read_import_statement): Updated. (read_namespace): Updated.
* dwarf2_physname patchset:Keith Seitz2010-03-091-35/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on work from Daniel Jacobowitz <dan@codesourcery.com> * c-typeprint.c (cp_type_print_method_args): For non-static methods, print out const or volatile qualifiers, too. (c_type_print_args): Add parameters show_artificial and language. Skip artificial parameters when requested. Use the appropriate language printer. (c_type_print_varspec): Tell c_type_print_args to skip artificial parameters and pass language_c. * dwarf2read.c (die_list): New file global. (struct partial_die_info): Update comments for name field. (pdi_needs_namespace): Renamed to ... (die_needs_namespace): ... this. Rewrite. (dwarf2_linkage_name): Remove. (add_partial_symbol): Do not predicate the call to partial_die_full_name based on pdi_needs_namespace. Remove call to cp_check_possible_namespace_symbols and associated outdated comments. (guess_structure_name): Do not inspect child subprogram DIEs. (dwarf2_fullname): Update comments. Use die_needs_namespace to assist in computing the name. (read_func_scope): Use dwarf2_name to get the DIE's name. Use dwarf2_physname to get the "linkage name" of the DIE. (dwarf2_add_member_field): Use dwarf2_physname instead of dwarf2_linkage_name. (read_structure_type): For structs and classes, set TYPE_NAME, too. (determine_class): Remove. (read_partial_die): Ignore DW_AT_MIPS_linkage_name for all languages except Ada. (new_symbol): Unconditionally call dwarf2_name. Compute the "linkage name" using dwarf2_physname. Use dwarf2_name instead of dwarf2_full_name for enumerator DIEs. When determining to scan for anonymous C++ namespaces, ignore the linkage name. (dwarf2_physname): New function. (dwarf2_full_name): Move content to new function and call that. (dwarf2_compute_name): "New" function. (_initialize_dwarf2_read): Initialize die_list. * gnu-v3-eabi.c (gnu_v3_find_method_in): Remove unused variable physname. (gnu_v3_print_method_ptr): Use the physname for virtual methods without a demangled name. Print out type information for non-virtual methods. * linespec.c (decode_line_1): Force ANY string using "::" (or "." for java) to use decode_compound, and clean up any stray quoting. If we found a file symtab, re-evaluate whether the remainder is_quoted. (decode_compound): Stop consuming at an open parenthesis. Keep template parameters. Keep any overload information. Keep keywords like "const". Remove paren_pointer. Move is_quoted check from set_flags to here. Remove #if 0 code from 2000. Ten years is long enough. (find_method): Before comparing symbol names, canonicalize the string from the user. If a specific overload is requested, find it. Otherwise throw an error. (find_method_overload_end): New function. (set_flags): Remove. (decode_compound): Assume that parentheses are matched. It's a lot easier. * symtab.c (symbol_find_demangled_name): Add DMGL_VERBOSE flag to cplus_demangle. * linespec.c (decode_line_1): Keep important keywords like "const" and "volatile". * symtab.h (SYMBOL_CPLUS_DEMANGLED_NAME): Remove. * typeprint.h (c_type_print_args): Add declaration. * ui-file.c (do_ui_file_obsavestring): New function. (ui_file_obsavestring): New function. * ui-file.h (ui_file_obsavestring): Add declaration. * valops.c (find_overload_match): Resolve the object to a non-pointer type. If the object is a data member, search the object for the member and return with staticp set. Use SYMBOL_NATURAL_NAME instead of SYMBOL_CPLUS_DEMANGLED_NAME. Do not attempt to extract a function name from non-function types. If the extracted function name and the original name are the same, we don't have a C++ method. From Jan Kratochvil <jan.kratochvil@redhat.com>: * dwarf2read.c (new_symbol <DW_TAG_enumerator>): Call dwarf2_full_name. * ada-lang.c (ada_lookup_symbol): Remove linkage_name parameters and arguments from symbol lookups. * ax-gdb.c (gen_expr): Likewise. * cp-namespace.c (cp_lookup_symbol_nonlocal, lookup_namespace_scope, cp_lookup_symbol_namespace, lookup_symbol_file, lookup_nested_type, lookup_possible_namespace_symbol): Likewise. * cp-support.c (read_in_psymtabs): Likewise. * cp-support.h (cp_lookup_symbol_nonlocal): Likewise. * language.h (la_lookup_symbol_nonlocal): Likewise. * scm-valprint.c (scm_inferior_print): Likewise. * solib-darwin.c (darwin_relocate_section_addresses): Likewise. * solib-svr.c (elf_lookup_lib): Likewise. * solib.c (show_auto_solib_add): Likewise. * solist.h (lookup_lib_global, solib_global_lookup): Likewise. * symmisc.c (maintenance_check_symtabs): Likewise. * symtab.c (lookup_symbol_in_language, lookup_symbol_aux, lookup_symbol_aux_local, lookup_symbol_aux_block, lookup_symbol_from_objfile, lookup_symbol_aux_symtabs, lookup_symbol_aux_psymtabs,basic_lookup_symbol_nonlocal, lookup_symbol_static, lookup_symbol_global, symbol_matches_domain, basic_lookup_transparent_type, find_main_psymtab, lookup_block_symbol): Likewise. * symtab.h (basic_lookp_symbol_nonlocal, lookup_symbol_static, lookup_symbol_global, lookup_symbol_aux_block, lookup_symbol_partial_symbol, lookup_block_symbol, lookup_global_symbol, value_maybe_namespace_elt): Likewise.
* gdbTom Tromey2010-02-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | PR c++/8693, PR c++/9496: * cp-namespace.c (cp_lookup_nested_type): Handle TYPE_CODE_UNION. * c-exp.y (lex_one_token): Rename from yylex. Don't call write_dollar_variable. Don't try to classify NAME tokens. (token_and_value): New type. (token_fifo, popping, name_obstack): New globals. (classify_name): New function. (classify_inner_name): Likewise. (yylex): Likewise. (VARIABLE): Now has type sval. (exp : VARIABLE): Call write_dollar_variable. (qualified_name): Use TYPENAME, not typebase. Add production for multiple "::" instances. (variable): Use name_not_typename. (qualified_type): Remove. (typebase): Update. gdb/testsuite PR c++/8693, PR c++/9496: * gdb.cp/namespace.exp: Remove some setup_kfail calls. Added regression tests.
* 2010-02-05 Sami Wagiaalla <swagiaal@redhat.com>swagiaal2010-02-051-12/+35
| | | | | | | | | | | | | | | | | | PR c++/7935: * gdb.cp/namespace-using.exp: Removed kfail; bug has been fixed. 2010-02-05 Sami Wagiaalla <swagiaal@redhat.com> PR c++/7935: * cp-support.h: Added char* alias element to using_direct data struct. (cp_add_using): Added char* alias argument. (cp_add_using_directive): Ditto. * cp-namespace.c: Updated with the above changes. (cp_lookup_symbol_imports): Check for aliases. * dwarf2read.c (read_import_statement): Figure out local alias for the import and pass it on to cp_add_using. (read_namespace): Pass alias argument to cp_add_using.
* 2010-01-14 Sami Wagiaalla <swagiaal@redhat.com>swagiaal2010-01-261-14/+62
| | | | | | | | | | | | | | | | | | | | | | | * gdb.cp/nsrecurs.exp: New test. * gdb.cp/nsrecurs.cc: New test program. * gdb.cp/nsstress.exp: New test. * gdb.cp/nsstress.cc: New test program. * gdb.cp/nsdecl.exp: New test. * gdb.cp/nsdecl.cc: New test program. 2010-01-26 Sami Wagiaalla <swagiaal@redhat.com> * cp-namespace.c (cp_lookup_symbol_namespace): Added search_parent argument. (cp_add_using): Initialize 'searched' field. (reset_directive_searched): New function. * cp-support.h: Add 'searched' field to using_direct struct. (cp_lookup_symbol_imports): Ditto. * cp-namespace.c (cp_lookup_symbol_imports): Ditto. Perform recursive search. Implement non parent search. * valops.c (value_maybe_namespace_elt): Updated.
* 2010-01-26 Sami Wagiaalla <swagiaal@redhat.com>swagiaal2010-01-261-66/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | * gdb.cp/namespace-using.exp: Add test for printing of namespaces imported into file scope. Marked test as xfail. * gdb.cp/namespace-using.cc (marker5): New function. * gdb.cp/shadow.exp: New test. * gdb.cp/shadow.cc: New test program. * gdb.cp/nsimport.exp: New test. * gdb.cp/nsimport.cc: New test program. 2010-01-26 Sami Wagiaalla <swagiaal@redhat.com> PR gdb/10929: * dwarf2read.c (read_lexical_block_scope): Create blocks for scopes which contain using directives even if they contain no declarations. * symtab.c (lookup_symbol_aux): Pass lowest level block to la_lookup_symbol_nonlocal. * cp-namespace.c (cp_lookup_symbol_nonlocal): call cp_lookup_symbol_namespace. (cp_lookup_symbol_namespace): Perform an import lookup at every block level. (cp_lookup_symbol_imports): New function. (cp_lookup_symbol_in_namespace): New function.
* Delete unused or undefined functions.Joel Brobecker2010-01-191-33/+0
| | | | | | | | | | | | | | | | | | | | | | * breakpoint.c (ep_parse_optional_filename): Delete. * dcache.c (dcache_write_line): Remove declaration. * infrun.c (build_infrun): Remove declaration. * tracepoint.c (tracepoint_save_command): Remove declaration. * linux-nat.c (init_lwp_list): Delete. No longer used. * event-loop.c (check_async_signal_handlers): Delete declaration. * infrun.c (init_execution_control_state): Delete. (proceed): Update comment to avoid mentioning init_execution_control_state. * target.c (kill_or_be_killed, nosupport_runtime): Delete. * ada-lang.c (ada_to_static_fixed_value): Delete. * scm-lang.c (evaluate_subexp_scm): Delete declaration. * cp-namespace.c (cp_copy_usings): Delete. * xml-syscall.c (xml_number_of_syscalls): Delete. * progspace.c (find_program_space_by_num): Delete. * inflow.c (handle_sigio): Delete declaration. * hppa-tdep.c (hppa_alignof): Delete. * mipsnbsd-tdep.c (mipsnbsd_sigtramp_offset) (mipsnbsd_core_osabi_sniffer): Delete.
* Update copyright year in most headers.Joel Brobecker2010-01-011-1/+2
| | | | Automatic update by copyright.sh.
* * xcoffread.c (scan_xcoff_symtab): Update.Tom Tromey2009-11-161-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * symfile.h (add_psymbol_to_list): Update prototype. * symfile.c (add_psymbol_to_bcache): Add copy_name argument. (add_psymbol_to_list): Likewise. * stabsread.c (define_symbol): Update. * mdebugread.c (parse_partial_symbols): Update. (handle_psymbol_enumerators): Update. (new_symbol): Update. * dbxread.c (read_dbx_symtab): Update. * coffread.c (process_coff_symbol): Update. * symtab.h (prim_record_minimal_symbol_full): Declare. (SYMBOL_SET_NAMES): Add copy_name argument. * symtab.c (struct demangled_name_entry): New struct. (hash_demangled_name_entry): New function. (eq_demangled_name_entry): Likewise. (create_demangled_names_hash): Use new functions. (symbol_set_names): Use struct demangled_name_entry. Add copy_name argument. * minsyms.c (prim_record_minimal_symbol_full): New function. (prim_record_minimal_symbol_and_info): Use it. * elfread.c (record_minimal_symbol): Add name_len and copy_name arguments. Call prim_record_minimal_symbol_full. (elf_symtab_read): Add copy_names argument. (elf_symfile_read): Update calls to elf_symtab_read. * dwarf2read.c (add_partial_symbol): Don't copy symbol names. (load_partial_dies): Likewise. (new_symbol): Likewise. * cp-namespace.c (check_one_possible_namespace_symbol): Don't save name on the obstack. Update call to SYMBOL_SET_NAMES.
* 2009-07-07 Sami Wagiaalla <swagiaal@redhat.com>swagiaal2009-07-071-25/+25
| | | | | | | | | | | | | | | * cp-support.h (struct using_direct): Rename members inner and outer to import_src, and import_dest respectively. * cp-namespace.c (cp_add_using_directive): Update. (cp_add_using): Update. (cp_copy_usings): Update. (cp_lookup_symbol_namespace): Update. (cp_scan_for_anonymous_namespaces): Update. * cp-support.c (make_symbol_overload_list_using): Update. * cp-support.h (cp_add_using_directive, cp_add_using): Rename arguments from inner and outer to src and dest respectively. * cp-namespace.c (cp_add_using_directive): Ditto. (cp_add_using): Ditto.
* 2009-06-29 Sami Wagiaalla <swagiaal@redhat.com>swagiaal2009-06-291-27/+26
| | | | | | | | | | | | * dwarf2read.c (read_import_statement): Properly set import location and destination. * cp-support.h (cp_add_using, cp_add_using_directive): Now take char* inner, char* outer arguments. Updated callers. 2009-06-29 Sami Wagiaalla <swagiaal@redhat.com> * gdb.cp/namespace-nested-import.cc: New test. * gdb.cp/namespace-nested-import.exp: New test.
* 2009-06-23 Sami Wagiaalla <swagiaal@redhat.com>swagiaal2009-06-231-38/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * dwarf2read.c (process_die): Handle import statements (DW_TAG_imported_declaration, case DW_TAG_imported_module) (read_import_statement): New. (read_func_scope): Update using_directives to point to current context (read_lexical_block_scope): Ditto. * cp-support.h: Added prototype for cp_add_using. * cp-namespace.c: Removed local context_stack. (cp_initialize_namespace): Deleted. (cp_finalize_namespace): Deleted. (cp_add_using_directive): Use using_directives instead of using_list. (cp_add_using): No longer static. * buildsym.h: Created global using_direct variable. Created using_direct variable in context_stack. * buildsym.c (finish_block): Set using directives for the block under construction. (start_symtab): Removed call to cp_initialize_namespace(). (end_symtab): Removed call to cp_finalize_namespace(). (push_context): Save and reset using_directives. * block.c (block_using): Return using directives for given block instead of static block. 2009-06-23 Sami Wagiaalla <swagiaal@redhat.com> * gdb.cp/namespace-using.exp: New test. * gdb.cp/namespace-using.cc: New test.
* 2008-02-21 Pedro Alves <pedro@codesorcery.com>Pedro Alves2009-02-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Silence a few -Wmissing-prototypes warnings. PR build/9877: * amd64-nat.c: Include "amd64-nat.h". * fork-child.c (_initialize_fork_child): Ditto. * gcore.c (_initialize_gcore): Ditto. * inf-ptrace.c: Include "inf-ptrace.h". (inf_ptrace_store_registers): Make it static. * linux-nat.c (linux_nat_terminal_ours): Make it static. (_initialize_linux_nat): Declare before definition. * linux-tdep.c: Include "linux-tdep.h". * linux-thread-db.c (_initialize_thread_db): Declare before definition. * proc-service.c (_initialize_proc_service): Ditto. * remote.c (remote_send_printf): Make it static. * solib.c: Include "solib.h". * symfile-mem.c (_initialize_symfile_mem): Declare before definition. * ada-lang.c (ada_la_decode, ada_match_name) (ada_suppress_symbol_printing, ada_is_array_type) (ada_value_ptr_subscript, ada_array_length) (ada_to_static_fixed_value): Make them static. (_initialize_ada_language): Declare before definition. * ada-tasks.c (ada_get_task_number, ada_get_environment_task) (ada_task_list_changed, ada_new_objfile_observer): Make them static. (_initialize_tasks): Declare before definition. * addrmap.c (_initialize_addrmap): Declare before definition. * auxv.c (default_auxv_parse): Make it static. * bfd-target.c (target_bfd_xfer_partial, target_bfd_xclose): Make them static. * breakpoint.c (remove_sal): Add line break. (expand_line_sal_maybe): Make it static. * cp-name-parser.y: Include "cp-support.h". * cp-valprint.c (cp_find_class_member): Make it static. * eval.c (value_f90_subarray): Ditto. * exceptions.c (print_any_exception): Ditto. * findcmd.c (_initialize_mem_search): Declare before definition. * frame.c (frame_observer_target_changed): Make it static. * gnu-v3-abi.c (gnuv3_find_method_in): Make it static. * inf-child.c: Include "inf-child.h". * inferior.h (valid_inferior_id): Rename to ... (valid_gdb_inferior_id): ... this. * infrun.c (infrun_thread_stop_requested, siginfo_make_value): Make them static. * jv-lang.c (java_language_arch_info): Make it static. * m2-typeprint.c (m2_get_discrete_bounds): Ditto. * osdata.c (info_osdata_command): Make it static. * regcache.c (regcache_observer_target_changed): Make it static. * reverse.c (_initialize_reverse): Declare before definition. * stabsread.c (cleanup_undefined_types_noname) (cleanup_undefined_types_1): Make them static. * symfile.c (place_section): Make it static. * symtab.c (find_pc_sect_psymtab_closer): Make it static. * target-descriptions.c (_initialize_target_descriptions): Declare before definition. * target.c (default_get_ada_task_ptid, find_default_can_async_p) (find_default_is_async_p, find_default_supports_non_stop): Make them static. (target_supports_non_stop): Add prototype. (dummy_pid_to_str): Make it static. * utils.c (_initialize_utils): Declare before definition. * ada-exp.y (_initialize_ada_exp): Declare before definition. * solib-svr4.c (HAS_LM_DYNAMIC_FROM_LINK_MAP): Add a prototype. * target.h (struct target_ops): Add a prototype to the to_can_execute_reverse callback. * macroscope.c (_initialize_macroscope): Declare before definition. * cp-namespace.c (_initialize_cp_namespace): Declare before definition. * python/python.c (_initialize_python): Declare before definition. * tui/tui-command.c: Include "tui/tui-command.h". * tui/tui-data.c (init_content_element, init_win_info): Make them static. * tui/tui-disasm.c: Include "tui/tui-disasm.h". * tui/tui-interp.c (_initialize_tui_interp): Declare before definition. * tui/tui-layout.c: Include "tui/tui-layout.h". (_initialize_tui_layout): Declare before definition. * tui/tui-regs.c: Include "tui/tui-regs.h". (tui_display_reg_element_at_line): Make it static. (_initialize_tui_regs): Declare before definition. * tui/tui-stack.c (_initialize_tui_stack): Declare before definition. * tui/tui-win.c: Include "tui/tui-win.h". (_initialize_tui_win): Declare before definition. (tui_sigwinch_handler): Make it static. Wrap in ifdef SIGWINCH. * tui/tui-win.h (tui_sigwinch_handler): Delete declaration. (tui_get_cmd_list): Add a prototype. * tui/tui-windata.c: Include tui-windata.h. * tui/tui-wingeneral.c (box_win): Make it static. * cli/cli-logging.c (show_logging_command): Make it static. (_initialize_cli_logging): Declare before definition. * mi/mi-common.c (_initialize_gdb_mi_common): Declare before definition.
* Updated copyright notices for most files.Joel Brobecker2009-01-031-1/+1
|
* * buildsym.c (add_symbol_to_list): Do not callDaniel Jacobowitz2008-08-211-57/+25
| | | | | | | | | | | | | | | | | | | | | | | cp_scan_for_anonymous_namespaces here. (finish_block): Do not call cp_set_block_scope here. * cp-namespace.c (processing_has_namespace_info) (processing_current_prefix): Delete. (cp_initialize_namespace): Do not initialize processing_has_namespace_info. (cp_scan_for_anonymous_namespaces): Use SYMBOL_DEMANGLED_NAME. Do not check processing_has_namespace_info. (cp_set_block_scope): Take prefix and namespace info flag as arguments. Honor namespaces regardless of a demangled name. * cp-support.h (processing_has_namespace_info) (processing_current_prefix): Delete declarations. (cp_set_block_scope): Update prototype. * dwarf2read.c (processing_has_namespace_info) (processing_current_prefix): New static variables. (read_file_scope): Initialize processing_has_namespace_info. (read_func_scope): Call cp_set_block_scope for C++. (new_symbol): Call cp_scan_for_anonymous_namespaces for C++. * symtab.c (symbol_demangled_name): Accept a const argument. * symtab.h (symbol_demangled_name): Update prototype.
* * language.h (struct language_defn): Remove SYMTAB parameter fromUlrich Weigand2008-05-191-34/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | la_lookup_symbol_nonlocal callback function pointer. * ada-lang.h (ada_lookup_encoded_symbol): Remove SYMTAB parameter. (ada_lookup_encoded_symbol): Likewise. * ada-lang.c (ada_lookup_encoded_symbol): Remove SYMTAB parameter. Always call fixup_symbol_section. (ada_lookup_symbol): Remove SYMTAB parameter. (ada_lookup_symbol_nonlocal): Likewise. * ada-exp.y (write_object_renaming): Update. (find_primitive_type): Likewise. * cp-support.h (cp_lookup_symbol_nonlocal): Remove SYMTAB parameter. (cp_lookup_symbol_namespace): Likewise. * cp-namespace.c (lookup_namespace_scope): Remove SYMTAB parameter. (lookup_symbol_file): Likewise. (lookup_possible_namespace_symbol): Likewise. (cp_lookup_symbol_nonlocal): Likewise. (cp_lookup_symbol_namespace): Likewise. (cp_lookup_nested_type): Update. * scm-valprint.c (scm_inferior_print): Update. * valops.c (value_maybe_namespace_elt): Update. * solist.h (struct target_so_ops): Remove SYMTAB parameter from lookup_lib_global_symbol callback function pointer. (solib_global_lookup): Remove SYMTAB parameter. * solib.c (solib_global_lookup): Remove SYMTAB parameter. * solib-svr4.c (elf_lookup_lib_symbol): Likewise. * symtab.h (basic_lookup_symbol_nonlocal): Remove SYMTAB parameter. (lookup_symbol_static): Likewise. (lookup_symbol_global): Likewise. (lookup_symbol_aux_block): Likewise. (lookup_global_symbol_from_objfile): Likewise. * symtab.c (lookup_symbol_aux): Remove SYMTAB parameter. (lookup_symbol_aux_local): Likewise. (lookup_symbol_aux_block): Likewise. (lookup_symbol_aux_symtabs): Likewise. (lookup_symbol_aux_psymtabs): Likewise. (lookup_global_symbol_from_objfile): Likewise. (basic_lookup_symbol_nonlocal): Likewise. (lookup_symbol_static): Likewise. (lookup_symbol_global): Likewise. (lookup_symbol_in_language): Do not pass SYMTAB to lookup_symbol_aux.
* Updated copyright notices for most files.Daniel Jacobowitz2008-01-011-1/+1
|
* Switch the license of all .c files to GPLv3.Joel Brobecker2007-08-231-4/+2
| | | | | Switch the license of all .h files to GPLv3. Switch the license of all .cc files to GPLv3.