aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
AgeCommit message (Collapse)AuthorFilesLines
2011-11-11 * dwarf2read.c (dw2_map_symbol_filenames): New parameterDoug Evans1-2/+4
`need_fullname'. * psymtab.c (map_symbol_filenames_psymtab): Ditto. (map_partial_symbol_filenames): Ditto. All callers updated. * psymtab.h (map_partial_symbol_filenames): Update prototype. * symfile.h (struct quick_symbol_functions, map_symbol_filenames): New parameter need_fullname.
2011-10-29gdb/Jan Kratochvil1-2/+2
Code cleanup. * symtab.c (skip_prologue_sal): Code reformatting.
2011-10-2811-10-28 Sterling Augustine <saugustine@google.com>Sterling Augustine1-0/+31
* psymtab.c (map_symbol_filenames_psymtab): Call QUIT. * symtab.c (free_completion_list): New function. (do_free_completion_list): Likewise. (default_make_symbol_completion_list_break_on): New variable back_to. Call make_cleanup and discard_cleanups. (make_source_files_completion_list): Likewise.
2011-07-21PR macros/12999matt rice1-0/+1
* macrotab.h (macro_callback_fn): Add new arguments to callback. * macrotab.c (foreach_macro): Ditto. (foreach_macro_in_scope): Ditto. * macrocmd.c (print_macro_callback): New function. (info_macro_command): Move some code to print_macro_definition. (print_macro_definition): New function. (print_one_macro): Add new arguments to callback. testsuite/ * gdb.base/info-macros.c: New test sources. * gdb.base/info-macros.exp: New tests. docs/ * gdb.texinfo (Macros): Add info definitions and info macros commands. Update text and cindex entries for info macro command.
2011-07-05 * symtab.c (operator_chars): Now static.Tom Tromey1-5/+1
* linespec.c (operator_chars): Don't declare.
2011-07-04 * symtab.c (in_prologue): Remove mention of ppc's refine_prologue_limit.Thiago Jung Bauermann1-2/+2
2011-07-04 * symtab.c (expand_line_sal): Remove empty line.Thiago Jung Bauermann1-1/+0
2011-07-04 * breakpoint.c: Fix typos in comments.Thiago Jung Bauermann1-1/+1
* linespec.c: Likewise. * symtab.c: Likewise.
2011-07-01gdb/Jan Kratochvil1-1/+1
* symtab.c (symbol_find_demangled_name): Likewise. gdb/testsuite/ * gdb.cp/no-dmgl-verbose.cc: New file. * gdb.cp/no-dmgl-verbose.exp: New file.
2011-06-20 * symtab.c (lookup_language_this): End loop if block is NULL.Tom Tromey1-2/+4
2011-06-17 * valops.c (value_of_this): Use lookup_language_this.Tom Tromey1-12/+25
* symtab.h (lookup_language_this): Declare. * symtab.c (lookup_language_this): New function. (lookup_symbol_aux): Use lookup_language_this. * ax-gdb.c (gen_expr) <OP_THIS>: Use lookup_language_this.
2011-06-10gdb/Jan Kratochvil1-1/+1
* symtab.c (output_partial_symbol_filename): Exchange the filename and fullname parameters order. gdb/testsuite/ * gdb.dwarf2/dw2-filename.exp (info sources): New testcase.
2011-05-18 * value.c (value_fn_field): Constify.Tom Tromey1-1/+1
* symtab.c (gdb_mangle_name): Constify. * stabsread.c (update_method_name_from_physname): Make 'physname' argument const. * p-typeprint.c (pascal_type_print_method_args): Make arguments const. Use explicit fputc_filtered loop. (pascal_type_print_base): Constify. * p-lang.h (pascal_type_print_method_args): Update. * linespec.c (add_matching_methods): Constify. (add_constructors): Likewise. * jv-typeprint.c (java_type_print_base): Constify. * gdbtypes.h (struct cplus_struct_type) <fn_fieldlist.fn_field.physname>: Now const. * dwarf2read.c (compute_delayed_physnames): Constify. (dwarf2_add_member_fn): Likewise. * c-typeprint.c (c_type_print_base): Constify. Use cleanups.
2011-05-11 * symtab.c (lookup_symtab): Run cleanup before returning.Thiago Jung Bauermann1-3/+18
2011-05-06gdb/Jan Kratochvil1-35/+59
PR 12573 * dwarf2read.c (struct dwarf2_cu): New field has_loclist. (producer_is_gcc_ge_4_0): New function. (process_full_comp_unit): Set also symtab->locations_valid. Move the symtab->language code. (var_decode_location): Set cu->has_loclist. * symtab.c (skip_prologue_sal): New variables saved_pc, force_skip and skip. Intialize force_skip from locations_valid. Move the prologue skipping code into two passes. * symtab.h (struct symtab): Make the primary field a bitfield. New field locations_valid. gdb/testsuite/ PR 12573 * gdb.dwarf2/dw2-skip-prologue.S: New file. * gdb.dwarf2/dw2-skip-prologue.c: New file. * gdb.dwarf2/dw2-skip-prologue.exp: New file.
2011-05-06gdb/Jan Kratochvil1-12/+53
* symtab.c (compare_symbol_name): New function. (completion_list_add_name, expand_partial_symbol_name): Call it, remove the variable ncmp. (default_make_symbol_completion_list_break_on): Reduce SYM_TEXT_LEN, gdb_assert it. gdb/testsuite/ * gdb.cp/psymtab-parameter.cc: New file. * gdb.cp/psymtab-parameter.exp: New file.
2011-04-28gdb/Jan Kratochvil1-1/+4
* symtab.c (expand_partial_symbol_name): New variable NCMP. Support case insensitive comparison.
2011-04-27gdb/doc/Jan Kratochvil1-15/+7
* gdb.texinfo (Index Section Format): Change the version to 5. Describe the different formula. gdb/ Case insensitive lookups implementation. * dwarf2read.c: Include ctype.h. (struct mapped_index): New field version. (mapped_index_string_hash): New parameter index_version. New comment for it. Call tolower appropriately. (find_slot_in_mapped_hash): New variable cmp, initialize it, use it. Choose the right index version for mapped_index_string_hash. (dwarf2_read_index): Support also the index version 5. Initialize the new struct mapped_index field version. (hash_strtab_entry): Pass INT_MAX for the new parameter, explain why. (find_slot): Explain the version needs. Pass INT_MAX for the new parameter. (write_psymtabs_to_index): Produce version 5. * minsyms.c (lookup_minimal_symbol): New variable cmp, initialize it, use it. New comment for SYMBOL_MATCHES_SEARCH_NAME. * psymtab.c (lookup_partial_symbol): Find the SYMBOL_MATCHES_SEARCH_NAME start of the found block of matching entries. * symtab.c (lookup_symbol_in_language): Remove the case_sensitive_off NAME lowercasing. (search_symbols): Pass REG_ICASE to regcomp for case_sensitive_off. (completion_list_add_name): New variable ncmp, initialize it, use it. * symtab.h (SYMBOL_HASH_NEXT): Always call tolower. * utils.c (strcmp_iw): Support case_sensitive_off. (strcmp_iw_ordered): Sort in a way compatible with case_sensitive_off. New function comment part. New variables saved_string1, saved_string2 and case_pass. Add a proper second pass. gdb/testsuite/ * gdb.base/fortran-sym-case.c: New file. * gdb.base/fortran-sym-case.exp: New file. * gdb.dwarf2/dw2-case-insensitive-debug.S: New file. * gdb.dwarf2/dw2-case-insensitive.c: New file. * gdb.dwarf2/dw2-case-insensitive.exp: New file.
2011-04-27gdb/Jan Kratochvil1-16/+37
Replace re_comp/re_exec by regcomp/regexec. * symtab.c (struct search_symbols_data): New fields preg, preg_p. (search_symbols_name_matches): Use them, use regexec. (search_symbols): New variable retval_chain, adjust the use of old_chain against it. Replace re_comp by regcomp. Use the new struct search_symbols_data fields, use regexec instead of re_exec.
2011-04-20gdb/Jan Kratochvil1-9/+9
* ada-lang.c (struct add_partial_datum): Update the comment for expand_partial_symbol_name. (ada_add_partial_symbol_completions): Rename to ... (ada_expand_partial_symbol_name): ... here, change return type, update function comment, call symbol_completion_match instead of symbol_completion_add. (ada_make_symbol_completion_list): Use now expand_partial_symbol_names and ada_expand_partial_symbol_name. * dwarf2read.c (dw2_expand_symtabs_matching): Support NULL FILE_MATCHER. (dw2_map_symbol_names): Remove. (dwarf2_gdb_index_functions): Unlist dw2_map_symbol_names. * psymtab.c (map_symbol_names_psymtab): Remove. (expand_symtabs_matching_via_partial): Support NULL FILE_MATCHER. Support KIND == ALL_DOMAIN. Exchange the NAME_MATCHER and KIND check order. (psym_functions): Unlist map_symbol_names_psymtab. (map_partial_symbol_names): Rename to ... (expand_partial_symbol_names): ... here, change the FUN type, call expand_symtabs_matching with ALL_DOMAIN and NULL FILE_MATCHER now. * psymtab.h (map_partial_symbol_names): Rename to ... (expand_partial_symbol_names): ... here, change the FUN type. * symfile.h (struct quick_symbol_functions): Update the description of expand_symtabs_matching. Remove map_symbol_names. * symtab.c (search_symbols): Add ALL_DOMAIN to the function comment. (struct add_name_data): Update the comment for expand_partial_symbol_name. (add_partial_symbol_name): Rename to ... (expand_partial_symbol_name): ... here. Replace completion_list_add_name call by strncmp. (default_make_symbol_completion_list_break_on): Use now expand_partial_symbol_names and expand_partial_symbol_name. * symtab.h (enum search_domain): New element ALL_DOMAIN. gdb/testsuite/ * gdb.cp/cpcompletion.exp (complete class methods) (complete class methods beginning with F): Move them above runto. New comment about the runto delimiter.
2011-04-19gdbTom Tromey1-1/+1
* windows-tdep.c (windows_xfer_shared_library): * windows-nat.c (get_module_name, windows_make_so): * v850-tdep.c (v850_handle_pushm): * utils.c (null_cleanup, gdb_realpath): * ui-out.c (get_next_header): * tracepoint.c (clear_traceframe_info): * symtab.c (lookup_symtab): * serial.h (struct serial_ops): * mipsread.c (read_alphacoff_dynamic_symtab): * infcmd.c (print_return_value): * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): * f-exp.y (parse_number): * exceptions.c (catch_exceptions): * dummy-frame.c (dummy_frame_this_id): * defs.h (struct cleanup): * breakpoint.c (disable_breakpoints_in_unloaded_shlib): * arm-tdep.c (arm_push_dummy_call): * amd64-tdep.h (amd64_collect_xsave): * amd64-tdep.c (amd64_collect_xsave): * alpha-tdep.c (alpha_heuristic_frame_unwind_cache): * README (typing): Remove duplicate words. * cli/cli-decode.c (lookup_cmd_composition): Add comma. * infrun.c (siginfo_value_read): Fix typo. * solib-frv.c (frv_fdpic_find_global_pointer): Likewise. * top.c (source_line_number): Add comma. gdb/doc * gdbint.texinfo (Register Information Functions): Remove duplicate "the". * gdb.texinfo (Emacs): Remove duplicate "to". (GDB/MI Variable Objects): Remove duplicate "the". (General Query Packets): Likewise. gdb/testsuite * gdb.mi/mi-nsmoribund.exp: * gdb.hp/gdb.objdbg/objdbg01.exp: * gdb.base/structs.exp (test_struct_returns): * gdb.base/call-sc.exp (test_scalar_returns): * gdb.base/bigcore.exp: Remove duplicate words. gdb/gdbserver * win32-low.c (handle_load_dll): Remove duplicate "the".
2011-04-09gdb/Jan Kratochvil1-7/+11
Code cleanup. * symtab.c (search_symbols): Reorder the KIND description in the function comment. Remove the unused 4th element of types, types2, types3 and types4. New gdb_assert on KIND. (symtab_symbol_info): Remove the unused 4th element of classnames. New gdb_assert on KIND. * symtab.h (enum search_domain): New warning in the enum comment. Assign numbers to the elements VARIABLES_DOMAIN, FUNCTIONS_DOMAIN and TYPES_DOMAIN.
2011-04-04 * tracepoint.c (scope_info): Update.Tom Tromey1-1/+1
* symtab.c (decode_line_spec): Update. * python/python.c (gdbpy_decode_line): Update. * linespec.h (decode_line_1): Update. * linespec.c (decode_line_1): Remove 'not_found_ptr' argument. (decode_compound, find_method, symtab_from_filename) (decode_variable): Likewise. * cli/cli-cmds.c (edit_command): Update. (list_command): Update. * breakpoint.c (parse_breakpoint_sals): Remove 'not_found_ptr' argument. (create_breakpoint): Update. (until_break_command): Update. (addr_string_to_sals): Update. (decode_line_spec_1): Update.
2011-04-04 * symtab.h (domain_enum): Split in two...Tom Tromey1-16/+10
(enum search_domain): New. (search_symbols): Update. * symtab.c (print_symbol_info, symtab_symbol_info): Remove redundant declarations. (search_symbols): Change 'kind' argument to search_domain. Update. (print_symbol_info): Likewise. (symtab_symbol_info): Likewise. * symfile.h (struct quick_symbol_functions) <pre_expand_symtabs_matching>: Change type of 'kind' argument. <expand_symtabs_matching>: Likewise. * psymtab.c (pre_expand_symtabs_matching_psymtabs): Update. (expand_symtabs_matching_via_partial): Update. * dwarf2read.c (dw2_pre_expand_symtabs_matching): Update. (dw2_expand_symtabs_for_function): Update. * block.h: Moved anonymous enum... * defs.h (enum block_enum): ... here. Now named.
2011-03-28gdb/Jan Kratochvil1-1/+1
GDB internal type support for STT_GNU_IFUNC. * elfread.c (record_minimal_symbol): Support mst_text_gnu_ifunc. (elf_symtab_read): Set mst_text_gnu_ifunc for BSF_GNU_INDIRECT_FUNCTION. * eval.c (evaluate_subexp_standard): Support TYPE_GNU_IFUNC. * gdbtypes.c (init_type): Support TYPE_FLAG_GNU_IFUNC, builtin_func_func, nodebug_text_gnu_ifunc_symbol and nodebug_got_plt_symbol. * gdbtypes.h (enum type_flag_value): New entry TYPE_FLAG_GNU_IFUNC. (TYPE_GNU_IFUNC): New. (struct main_type): New field flag_gnu_ifunc. (struct builtin_type): New field builtin_func_func. (struct objfile_type): New fields nodebug_text_gnu_ifunc_symbol and nodebug_got_plt_symbol. * minsyms.c (lookup_minimal_symbol_text): Support mst_text_gnu_ifunc. (in_gnu_ifunc_stub): New. (prim_record_minimal_symbol, find_solib_trampoline_target): Support mst_text_gnu_ifunc. * parse.c (write_exp_msymbol): New variable ifunc_msym. Detect and support mst_text_gnu_ifunc. Support mst_slot_got_plt. * solib-svr4.c (svr4_in_dynsym_resolve_code): Return true also for in_gnu_ifunc_stub. * symmisc.c (dump_msymbols): Support mst_text_gnu_ifunc. * symtab.c (search_symbols): Likewise. * symtab.h (enum minimal_symbol_type): New fields mst_text_gnu_ifunc and mst_slot_got_plt. (in_gnu_ifunc_stub): New declaration.
2011-03-24 * symtab.c (decode_line_spec): Update.Tom Tromey1-1/+1
* linespec.c (build_canonical_line_spec): Change type of 'canonical'. (decode_line_2, decode_line_1, decode_objc, decode_compound) (find_method, decode_all_digits, decode_dollar, decode_label) (symbol_found): Likewise. (init_linespec_result): New function. * breakpoint.c (struct captured_parse_breakpoint_args) <canonical_p>: New field, replaces addr_string_p. (create_breakpoints_sal): Add 'canonical' parameter, replacing 'addr_string'. (parse_breakpoint_sals): Likewise. (do_captured_parse_breakpoint): Update. (create_breakpoint): Use struct linespec_result. (until_break_command): Update. (breakpoint_re_set_one): Update. (decode_line_spec_1): Update. * linespec.h (struct linespec_result): New. (init_linespec_result): Declare.
2011-03-232011-03-23 Kai Tietz <ktietz@redhat.com>Kai Tietz1-28/+8
* breakpoint.c (clear_command): Use filename_cmp instead of strcmp for comparison. * buildsym.c (watch_main_source_file_lossage): Likewise. (patch_subfile_names): Use IS_DIR_SEPARATOR instead of checking just for slash. * dbxread.c (read_dbx_symtab): Use lbasename instead of strrchr and filename_cmp instead of strcmp for filenames. (add_old_header_file): Use filename_cmp instead of strcmp for comparison. * exec.c (exec_set_section_address): Likewise. * macrotab.c (macro_lookup_inclusion): Likewise. (macro_lookup_inclusion): Likewise. * elfread.c (_initialize_elfread): Likewise. (elfstab_offset_sections): Likewise. (elfstab_offset_sections): Use lbasename instead of strrchr. * mdebugread.c (parse_partial_symbols): Likewise. (arse_partial_symbols): Use filename_(n)cmp instead of str(n)cmp for comparison. * minsyms.c (lookup_minimal_symbol): Likewise. * psymtab.c (read_psymtabs_with_filename): Likewise. * solib.c (solib_read_symbols): Likewise. (reload_shared_libraries_1): Likewise. * symmisc.c (maintenance_print_symbols): Likewise. * symfile.c (separate_debug_file_exists): Likewise. (reread_symbols): Likewise. (find_separate_debug_file_by_debuglink): Likewise. * remote-fileio.c (remote_fileio_func_rename): Likewise. * source.c (add_path): Likewise. * symtab.c (filename_seen): Likewise. (file_matches): Likewise. (print_symbol_info): Likewise. (maybe_add_partial_symtab_filename): Likewise. (make_source_files_completion_list): Likewise. * xml-syscall.c (init_sysinfo): Likewise. * windows-nat.c (_initialize_check_for_gdb_ini): Use IS_DIR_SEPARATOR for checking for trailing path separator.
2011-02-272011-02-27 Michael Snyder <msnyder@vmware.com>Michael Snyder1-2/+1
* symtab.c (rbreak_command): Move variable 'file_name' to outer scope.
2011-02-13gdb/Jan Kratochvil1-1/+6
* symtab.c (find_pc_sect_line): New variable objfile, initialize it from S. Iterate S using ALL_OBJFILE_SYMTABS. Verify BV for each S. * symtab.h (struct symtab) <next>: Comment extension.
2011-01-112011-01-11 Michael Snyder <msnyder@vmware.com>Michael Snyder1-89/+88
* s390-tdep.c: Comment cleanup, mostly periods and spaces. * score-tdep.c: Ditto. * score-tdep.h: Ditto. * ser-base.c: Ditto. * ser-go32.c: Ditto. * serial.c: Ditto. * serial.h: Ditto. * ser-mingw.c: Ditto. * ser-pipe.c: Ditto. * ser-tcp.c: Ditto. * ser-unix.c: Ditto. * sh64-tdep.c: Ditto. * shnbsd-nat.c: Ditto. * sh-tdep.c: Ditto. * sh-tdep.h: Ditto. * solib.c: Ditto. * solib-darwin.c: Ditto. * solib-frv.c: Ditto. * solib.h: Ditto. * solib-irix.c: Ditto. * solib-osf.c: Ditto. * solib-pa64.c: Ditto. * solib-som.c: Ditto. * solib-spu.c: Ditto. * solib-sunos.c: Ditto. * solib-svr4.c: Ditto. * solist.h: Ditto. * sol-thread.c: Ditto. * somread.c: Ditto. * source.c: Ditto. * source.h: Ditto. * sparc64-linux-tdep.c: Ditto. * sparc64-tdep.c: Ditto. * sparc-linux-nat.c: Ditto. * sparc-linux-tdep.c: Ditto. * sparc-sol2-nat.c: Ditto. * sparc-sol2-tdep.c: Ditto. * sparc-tdep.c: Ditto. * sparc-tdep.h: Ditto. * spu-tdep.c: Ditto. * stabsread.c: Ditto. * stabsread.h: Ditto. * stack.c: Ditto. * symfile.c: Ditto. * symfile.h: Ditto. * symmisc.c: Ditto. * symtab.c: Ditto. * symtab.h: Ditto. * target.c: Ditto. * target-descriptions.c: Ditto. * target-descriptions.h: Ditto. * target.h: Ditto. * target-memory.c: Ditto. * terminal.h: Ditto. * thread.c: Ditto. * top.c: Ditto. * tracepoint.c: Ditto. * tracepoint.h: Ditto. * trad-frame.h: Ditto. * typeprint.c: Ditto.
2011-01-052011-01-05 Michael Snyder <msnyder@vmware.com>Michael Snyder1-19/+37
* 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.
2011-01-01run copyright.sh for 2011.Joel Brobecker1-1/+1
2010-10-17gdb/Jan Kratochvil1-0/+3
Fix the `stopped language detection' testcase for gcc-4.5. * dwarf2read.c (read_partial_die): Set also LANGUAGE_OF_MAIN. * symfile.c (set_initial_language): Move variable filename to a more inner block. Prefer LANGUAGE_OF_MAIN. * symtab.c (language_of_main): New variable. (set_main_name): Always reset LANGUAGE_OF_MAIN. * symtab.h (language_of_main): New declaration.
2010-09-08 Revert:Tom Tromey1-140/+27
2010-09-01 Tom Tromey <tromey@redhat.com> * dwarf2read.c, gdbtypes.c, psymtab.c, symfile.h, symtab.c, symtab.h: Revert earlier change.
2010-09-01 * symtab.h (lookup_type_symbol): Declare.Tom Tromey1-27/+140
* symtab.c (lookup_symbol_in_language_full): Rename from lookup_symbol_in_language. Add 'for_type' argument. (lookup_symbol_in_language): New function. (lookup_type_symbol): Likewise. (lookup_symbol_aux): Add 'for_type' argument. (match_symbol_aux): New function. (lookup_symbol_aux_symtabs): Use expand_one_symtab_matching. (match_transparent_type): New function. (basic_lookup_transparent_type): Use expand_one_symtab_matching. * symfile.h (struct quick_symbol_functions) <pre_expand_symtabs_matching>: Remove. <expand_one_symtab_matching>: New field. * psymtab.c (expand_one_symtab_matching_psymtabs): New function. (pre_expand_symtabs_matching_psymtabs): Remove. (psym_functions): Update. * gdbtypes.c (lookup_typename): Use lookup_type_symbol. * dwarf2read.c (dw2_lookup_symbol): Update comment. (dw2_pre_expand_symtabs_matching): Remove. (dw2_expand_one_symtab_matching): New function. (dwarf2_gdb_index_functions): Update.
2010-08-19Fix regression in -file-list-exec-source-files command.Joel Brobecker1-1/+1
See http://sourceware.org/ml/gdb/2010-07/msg00118.html for a description of the problem. Namely, the file and fullname fields are inverted in the output of the -file-list-exec-source-files GDB/MI command: (gdb) interpreter-exec mi -file-list-exec-source-files ^done,files=[{file="/takamaka.a/brobecke/ex/list-exec-source-files/foo.c",fullname="foo.c"},{file="/takamaka.a/brobecke/ex/list-exec-source-files/foo.c",fullname="foo.c"},{file="",fullname="init.c"},{file="",fullname="../sysdeps/x86_64/elf/start.S"},{file="",fullname="../sysdeps/x86_64/elf/start.S"}] It turns out to be a silly thinko: The map_symbol_filenames function calls the psymtab version of map_symbol_filenames routine, and this version called the callback function with filename and fullname in the wrong order (fullname/filename instead of filename/fullname). The routine description in symfile.h confirst that expected order for the FUN callback parameters: /* Call a callback for every file defined in OBJFILE. FUN is the callback. It is passed the file's name, the file's full name, and the DATA passed to this function. */ void (*map_symbol_filenames) (struct objfile *objfile, void (*fun) (const char *, const char *, void *), void *data); Fixing this error uncovered another location where the arguments were reversed: maybe_add_partial_symtab_filename. Once the first error was fixed, the debugger would crash while attempting to do completion, because it was given a NULL fullname instead of the non-NULL filename. gdb/ChangeLog: * psymtab.c (map_symbol_filenames_psymtab): Call FUN with the arguments in the correct order. * symtab.c (maybe_add_partial_symtab_filename): Declare the arguments in the correct order.
2010-08-09Fixed stabs cplus_specific issueSami Wagiaalla1-2/+4
2010-08-09 Sami Wagiaalla <swagiaal@redhat.com> * symtab.c (symbol_get_demangled_name): Remove assertion and return NULL when language_specific.cplus_specific is not initialized. * stabsread.c (define_symbol): Set the name before calling cp_scan_for_anonymous_namespaces.
2010-08-09create and use symbol_set_language.Sami Wagiaalla1-5/+3
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.
2010-08-03 * breakpoint.c (bpdisp_text): Constify bpdisps.Doug Evans1-5/+6
* solib-svr4.c (solib_break_names): Constify. (bkpt_names, main_name_list): Constify. (match_main): Constify soname arg. (bfd_lookup_symbol): Constify symname arg. (enable_break): Constify bkpt_namep. * symtab.c (search_symbols): Constify types, types2, types3, types4. (symtab_symbol_info): Constify classnames.
2010-07-28gdbTom Tromey1-6/+2
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.
2010-07-23 * symtab.c (basic_lookup_transparent_type): Call pre-expandKeith Seitz1-6/+13
hook for STATIC_BLOCK types, too.
2010-07-16Use allocated cplus_specific for cplus symbols.Sami Wagiaalla1-8/+44
2010-07-16 Sami Wagiaalla <swagiaal@redhat.com> * symtab.h (symbol_set_demangled_name): Now takes an optional objfile* argument. (cplus_specific): New struct. * symtab.c (symbol_set_demangled_name): Updated. Use cplus_specific for cplus symbols. (symbol_get_demangled_name): Retrive the name from the cplus_specific struct for cplus symbols. (symbol_init_language_specific): Set cplus_specific for cplus symbols. (symbol_set_names): Pass objfile to symbol_set_demangled_name. * symtab.c (symbol_init_cplus_specific): New function.
2010-07-16Use setter and getter for demangled_name.Sami Wagiaalla1-13/+28
2010-07-16 Sami Wagiaalla <swagiaal@redhat.com> * symtab.h (symbol_set_demangled_name): New function. (symbol_get_demangled_name): New function. * symtab.c (symbol_set_demangled_name): New function. (symbol_get_demangled_name): New function. (symbol_init_language_specific): Use demangled_name setter and getter. (symbol_set_names): Ditto. (symbol_natural_name): Ditto. (symbol_demangled_name): Ditto. * dwarf2read.c (new_symbol): Ditto.
2010-07-16Rename cplus_specific mangled_lang.Sami Wagiaalla1-12/+12
2010-07-16 Sami Wagiaalla <swagiaal@redhat.com> * symtab.h: Renamed cplus_specific to mangled_lang. * symtab.c (symbol_init_language_specific): Updated. (symbol_set_names): Updated. (symbol_natural_name): Updated. (symbol_demangled_name): Updated. * ada-lang.c (ada_decode_symbol): Updated. * dwarf2read.c (new_symbol): Updated.
2010-07-13 * symfile.c (set_initial_language): Update.Tom Tromey1-2/+4
(deduce_language_from_filename): Argument type now const. * symtab.h (find_main_filename): Update. (deduce_language_from_filename): Update. * symtab.c (find_main_filename): Make result const. * dwarf2read.c (dw2_find_symbol_file): Change return type. * psymtab.c (find_symbol_file_from_partial): Change return type. * symfile.h (struct quick_symbol_functions) <find_symbol_file>: Make result const.
2010-07-13 * symtab.c (lookup_symbol_aux_symtabs): Call pre-expand hook.Tom Tromey1-17/+35
(basic_lookup_transparent_type): Likewise. * symfile.h (struct quick_symbol_functions) <pre_expand_symtabs_matching>: New field. * psymtab.c (pre_expand_symtabs_matching_psymtabs): New function. (psym_functions): Update.
2010-06-29 PR c++/11702Doug Evans1-2/+7
* NEWS: Add entry. * dwarf2read.c (dwarf2_add_field): If DW_AT_const_value is present, create a symbol for the field and record the value. (new_symbol): Handle DW_TAG_member. * gdbtypes.c (field_is_static): Remove FIXME. * symtab.c (search_symbols): When searching for VARIABLES_DOMAIN, only ignore LOC_CONST symbols that are enums. testsuite/ Test PR c++/11702. * gdb.cp/m-static.exp: Add testcase. * gdb.cp/m-static.h (gnu_obj_4): Add initialized static const member.
2010-06-28gdb/Jan Kratochvil1-5/+15
* 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-06-02gdb/Jan Kratochvil1-4/+19
Support DW_TAG_module as separate namespaces. * dwarf2read.c (typename_concat): New parameter physname. (read_module_type): New function and declaration. (scan_partial_symbols): Scan also DW_TAG_module children. (partial_die_parent_scope): Accept scope even from DW_TAG_module. Pass to typename_concat backward compatible physname value 0. (partial_die_full_name, read_namespace_type): Pass to typename_concat backward compatible physname value 0. (add_partial_module, read_module): Remove FIXME comment. (process_die) <DW_TAG_module>: Set PROCESSING_HAS_NAMESPACE_INFO. (die_needs_namespace) <DW_TAG_variable>: Allow returning true even for DIEs under DW_TAG_module. (dwarf2_compute_name): Move the ada block for DW_AT_linkage_name and DW_AT_MIPS_linkage_name first, extend it for language_fortran && physname and return there instead of just setting NAME. Extend the main block for language_fortran. Pass physname parameter to the typename_concat call. (read_import_statement, read_func_scope, get_scope_pc_bounds) (load_partial_dies, determine_prefix): Support also DW_TAG_module. (new_symbol): Fill in cplus_specific.demangled_name if it is still missing from SYMBOL_SET_NAMES in the language_fortran case. (new_symbol) <DW_TAG_variable>: Force LOC_UNRESOLVED for gfortran module variables. (read_type_die) <DW_TAG_module>: New. (MAX_SEP_LEN): Increase to 7. (typename_concat): New parameter physname. New variable lead. Support also language_fortran. * f-exp.y (yylex): Consider : also as a symbol name character class. * f-lang.c: Include cp-support.h. (f_word_break_characters, f_make_symbol_completion_list): New functions. (f_language_defn): Use cp_lookup_symbol_nonlocal, f_word_break_characters and f_make_symbol_completion_list. * f-typeprint.c (f_type_print_base) <TYPE_CODE_MODULE>: New. * gdbtypes.h (enum type_code) <TYPE_CODE_MODULE>: New. * symtab.c (symbol_init_language_specific): Support language_fortran. (symbol_find_demangled_name): New comment on language_fortran. (symbol_natural_name, symbol_demangled_name): Use demangled_name even for language_fortran. (lookup_symbol_aux_local): Check imports also for language_fortran. (default_make_symbol_completion_list): Rename to ... (default_make_symbol_completion_list_break_on): ... this name. New parameter break_on, use it. (default_make_symbol_completion_list): New stub. * symtab.h (default_make_symbol_completion_list_break_on): New prototype. gdb/testsuite/ Support DW_TAG_module as separate namespaces. * gdb.fortran/library-module.exp, gdb.fortran/library-module-main.f90, gdb.fortran/library-module-lib.f90: New. * gdb.fortran/module.exp: Replace startup by a prepare_for_testing call. (print i): Remove. (continue to breakpoint: i-is-1, print var_i value 1) (continue to breakpoint: i-is-2, print var_i value 2) (continue to breakpoint: a-b-c-d, print var_a, print var_b, print var_c) (print var_d, print var_i value 14, ptype modmany, complete `modm) (complete `modmany, complete `modmany`, complete `modmany`var) (show language, setting breakpoint at module): New tests. * gdb.fortran/module.f90 (module mod): Remove. (module mod1, module mod2, module modmany, subroutine sub1) (subroutine sub2, program module): New.
2010-05-162010-05-16 Michael Snyder <msnyder@vmware.com>Michael Snyder1-25/+47
* scm-exp.c: White space. * scm-lang.c: White space. * scm-valprint.c: White space. * sentinel-frame.c: White space. * ser-base.c: White space. * ser-go32.c: White space. * serial.c: White space. * ser-mingw.c: White space. * ser-pipe.c: White space. * ser-tcp.c: White space. * ser-unix.c: White space. * solib.c: White space. * solib-darwin.c: White space. * solib-frv.c: White space. * solib-irix.c: White space. * solib-osf.c: White space. * solib-pa64.c: White space. * solib-som.c: White space. * solib-spu.c: White space. * solib-svr4.c: White space. * solib-target.c: White space. * source.c: White space. * stabsread.c: White space. * stack.c: White space. * std-regs.c: White space. * symfile.c: White space. * symmisc.c: White space. * symtab.c: White space.