Commit Graph

21 Commits

Author SHA1 Message Date
Tom Tromey ccefe4c44c gdb
* xcoffread.c: Include psymtab.h.
	(xcoff_sym_fns): Update.
	* symtab.h (struct partial_symbol): Remove.
	(PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.
	(struct partial_symtab): Remove.
	(PSYMTAB_TO_SYMTAB): Remove.
	(lookup_partial_symbol, lookup_partial_symtab, find_pc_psymtab)
	(find_pc_sect_psymtab): Remove.
	(find_pc_sect_symtab_via_partial): Declare.
	(find_pc_psymtab, find_pc_sect_psymbol, psymtab_to_symtab)
	(find_main_psymtab): Remove.
	(find_main_filename): Declare.
	(fixup_psymbol_section): Remove.
	(fixup_section): Declare.
	* symtab.c: Include psymtab.h.
	(lookup_symtab): Use lookup_symtab method.
	(lookup_partial_symtab): Remove.
	(find_pc_sect_psymtab_closer): Remove.
	(find_pc_sect_psymtab): Remove.
	(find_pc_sect_symtab_via_partial): New function.
	(find_pc_psymtab, find_pc_sect_psymbol, find_pc_psymbol): Remove.
	(fixup_section): No longer static.
	(fixup_psymbol_section): Remove.
	(lookup_symbol_aux): Use lookup_symbol_aux_quick.
	(lookup_global_symbol_from_objfile): Likewise.
	(lookup_symbol_aux_psymtabs): Remove.
	(lookup_symbol_aux_quick): New function.
	(lookup_symbol_global): Use lookup_symbol_aux_quick.
	(lookup_partial_symbol): Remove.
	(basic_lookup_transparent_type_quick): New function.
	(basic_lookup_transparent_type): Use it.
	(find_main_psymtab): Remove.
	(find_main_filename): New function.
	(find_pc_sect_symtab): Use find_pc_sect_symtab method.
	(find_line_symtab): Use expand_symtabs_with_filename method.
	(output_partial_symbol_filename): New function.
	(sources_info): Use map_partial_symbol_filenames.
	(struct search_symbols_data): New type.
	(search_symbols_file_matches): New function.
	(search_symbols_name_matches): Likewise.
	(search_symbols): Use expand_symtabs_matching method.
	(struct add_name_data): Rename from add_macro_name_data.
	(add_macro_name): Update.
	(add_partial_symbol_name): New function.
	(default_make_symbol_completion_list): Use
	map_partial_symbol_names.
	(struct add_partial_symbol_name): New type.
	(maybe_add_partial_symtab_filename): New function.
	(make_source_files_completion_list): Use
	map_partial_symbol_filenames.
	(expand_line_sal): Use expand_symtabs_with_filename method.
	* symmisc.c: Include psymtab.h.
	(print_objfile_statistics): Use print_stats method.
	(dump_objfile): Use dump method.
	(dump_psymtab, maintenance_print_psymbols)
	(maintenance_info_psymtabs, maintenance_check_symtabs)
	(extend_psymbol_list): Remove.
	* symfile.h (struct quick_symbol_functions): New struct.
	(struct sym_fns) <qf>: New field.
	(sort_pst_symbols): Remove.
	(increment_reading_symtab): Declare.
	* symfile.c: Include psymtab.h.
	(compare_psymbols, sort_pst_symbols): Remove.
	(psymtab_to_symtab): Remove.
	(increment_reading_symtab): New function.
	(symbol_file_add_with_addrs_or_offsets): Use expand_all_symtabs
	method.
	(set_initial_language): Use find_main_filename.
	(allocate_psymtab, discard_psymtab, cashier_psymtab): Remove.
	(free_named_symtabs): Remove unused code.
	(start_psymtab_common, add_psymbol_to_bcache)
	(append_psymbol_to_list, add_psymbol_to_list, init_psymbol_list):
	Remove.
	* stack.c: Include psymtab.h, symfile.h.
	(backtrace_command_1): Use find_pc_sect_symtab_via_partial.
	* source.h (psymtab_to_fullname): Don't declare.
	* source.c: Include psymtab.h.
	(select_source_symtab): Use find_last_source_symtab method.
	(forget_cached_source_info): Use forget_cached_source_info
	method.
	(find_and_open_source): No longer static.
	(psymtab_to_fullname): Remove.
	* somread.c: Include psymtab.h.
	(som_sym_fns): Update.
	* psympriv.h: New file.
	* psymtab.h: New file.
	* psymtab.c: New file.
	* objfiles.h: (ALL_OBJFILE_PSYMTABS): Remove.
	(ALL_PSYMTABS, ALL_PSPACE_PSYMTABS): Likewise.
	* objfiles.c: Include psymtab.h.
	(objfile_relocate1): Use relocate method.
	(objfile_has_partial_symbols): Use has_symbols method.
	* mipsread.c: Include psymtab.h.
	(ecoff_sym_fns): Update.
	* mi/mi-cmd-file.c: Include psymtab.h.
	(print_partial_file_name): New function.
	(mi_cmd_file_list_exec_source_files): Use
	map_partial_symbol_filenames.
	* mdebugread.c: Include psympriv.h.
	* machoread.c: Include psympriv.h.
	(macho_sym_fns): Update.
	* m2-exp.y (yylex): Use lookup_symtab.
	* elfread.c: Include psympriv.h.
	(elf_sym_fns): Update.
	* dwarf2read.c: Include psympriv.h.
	* dbxread.c: Include psympriv.h.
	(aout_sym_fns): Update.
	* cp-support.c: Include psymtab.h.
	(read_in_psymtabs): Remove.
	(make_symbol_overload_list_qualified): Use
	expand_symtabs_for_function method.
	* coffread.c: Include psympriv.h.
	(coff_sym_fns): Update.
	* blockframe.c: Include psymtab.h.
	(find_pc_partial_function): Use find_pc_sect_symtab method.
	* ada-lang.h (ada_update_initial_language): Update.
	* ada-lang.c: Include psymtab.h.
	(ada_update_initial_language): Remove 'main_pst' argument.
	(ada_lookup_partial_symbol): Remove.
	(struct ada_psym_data): New type.
	(ada_add_psyms): New function.
	(ada_add_non_local_symbols): Use map_ada_symtabs method.
	(struct add_partial_datum): New type.
	(ada_add_partial_symbol_completions): New function.
	(ada_make_symbol_completion_list): Use map_partial_symbol_names.
	(ada_exception_support_info_sniffer): Update.
	* Makefile.in (SFILES): Add psymtab.c.
	(COMMON_OBS): Add psymtab.o.
	(HFILES_NO_SRCDIR): Add psymtab.h, psympriv.h.
gdb/doc
	* gdbint.texinfo (Symbol Handling): Update.
2010-03-10 18:20:08 +00:00
Tristan Gingold f18b4cabe2 2010-02-09 Tristan Gingold <gingold@adacore.com>
* machoread.c (macho_symfile_relocate): New function.
	(macho_sym_fns): Use macho_symfile_relocate instead of
	default_symfile_relocate.
	(macho_oso_data): New type.
	(current_oso): New variable.
	(macho_add_oso_symfile): Do not compute section_addr_info, but
	instead set vma of sections.
	Do not set SYMFILE_VERBOSE to call symbol_file_add_from_bfd.
	Set and clear current_oso.
2010-02-09 15:53:00 +00:00
Tristan Gingold 2d33f7b84c 2010-02-04 Tristan Gingold <gingold@adacore.com>
* machoread.c (macho_add_oso): Renamed to macho_register_oso.
	(macho_symtab_read): Adjust calls to macho_add_oso.
	(macho_oso_symfile): Renamed to macho_symfile_read_all_oso.
	(macho_symfile_read): Adjust call to macho_oso_symfile.
	(macho_new_init): Move this function after declarations.
	(macho_symfile_init): Ditto.
	* darwin-nat-info.c (darwin_lib_gdb_ports): Remove.
	* darwin-nat.c (darwin_lookup_task): Remove unused prototype.
2010-02-04 12:45:49 +00:00
Tristan Gingold ac8035ab9e 2010-02-03 Tristan Gingold <gingold@adacore.com>
* symfile.h (struct sym_fns): Add sym_relocate field.
	(default_symfile_relocate): New prototype.
	(symfile_relocate_debug_section): First argument is now an objfile.
	* symfile.c (default_symfile_relocate): Rename from
	symfile_relocate_debug_section, first argument is now an objfile.
	(symfile_relocate_debug_section): New function.
	* coffread.c (coff_sym_fns): Set sym_relocate field.
	* somread.c (som_sym_fns): Ditto.
	* mipsread.c (ecoff_sym_fns): Ditto.
	* machoread.c (macho_sym_fns): Ditto.
	* elfread.c (elf_sym_fns): Ditto.
	* dwarf2read.c (dwarf2_read_section): Ditto.
	* xcoffread.c (xcoff_sym_fns): Ditto.
	* dbxread.c (aout_sym_fns): Ditto.
	(dbx_psymtab_to_symtab): Adjust call to symfile_relocate_debug_section.
	(elfstab_build_psymtabs): Ditto.
2010-02-03 14:13:16 +00:00
Tristan Gingold bdfed3bc1e 2009-01-14 Tristan Gingold <gingold@adacore.com>
* machoread.c (macho_add_oso_symfile): Add symfile_flags parameter.
	Call xstrdup for abfd->filename.  Pass symfile_flags and objfile flags
	to symbol_file_add_from_bfd.  Add OSO as separate objfile.
	(macho_oso_symfile): Add symfile_flags parameter.  Pass it to
	macho_add_oso_symfile.
	(macho_symfile_read): Pass symfile_flags to macho_oso_symfile.
2010-01-14 12:47:44 +00:00
Joel Brobecker 4c38e0a4fc Update copyright year in most headers.
Automatic update by copyright.sh.
2010-01-01 07:32:07 +00:00
Tristan Gingold 6414f3fd8b 2009-12-15 Tristan Gingold <gingold@adacore.com>
* machoread.c (macho_symfile_read): Set section size of dsym bfd
	from main bfd.
2009-12-15 09:56:23 +00:00
Tristan Gingold 65ccb1090e 2009-12-15 Tristan Gingold <gingold@adacore.com>
* machoread.c (macho_check_dsym): Read uuid directly from load command
        instead of from a fake section.
2009-12-15 09:41:16 +00:00
Tristan Gingold 3188d986e9 2009-12-15 Tristan Gingold <gingold@adacore.com>
* machoread.c (macho_symtab_read): Add comments.  Always set
        first_offset.
2009-12-15 09:37:14 +00:00
Tristan Gingold 2480cfa040 2009-12-03 Tristan Gingold <gingold@adacore.com>
* machoread.c (macho_symfile_read): Use symbol_file_add_separate
	to add dsym files.
2009-12-09 14:53:25 +00:00
Tristan Gingold f43525316b 2009-12-07 Tristan Gingold <gingold@adacore.com>
* symfile.h (struct sym_fns): Adjust comment on sym_read.
	* symfile.c (syms_from_objfile): Pass all symfile flags to sym_read.
	* dbxread.c (dbx_symfile_read): Rename mainline to symfile_flags,
	adjust header comment.
	* elfread.c (elf_symfile_read): Ditto.
	* somread.c (som_symfile_read): Ditto.
	* xcoffread.c (xcoff_initial_scan): Ditto.
	* coffread.c (coff_symfile_read): Rename mainline to symfile_flags.
	* machoread.c (macho_symfile_read): Ditto.
	* mipsread.c (mipscoff_symfile_read): Ditto.
2009-12-07 09:47:40 +00:00
Tristan Gingold de1d8fb992 2009-12-07 Tristan Gingold <gingold@adacore.com>
* dbxread.c (dbx_symfile_read): No need to test mainline to call
	init_psymbol_list.
	* xcoffread.c (xcoff_initial_scan): Ditto;
	* coffread.c (coff_symfile_read): Remove call to init_psymbol_list.
	* elfread.c (elf_symfile_read): Ditto.
	* machoread.c (macho_symfile_read): Ditto.
2009-12-07 09:36:44 +00:00
Tristan Gingold 033c64b7ea 2009-12-03 Tristan Gingold <gingold@adacore.com>
* machoread.c (macho_sym_fns): Set sym_segment routine.
2009-12-03 14:21:22 +00:00
Tristan Gingold f29dff0a09 2009-12-02 Tristan Gingold <gingold@adacore.com>
* symfile.h (dwarf2_build_psymtabs): Remove mainline parameter in
	prototype.
	* dwarf2read.c (dwarf2_build_psymtabs): Remove mainline paramter in
	definition, simplify code assuming it is always 0.
	* coffread.c (coff_symfile_read): Adjust call.
	* elfread.c (elf_symfile_read): Ditto.
	* machoread.c (macho_symfile_read): Explicitely calls
	init_psymbol_list if mainline is set.
2009-12-02 11:44:35 +00:00
Tristan Gingold ab7e10a0c4 2009-11-18 Tristan Gingold <gingold@adacore.com>
* machoread.c (macho_oso_symfile): Fix typo.  Add comments.
2009-11-18 14:10:47 +00:00
Tristan Gingold f192ea96fd 2009-10-13 Tristan Gingold <gingold@adacore.com>
* machoread.c: Add an empty line after comment for functions.
	(oso_el_compare_name): New function.
	(macho_add_oso_symfile): New function.
	(macho_oso_symfile): Use macho_add_oso_symfile.  Sort the oso
	and optimize accesses to libraries.
2009-10-13 09:42:57 +00:00
Tristan Gingold bb00b29d78 2009-06-19 Tristan Gingold <gingold@adacore.com>
* machoread.c (macho_symtab_read): Adjust for bfd changes.
	* darwin-nat.h (struct darwin_exception_msg): New type to describe
	a mach exception.
	(struct private_thread_info): New type to describe the state of the
	thread.
	(DEF_VEC_I thread_t): Removed, replaced by ...
	(DEF_VEC_O darwin_thread_t): ... this new type.
	(struct darwin_inferior): Renamed to ...
	(struct private_inferior): ... this type.  Fields added.
	(darwin_not_port): Moved into the private inferior structure.
	* darwin-nat.c: Add includes, improve comments.
	Rewrite to handle multiple threads and processes.
	(darwin_resume_to): New function and protype.
	(darwin_resume, darwin_wait_to, darwin_wait): Ditto.
	(darwin_kill_inferior): Add ops argument.
	(darwin_pid_to_str): New function.
	(darwin_thread_alive): Ditto.
	(darwin_inf, darwin_not_port): Removed.
	(darwin_inf_fake_stop): New variable.
	(msgin, msgout, msg_state, exc_msg): Removed.
	(mach_check_error): Use warning instead of error.
	(darwin_ptrace): Adjust debug level.
	(cmp_thread_t): Fix names (typo).
	(darwin_check_new_threads): Argument is now an inferior,
	adjust for new structures, add no change check, ignore dead ports,
	handle first thread case.
	(find_inferior_task_it): New function.
	(find_inferior_notify_it): Ditto.
	(darwin_find_inferior_by_task): Ditto.
	(darwin_find_inferior_by_notify): Ditto.
	(darwin_find_thread): Ditto.
	(darwin_suspend_inferior): Ditto.
	(darwin_resume_inferior): Ditto.
	(catch_exception_raise_state): Removed.
	(catch_exception_raise_state_identity): Removed.
	(darwin_suspend_inferior_it): New function.
	(darwin_resume_inferior_it): Ditto.
	(darwin_dump_message): New function, extracted from darwin_wait.
	(darwin_decode_exception_message): New function.
	(darwin_encode_reply): New function.
	(catch_exception_raise): Removed.
	(darwin_send_reply): New function, extracted from darwin_resume.
	(darwin_resume_thread): New function, extracted from darwin_resume.
	(struct resume_inferior_threads_param): New type.
	(darwin_resume_inferior_threads_it): New function.
	(darwin_resume_inferior_threads): New function.
	(darwin_suspend_inferior_threads): New function.
	(darwin_resume): Mostly rewritten to handle multiple threads and
	some corner cases.
	(darwin_decode_message): New function extracted from darwin_wait.
	(cancel_breakpoint): New function.
	(darwin_wait): Mostly rewritten.  Handle multiple threads.
	(darwin_mourn_inferior): Adjust for per process structures.
	(darwin_reply_to_all_pending_messages): New function.
	(darwin_stop_inferior): Adjust for per inferior structures.
	(darwin_attach_pid): Ditto.
	(darwin_init_thread_list): Ditto.
	(darwin_attach): Ditto.
	(darwin_detach): Ditto.
	(darwin_files_info): Now empty.
	(darwin_pid_to_str): Adjust returns string to match one expected by
	the testsuite.
	(darwin_read_write_inferior): Rename err variable to match other uses.
	Adjust debug message.  Handle submaps.
	(darwin_xfer_memory): Adjust for per inferior structures.
	(set_enable_mach_exceptions): Ditto.
	(darwin_pid_to_exec_file): New function.
	(darwin_get_ada_task_ptid): Ditto.
	(darwin_supports_multi_process): Ditto.
	(_initialize_darwin_inferior): Remove useless assertion, adjust for
	per inferior structures.  Add new target operations.
2009-06-19 14:30:30 +00:00
Paul Pluzhnikov 7eedccfa2a 2009-06-16 Paul Pluzhnikov <ppluzhnikov@google.com>
* solib.c (symbol_add_stub): New FLAGS parameter.
	(solib_read_symbols): FROM_TTY -> FLAGS, call symbol_add_stub
	directly.
	(solib_add): Defer breakpoint_re_set until after all solibs.
	* bsd-uthread.c (bsd_uthread_solib_loaded): Adjust.
	* rs6000-nat.c (objfile_symbol_add): Adjust.
	* symfile.c (syms_from_objfile): Merge parameters into ADD_FLAGS.
	(new_symfile_objfile): Likewise.
	(symbol_file_add_with_addrs_or_offsets): Likewise.
	(symbol_file_add_from_bfd): Likewise.
	(symbol_file_add): Likewise.
	* symfile.h (enum symfile_add_flags): New. Adjust prototypes.
	* symfile-mem.c (symbol_file_add_from_memory): Adjust.
	* windows-nat.c (safe_symbol_file_add_stub): Adjust.
	* machoread.c (macho_oso_symfile, macho_symfile_read): Adjust.
2009-06-16 18:49:25 +00:00
Tristan Gingold cf1061c036 2009-02-04 Tristan Gingold <gingold@adacore.com>
* machoread.c (macho_symfile_read): Read minsymtab also from
	shared libraries.
	(macho_symfile_read): Try to read dwarf2 frame info from main
	object file, but not from OSO files.
	(macho_symfile_offsets): Update section names for latest BFD
	changes.
	* i386-darwin-tdep.c (i386_darwin_init_abi): Call set_solib_ops.
	(x86_darwin_init_abi_64): Ditto.
	* solib-darwin.c: New file.
	* solib-darwin.h: New file.
	* configure.tgt: Add solib.o solib-darwin.o for Darwin.
2009-02-04 08:47:56 +00:00
Joel Brobecker 0fb0cc7590 Updated copyright notices for most files. 2009-01-03 05:58:08 +00:00
Tristan Gingold a80b95ba67 gdb:
2008-11-27  Tristan Gingold  <gingold@adacore.com>

	* NEWS: Add entry for new native configuration: Darwin.
	* configure.host: Add Darwin host.
	* configure.tgt: Add Darwin target.
	* defs.h (enum gdb_osabi): Add GDB_OSABI_DARWIN.
	* osabi.c (gdb_osabi_names): Add name for Darwin abi.
	* i386-darwin-nat.c: New file.
	* i386-darwin-tdep.c: New file.
	* machoread.c: New file.
	* darwin-nat-info.c: New file.
	* darwin-nat.c: New file.
	* darwin-nat.h: New file.
	* darwin.defs: New file.
	* config/i386/darwin.mh: New file.

gdb/doc:
2008-11-27  Tristan Gingold  <gingold@adacore.com>

	* gdb.texinfo (Darwin): Document Darwin specific features.
2008-11-27 09:23:01 +00:00