The branch, jankratochvil/fedora18 has been created at 897686c0aedb7a6da59b823f22b1d24ec5a1d2ba (commit) - Log ----------------------------------------------------------------- commit 897686c0aedb7a6da59b823f22b1d24ec5a1d2ba Merge: c3c8464 8b63be8 Author: Jan Kratochvil Date: Wed Aug 1 18:31:49 2012 +0200 Merge remote-tracking branch 'gdb/gdb_7_5-branch' into archer-jankratochvil-fedora18 Conflicts: gdb/NEWS gdb/dwarf2read.c gdb/main.c commit c3c8464edb081043317fa499e77dcedb0e10d3c8 Merge: e0dbdfe 02c22ca Author: Jan Kratochvil Date: Wed Aug 1 18:15:27 2012 +0200 Merge branch 'common-picks' into archer-jankratochvil-fedora18 commit e0dbdfeb51af42ed26460718463bd16fc16b9976 Author: Jan Kratochvil Date: Wed Aug 1 18:15:09 2012 +0200 Fix up the removal. commit 700d76b4c8bcda06717f0e04a6cf063718f5a325 Author: Jan Kratochvil Date: Wed Aug 1 18:14:33 2012 +0200 Remove the branch: archer-tromey-dwz-multifile-rebase commit 1c41925c268b37659550eeef21c06529319506e7 Merge: 814db9e bcbd703 Author: Jan Kratochvil Date: Wed Aug 1 18:10:06 2012 +0200 Merge commit 'bcbd703c1a68b9ef4e39bef4e39e232534bd03cf' into archer-jankratochvil-fedora18 commit 02c22ca077247f2eddcdde30aa855f300a068a85 Author: Jan Kratochvil Date: Wed Jul 25 20:14:17 2012 +0000 gdb/ * contrib/cc-with-tweaks.sh: Put into comment path gdb/contrib/. (cherry picked from commit 232bffa3ba4859cf41d928a2bdfff804c4157d09) Conflicts: gdb/ChangeLog commit fde4261764503f18d451c2cc0e47a5da95ed1b80 Author: Tom Tromey Date: Wed Jul 25 15:47:08 2012 +0000 * NEWS: Mention maint info bfds. * gdb_bfd.c (all_bfds): New global. (gdb_bfd_ref, gdb_bfd_unref): Update all_bfds. (print_one_bfd, maintenance_info_bfds, _initialize_gdb_bfd): New functions. gdb/doc * gdb.texinfo (Maintenance Commands): Document maint info bfds. (cherry picked from commit 47bbf2c7f8fb4d2ef8e46ce1ae6f02c15736b1e6) Conflicts: gdb/ChangeLog gdb/NEWS gdb/doc/ChangeLog commit 2a9ba042956059025afc16bd03de5ebca8bffa70 Author: Tom Tromey Date: Tue Jul 24 20:15:47 2012 +0000 * symfile.c (symbol_file_add): Don't open BFD twice. (cherry picked from commit ec820e32a6abbef5191c2546c7e3b751477f9cbe) Conflicts: gdb/ChangeLog commit bb8c3d691bfcfbfe02c179c2e9b3d60a55b85074 Author: Tom Tromey Date: Mon Jul 23 18:54:25 2012 +0000 * rs6000-nat.c (add_vmap): Rewrite archive loop. Fix reference counting. * exec.c (exec_close_1): Unconditionally release vmap's BFD. (map_vmap): Acquire a reference to the BFD. (cherry picked from commit ea9d522e8c645377ffcb789862066e6bbb844eed) Conflicts: gdb/ChangeLog commit e9bf4889598edf5f29bc0a2eddc6ce8c400849fd Author: Tom Tromey Date: Mon Jul 23 15:25:11 2012 +0000 * solib-svr4.c (enable_break): Update. * bfd-target.h (target_bfd_reopen): Update documentation. (cherry picked from commit d0c57e98a587a85fccf8377096a3ff0956099be0) Conflicts: gdb/ChangeLog commit 4337304b0513bf49b9b550d806a26355d31c2fde Author: Tom Tromey Date: Mon Jul 23 15:03:58 2012 +0000 * symfile.c (separate_debug_file_exists): Update. (gdb_bfd_open_maybe_remote): Rename from bfd_open_maybe_remote. (reread_symbols): Update. * elfread.c (build_id_verify): Update. * symfile.h (gdb_bfd_open_maybe_remote): Rename from bfd_open_maybe_remote. (cherry picked from commit 5feafdc48ee0157865ef636861713ed049504956) Conflicts: gdb/ChangeLog commit a5f519d259948e1b63e6b2f26eaa0cab30e8d5de Author: Tom Tromey Date: Mon Jul 23 15:01:49 2012 +0000 * gdb_bfd.c (gdb_bfd_ref, gdb_bfd_unref): Fix comment. (cherry picked from commit d6c48b471538719626d3ac0eae2e3da5d5e26277) Conflicts: gdb/ChangeLog commit c75b416063ef9ddc7029b04755918f822787b63b Author: Tom Tromey Date: Mon Jul 23 14:58:44 2012 +0000 * coffread.c (coff_symfile_read): Make a cleanup for 'debugfile' and 'abfd'. * elfread.c (elf_symfile_read): Make a cleanup for 'debugfile' and 'abfd'. * jit.c (jit_bfd_try_read_symtab): Make a cleanup for 'nbfd'. * machoread.c (macho_add_oso_symfile): Make a cleanup for 'abfd'. (macho_symfile_read): Make a cleanup for 'dsym_bfd'. * objfiles.c (allocate_objfile): Acquire a new reference. * rs6000-nat.c (add_vmap): Don't acquire a BFD reference. * solib.c (solib_read_symbols): Don't acquire a BFD reference. * spu-linux-nat.c (spu_symbol_file_add_from_memory): Make a cleanup for 'nbfd'. * symfile-mem.c (symbol_file_add_from_memory): Make a cleanup for 'nbfd'. * symfile.c (symbol_file_add_with_addrs_or_offsets): Don't make a cleanup for 'abfd'. (symbol_file_add): Make a BFD cleanup. (cherry picked from commit 612c29ac072387bbddc9b0f4321353b929d5737b) Conflicts: gdb/ChangeLog commit 0b7b2a7a49f9d3d6a77c2792d8a991f5a8cb1f8a Author: Tom Tromey Date: Mon Jul 23 14:57:53 2012 +0000 * cli/cli-dump.c (bfd_openr_with_cleanup): Use gdb_bfd_openr. (bfd_openw_with_cleanup): Use gdb_bfd_openw. * corelow.c (core_open): Use gdb_bfd_fopen. * dsrec.c (load_srec): Use gdb_bfd_openr. * exec.c (exec_file_attach): Use gdb_bfd_fopen. * gcore.c (gcore_memory_sections): Use gdb_bfd_openw. * gdb_bfd.c (gdb_bfd_fopen, gdb_bfd_openr, gdb_bfd_openw) (gdb_bfd_openr_iovec, gdb_bfd_openr_next_archived_file) (gdb_bfd_fdopenr): New functions. * gdb_bfd.h (gdb_bfd_fopen, gdb_bfd_openr, gdb_bfd_openw) (gdb_bfd_openr_iovec, gdb_bfd_openr_next_archived_file) (gdb_bfd_fdopenr): Declare. * jit.c (bfd_open_from_target_memory): Use gdb_bfd_openr_iovec. * m32-rom.c (m32r_load, m32r_upload_command): Use gdb_bfd_openr. * machoread.c (macho_symfile_read_all_oso): Use gdb_bfd_openr, gdb_bfd_openr_next_archived_file. (macho_check_dsym): Use gdb_bfd_openr. (macho_add_oso_symfile): Don't call gdb_bfd_stash_filename. * procfs.c (insert_dbx_link_bpt_in_file): Use gdb_bfd_fdopenr. * remote-m32r-sdi.c (m32r_load): Use gdb_bfd_openr. * remote-mips.c (mips_load_srec, pmon_load_fast): Use gdb_bfd_openr. * remote.c (remote_bfd_open): Use gdb_bfd_openr_iovec. * rs6000-nat.c (add_vmap): Use gdb_bfd_openr, gdb_bfd_fdopenr, gdb_bfd_openr_next_archived_file. * solib-darwin.c (darwin_solib_get_all_image_info_addr_at_init): Use gdb_bfd_openr. * solib-pa64.c (pa64_solib_create_inferior_hook): Use gdb_bfd_openr. * solib-spu.c (spu_bfd_fopen): Use gdb_bfd_openr_iovec. * solib.c (solib_bfd_fopen): Use gdb_bfd_fopen. * spu-linux-nat.c (spu_bfd_open): Use gdb_bfd_openr_iovec. * symfile.c (bfd_open_maybe_remote): Use gdb_bfd_openr. (symfile_bfd_open): Use gdb_bfd_fopen. (generic_load): Use gdb_bfd_openr. * windows-nat.c (windows_make_so): Use gdb_bfd_openr. (cherry picked from commit 8b3d8cbf611383b5759061e49521fb3cd83d4a71) Conflicts: gdb/ChangeLog commit cd5a9e1524354235ba395dd770b807e6679c079a Author: Tom Tromey Date: Mon Jul 23 14:56:07 2012 +0000 * bfd-target.c (target_bfd_reopen): Update. * cli/cli-dump.c (bfd_openr_with_cleanup) (bfd_openw_with_cleanup): Update. * corelow.c (core_open): Update. * dsrec.c (load_srec): Update. * exec.c (exec_file_attach): Update. * gcore.c (create_gcore_bfd): Update. * gdb_bfd.c (gdb_bfd_ref): Return void. (gdb_bfd_open): Update. * gdb_bfd.h (gdb_bfd_ref): Return void. Update comments. * jit.c (jit_bfd_try_read_symtab): Update. * m32r-rom.c (m32r_load, m32r_upload_command): Update. * machoread.c (macho_symfile_read_all_oso): Update. (macho_check_dsym): Update. * procfs.c (insert_dbx_link_bpt_in_file): Update. * remote-m32r-sdi.c (m32r_load): Update. * remote-mips.c (mips_load_srec, pmon_load_fast): Update. * rs6000-nat.c (add_vmap): Update. * solib-darwin.c (darwin_solib_get_all_image_info_addr_at_init): Update. * solib-pa64.c (pa64_solib_create_inferior_hook): Update. * solib-spu.c (spu_bfd_open): Update. * solib.c (solib_bfd_fopen, solib_read_symbols): Update. * spu-linux-nat.c (spu_bfd_open): Update. * symfile.c (bfd_open_maybe_remote, symfile_bfd_open) (generic_load): Update. * windows-nat.c (windows_make_so): Update. (cherry picked from commit 8ee2b379b49d8132dc895ba40e80cf36044358ba) Conflicts: gdb/ChangeLog commit bdf3e7e7e351e5d8053bd13468f44c51440bfd67 Author: Tom Tromey Date: Fri Jul 20 16:51:50 2012 +0000 2012-07-20 Jan Kratochvil Tom Tromey * dwarf2read.c (dwarf_decode_macros) : New cases. (dwarf_decode_macro_bytes) : Examine 'section_is_dwz'. (cherry picked from commit a2d46894fe06ff4a5960efa7493b72e42098c06f) Conflicts: gdb/ChangeLog commit b2ef0b0f478437f07b6b3e4ddd2876508e1c3ffa Author: Tom Tromey Date: Fri Jul 20 16:12:38 2012 +0000 * dwarf2read.c (try_open_dwo_file): Don't call gdb_bfd_stash_filename. (cherry picked from commit bf739cb8363c646f5cc29100f7ab8ff16f92912a) Conflicts: gdb/ChangeLog commit 9b54bf156d297dcf8603dd01d1c4cde4b5294f9f Author: Tom Tromey Date: Wed Jul 18 20:04:43 2012 +0000 * cc-with-index.sh, cc-with-dwz.sh: Remove. * contrib/cc-with-tweaks.sh: New file. (cherry picked from commit 553257f6403fab81623d152c0e99e52ea6dbdc89) Conflicts: gdb/ChangeLog commit 0c169466eea682278be88e1e49b09ac527413f1d Author: Tom Tromey Date: Wed Jul 18 20:01:26 2012 +0000 * dwarf2read.c (struct dwz_file) : New field. (locate_dwz_sections): Recognize .gdb_index. (create_cus_from_index_list): New function. (create_cus_from_index): Use it. Handle .dwz data. (read_index_from_section): New function, extracted from dwarf2_read_index. (dwarf2_read_index): Use it. Read .gdb_index from dwz file, if needed. (cherry picked from commit 67635c29c6d4f4371507b6c43dd44b2ce1a6affb) Conflicts: gdb/ChangeLog commit 87a9dffe8b0d13af59352822f4c4340a4a9d4edf Author: Tom Tromey Date: Wed Jul 18 19:59:35 2012 +0000 * dwarf2read.c (struct dwarf2_per_objfile) : New field. (struct dwarf2_per_cu_data) : No longer bitfield. : New field. (struct dwz_file): New. (struct partial_die_info) : New fields. (locate_dwz_sections, dwarf2_get_dwz_file) (get_abbrev_section_for_cu): New functions. (error_check_comp_unit_head, read_and_check_comp_unit_head) (read_and_check_type_unit_head): Add abbrev_section argument. (create_debug_types_hash_table): Update. (init_cutu_and_read_dies): Use proper abbrev section. (init_cutu_and_read_dies_no_follow): Likewise. (set_partial_user): Do nothing if PST==NULL. (read_comp_units_from_section): New function. (create_all_comp_units): Use it. (scan_partial_symbols, partial_die_parent_scope): Update. (skip_one_die): Handle DW_FORM_GNU_ref_alt, DW_FORM_GNU_strp_alt. (process_imported_unit_die, read_partial_die): Handle .dwz files. (find_partial_die): Add offset_in_dwz argument. Update. (guess_partial_die_structure_name, fixup_partial_die): Update. (read_attribute_value): Handle DW_FORM_GNU_ref_alt, DW_FORM_GNU_strp_alt. (read_indirect_string_from_dwz): New function. (dwarf2_const_value_attr): Handle DW_FORM_GNU_strp_alt. (dump_die_shallow): Handle DW_FORM_GNU_ref_alt, DW_FORM_GNU_strp_alt. (is_ref_attr): Handle DW_FORM_GNU_ref_alt. (follow_die_offset): Add offset_in_dwz argument. (follow_die_ref, dwarf2_fetch_die_location_block): Update. (skip_form_bytes): Handle DW_FORM_GNU_strp_alt. (dwarf_decode_macro_bytes): Add section_is_dwz argument. Handle new macro forms. (dwarf_decode_macros): Update. (dwarf2_find_containing_comp_unit): Add offset_in_dwz argument. (dwarf2_per_objfile_free): Unref dwz_bfd, if it exists (lookup_die_type): Handle DW_FORM_GNU_ref_alt. (create_debug_types_hash_table): Use correct abbrev section. (get_debug_line_section): New function. (dwarf_decode_line_header, dwarf_decode_lines_1): Use it. (process_full_comp_unit): Pass 'required' argument to end_symtab_get_static_block. * buildsym.h (end_symtab_get_static_block): Update. * buildsym.c (end_symtab_get_static_block): Add 'required' argument. (end_symtab, end_expandable_symtab): Update. (cherry picked from commit f618cd9d7121b5fd26a9f8a9ae49c0201dda728b) Conflicts: gdb/ChangeLog commit 36aec6fcb3031b58a5fe425622ae4b5c427af0d7 Author: Tom Tromey Date: Wed Jul 18 19:57:20 2012 +0000 * dwarf2read.c: Don't include zlib.h or sys/mman.h. (pagesize): Remove. (struct dwarf2_section_info) : Remove. (zlib_decompress_section): Remove. (dwarf2_read_section): Use gdb_bfd_map_section. (munmap_section_buffer): Remove. (free_dwo_file, dwarf2_per_objfile_free): Don't use munmap_section_buffer. * gdb_bfd.c: Include zlib.h, sys/mman.h. (struct gdb_bfd_section_data): New. (free_one_bfd_section): New function. (gdb_bfd_close_or_warn): Use free_one_bfd_section. (get_section_descriptor, zlib_decompress_section) (gdb_bfd_map_section): New functions. * gdb_bfd.h (gdb_bfd_map_section): Declare. (cherry picked from commit 4ee2aab930752a33e71dfd11865fde112bc03003) Conflicts: gdb/ChangeLog commit ee9411572a2e530e58613d2148b4e8fde93005ac Author: Tom Tromey Date: Wed Jul 18 19:52:14 2012 +0000 * dwarf2read.c (try_open_dwo_file): use gdb_bfd_open. (cherry picked from commit 17642581262f80256311ad4a8707c3aa462e0b2a) Conflicts: gdb/ChangeLog commit 68bf8b484c380b29d248eae31b295e0443113357 Author: Tom Tromey Date: Wed Jul 18 19:49:33 2012 +0000 * gdb_bfd.c (struct gdb_bfd_data): New. (gdb_bfd_cache): New global. (struct gdb_bfd_cache_search): New. (hash_bfd, eq_bfd, gdb_bfd_open): New functions. (gdb_bfd_ref, gdb_bfd_unref): Use gdb_bfd_data. * gdb_bfd.h (gdb_bfd_open): Declare. (cherry picked from commit 112d5f62dbf2d223aefbb91b17ed15e22327f256) Conflicts: gdb/ChangeLog commit bcc7e441174ba3bbd2139248f2cbad5c11eddb4b Author: Tom Tromey Date: Wed Jul 18 19:42:25 2012 +0000 * utils.c (make_cleanup_bfd_unref): Rename from make_cleanup_bfd_close. * defs.h (make_cleanup_bfd_unref): Rename from make_cleanup_bfd_close. * cli/cli-dump.c (bfd_openr_with_cleanup): Update. (bfd_openw_with_cleanup): Update. * corelow.c (core_open): Update. * dsrec.c (load_srec): Update. * m32r-rom.c (m32r_load, m32r_upload_command): Update. * remote-m32r-sdi.c (m32r_load): Update. * remote-mips.c (mips_load_srec): Update. (pmon_load_fast): Update. * solib-darwin.c (darwin_solib_get_all_image_info_addr_at_init): Update. (darwin_bfd_open): Update. * solib.c (solib_bfd_fopen): Update. * symfile-mem.c (symbol_file_add_from_memory): Update. * symfile.c (symbol_file_add_with_addrs_or_offsets): Update. (symfile_bfd_open): Update. (generic_load): Update. (cherry picked from commit 769cb3532d1a1a06cd9248370244df5ac8b30df6) Conflicts: gdb/ChangeLog commit 3a6e209b4926d464692184f3d20e0ebc89045803 Author: Tom Tromey Date: Wed Jul 18 19:38:38 2012 +0000 * remote-mips.c (mips_load_srec): Use make_cleanup_bfd_close. (pmon_load_fast): Likewise. * m32r-rom.c (m32r_load): Use make_cleanup_bfd_close. (m32r_upload_command): Likewise. * dsrec.c (load_srec): Use make_cleanup_bfd_close. * solib-darwin.c (darwin_solib_get_all_image_info_addr_at_init): Use make_cleanup_bfd_close. (cherry picked from commit 1f20395dc965144313da256a2f46448787cb7219) Conflicts: gdb/ChangeLog commit d98a4021f3bbf405fc2493beb8570594c4be7330 Author: Tom Tromey Date: Wed Jul 18 19:34:57 2012 +0000 * symfile.c (symfile_bfd_open): Don't copy name. Call gdb_bfd_stash_filename. (load_command): Open the new BFD before freeing the old. (bfd_open_maybe_remote): Call gdb_bfd_stash_filename. * symfile-mem.c (symbol_file_add_from_memory): Don't copy name. Call gdb_bfd_stash_filename. * spu-linux-nat.c (spu_bfd_open): Don't copy name. * solib-spu.c (spu_bfd_fopen): Don't copy name. Call gdb_bfd_stash_filename. * solib-darwin.c (darwin_solib_get_all_image_info_addr_at_init): Free found_pathname. * rs6000-nat.c (add_vmap): Don't copy filename. Call gdb_bfd_stash_filename. * remote.c (remote_bfd_open): Call gdb_bfd_stash_filename. * machoread.c (macho_add_oso_symfile): Call gdb_bfd_stash_filename. (macho_symfile_read_all_oso): Arrange to free archive_name. Call gdb_bfd_stash_filename. (macho_check_dsym): Don't copy filename. Call gdb_bfd_stash_filename. * jit.c (bfd_open_from_target_memory): Don't copy the filename. * gdb_bfd.c (gdb_bfd_stash_filename): New function. * gdb_bfd.h (gdb_bfd_stash_filename): Declare. * gcore.c (create_gcore_bfd): Call gdb_bfd_stash_filename. * exec.c (exec_close): Don't free the BFD's filename. (exec_file_attach): Don't copy the filename. Call gdb_bfd_stash_filename. * corelow.c (core_close): Don't free the BFD's filename. (core_open): Call gdb_bfd_stash_filename. * corefile.c (reopen_exec_file): Remove #if 0 code. * solib.c (solib_bfd_fopen): Call gdb_bfd_stash_filename. Free pathname. * dwarf2read.c (try_open_dwo_file): Call gdb_bfd_stash_filename. (cherry picked from commit 6bae30f0df82cae05a3d708223dbe7783202295c) Conflicts: gdb/ChangeLog commit 65e97da3008142db7f9edcc36a6324a625eafcf4 Author: Tom Tromey Date: Wed Jul 18 19:33:33 2012 +0000 * dwarf2read.c (try_open_dwo_file): Use gdb_bfd_ref and gdb_bfd_unref. (free_dwo_file): Use gdb_bfd_unref. * cli/cli-dump.c: Include gdb_bfd.h. (bfd_openw_with_cleanup): Use gdb_bfd_ref. (bfd_openr_with_cleanup): Likewise. * windows-nat.c (windows_make_so): Use gdb_bfd_ref, gdb_bfd_unref. * utils.c: Include gdb_bfd.h. (do_bfd_close_cleanup): Use gdb_bfd_unref. * symfile.c: Include gdb_bfd.h. (separate_debug_file_exists): Use gdb_bfd_unref. (bfd_open_maybe_remote): Use gdb_bfd_ref. (symfile_bfd_open): Use gdb_bfd_ref, gdb_bfd_unref. (generic_load): Use gdb_bfd_ref. (reread_symbols): Use gdb_bfd_unref. * symfile-mem.c: Include gdb_bfd.h. (symbol_file_add_from_memory): Use make_cleanup_bfd_close. * spu-linux-nat.c (spu_bfd_open): Use gdb_bfd_ref, gdb_bfd_unref. * solib.c: Include gdb_bfd.h. (solib_bfd_fopen): Use gdb_bfd_ref. (solib_bfd_open): Use gdb_bfd_unref. (free_so_symbols): Use gdb_bfd_unref. (reload_shared_libraries_1): Use gdb_bfd_unref. * solib-spu.c: Include gdb_bfd.h. (spu_bfd_fopen): Use gdb_bfd_ref, gdb_bfd_unref. * solib-pa64.c (pa64_solib_create_inferior_hook): Use gdb_bfd_ref, gdb_bfd_unref. * solib-frv.c: Include gdb_bfd.h. (enable_break2): Use gdb_bfd_unref. * solib-dsbt.c: Include gdb_bfd.h. (enable_break2): Use gdb_bfd_unref. * solib-darwin.c: Include gdb_bfd.h. (darwin_solib_get_all_image_info_addr_at_init): Use gdb_bfd_ref, gdb_bfd_unref. (darwin_bfd_open): Use gdb_bfd_unref. * rs6000-nat.c (add_vmap): Use gdb_bfd_ref, gdb_bfd_unref. * remote-mips.c: Include gdb_bfd.h. (mips_load_srec): Use gdb_bfd_ref. (pmon_load_fast): Use gdb_bfd_ref. * remote-m32r-sdi.c: Include gdb_bfd.h. (m32r_load): Use gdb_bfd_ref. * record.c: Include gdb_bfd.h. (record_save_cleanups): Use gdb_bfd_unref. (cmd_record_save): Use gdb_bfd_unref. * procfs.c (insert_dbx_link_bpt_in_file): Use gdb_bfd_ref, gdb_bfd_unref. * objfiles.h (gdb_bfd_close_or_warn): Remove. (gdb_bfd_ref, gdb_bfd_unref): Move to gdb_bfd.h. * objfiles.c: Include gdb_bfd.h. (free_objfile): Use gdb_bfd_unref. (gdb_bfd_close_or_warn, gdb_bfd_ref, gdb_bfd_unref): Move to gdb_bfd.c. * machoread.c (macho_add_oso_symfile): Use gdb_bfd_unref. (macho_symfile_read_all_oso): Use gdb_bfd_ref, gdb_bfd_unref. (macho_check_dsym): Likewise. * m32r-rom.c: Include gdb_bfd.h. (m32r_load): Use gdb_bfd_ref. (m32r_upload_command): Use gdb_bfd_ref. * jit.c: Include gdb_bfd.h. (jit_bfd_try_read_symtab): Use gdb_bfd_ref, gdb_bfd_unref. * gdb_bfd.h: New file. * gdb_bfd.c: New file. * gcore.c: Include gdb_bfd.h. (create_gcore_bfd): Use gdb_bfd_ref. (do_bfd_delete_cleanup): Use gdb_bfd_unref. (gcore_command): Use gdb_bfd_unref. * exec.c: Include gdb_bfd.h. (exec_close): Use gdb_bfd_unref. (exec_close_1): Use gdb_bfd_unref. (exec_file_attach): Use gdb_bfd_ref. * elfread.c: Include gdb_bfd.h. (build_id_verify): Use gdb_bfd_unref. * dsrec.c: Include gdb_bfd.h. (load_srec): Use gdb_bfd_ref. * corelow.c: Include gdb_bfd.h. (core_close): Use gdb_bfd_unref. (core_open): Use gdb_bfd_ref. * bfd-target.c: Include gdb_bfd.h. (target_bfd_xclose): Use gdb_bfd_unref. (target_bfd_reopen): Use gdb_bfd_ref. * Makefile.in (SFILES): Add gdb_bfd.c. (HFILES_NO_SRCDIR): Add gdb_bfd.h. (COMMON_OBS): Add gdb_bfd.o. (cherry picked from commit e1a653b8460251c21a226128b5281fac3f783328) Conflicts: gdb/ChangeLog commit 8b63be83e4bc2c9c2ba03439c14cd711cbd3a715 Author: Ulrich Weigand Date: Wed Aug 1 13:08:41 2012 +0000 * gdb.base/catch-load.exp: Fix argument to gdb_load_shlibs. * gdb.base/ctxobj.exp: Call gdb_load_shlibs. * gdb.base/print-file-var.exp: Likewise. * gdb.server/solib-list.exp: Skip on remote targets. commit c93df1a6ff53b3181f0c3ac60691077bbfbc898a Author: Ulrich Weigand Date: Wed Aug 1 13:05:44 2012 +0000 gdbserver/ChangeLog: * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish between unsupported TYPE and unimplementable ADDR/LEN combination. (arm_insert_point): Act on new return value. testsuite/ChangeLog: * gdb.base/watchpoint.exp (test_wide_location_1): Expect software watchpoints on ARM. When expecting software watchpoints, tolerate (remote) targets that report unsupported hardware watchpoint only at continue time. (test_wide_location_2): Likewise. commit 881507beb53ed88cac8d468292e4372f542f9e0c Author: Ulrich Weigand Date: Wed Aug 1 12:57:04 2012 +0000 ChangeLog: * arm-linux-nat.c (arm_linux_hw_breakpoint_initialize): Do not attempt to 4-byte-align HW breakpoint addresses for Thumb. gdbserver/ChangeLog: * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt to 4-byte-align HW breakpoint addresses for Thumb. commit 233aca0e9e8bc62e5f4178b5b8d0653aa83fad4c Author: Jan Kratochvil Date: Wed Aug 1 09:03:17 2012 +0000 gdb/testsuite/ * gdb.base/valgrind-infcall.exp: Relax the UNSUPPORTED check for more valgrind versions. commit 2c4676ff82334b670bd4c922d5efc7147b42937f Author: Mike Frysinger Date: Wed Aug 1 03:36:44 2012 +0000 sim: bfin: set bfrom alias field to correct size When the sim is built w/out the bfroms, we end up passing a length of 0 when mapping the rom region which the core sim code rejects. So add an alias field equal to the length to avoid that error. Signed-off-by: Mike Frysinger commit ab1eba6976306dbf52b7947f2561410aae146f96 Author: Mike Frysinger Date: Wed Aug 1 03:35:37 2012 +0000 sim: bfin: update return value in bfin_reg_{fetch,store} The latest gdb sim-remote.c really wants a return value from the fetch/store register functions, so update the Blackfin sim to avoid the warnings/errors. Signed-off-by: Mike Frysinger commit de94b80f67542c7020aedcccfec6b21001a85225 Author: gdbadmin Date: Wed Aug 1 00:00:02 2012 +0000 *** empty log message *** commit 84f420f1cc4092f2d8cf110f98dfaa1ee508fde4 Author: Andreas Schwab Date: Tue Jul 31 19:51:02 2012 +0000 * ppc-linux-tdep.c (ppc_linux_init_abi): Register linux_get_siginfo_type. commit 1d8ea0608ecf3f2acc39b8b6412b5165d7ab7736 Author: Jan Kratochvil Date: Tue Jul 31 07:34:39 2012 +0000 gdb/ * infcall.c (call_function_by_hand): Move BP_ADDR comment to AT_ENTRY_POINT. (call_function_by_hand) : Call write_memory with gdbarch_breakpoint_from_pc, if possible. (call_function_by_hand) : The BP_ADDR comment is moved here. gdb/testsuite/ * gdb.base/valgrind-infcall.c: New file. * gdb.base/valgrind-infcall.exp: New file. commit cbe25e6175fd8371f6d9bd422cbfa861a25f5202 Author: gdbadmin Date: Tue Jul 31 00:00:33 2012 +0000 *** empty log message *** commit 4d4eca67000f91569978f5d5a5830d6acc06eb64 Author: Keith Seitz Date: Mon Jul 30 18:03:53 2012 +0000 * linespec.c (linespec_lex_number): A number followed by quotes is a valid number, too. * gdb.linespec/ls-errs.exp: Check some quote-enclosed linespecs. commit 67e439b20f18370aa5313b2617fd652f15eb265a Author: Doug Evans Date: Mon Jul 30 16:58:10 2012 +0000 * gdb.dwarf2/fission-reread.S: Use .data instead of .bss. * gdb.dwarf2/pr13961.S: Ditto. commit 015d57aa1b9d8dea1a4c659df639014802c81397 Author: Doug Evans Date: Mon Jul 30 16:34:33 2012 +0000 * gdb.dwarf2/dw4-sig-types.exp: Fix typo. commit 8871883754be6b3e6cfdd39f00031e8253fb77bc Author: gdbadmin Date: Mon Jul 30 00:00:34 2012 +0000 *** empty log message *** commit 733f692e7e7bb4efabc33d0ac52d1fdece09bdf5 Author: gdbadmin Date: Sun Jul 29 00:00:02 2012 +0000 *** empty log message *** commit c6117965e1c0a0d8370b456b28e1bf96c4cee82c Author: gdbadmin Date: Sat Jul 28 00:00:32 2012 +0000 *** empty log message *** commit c592f435744edc63417a388df6e12cbdc85290fe Author: Jan Kratochvil Date: Fri Jul 27 21:35:57 2012 +0000 gdb/testsuite/ Fix testsuite regression after --use-deprecated-index-sections removal. * gdb.base/annota1.exp (run until main breakpoint): Update the expect string. * gdb.base/async-shell.exp (gdbindex_warning_re): Likewise. commit dce1afe67e15b8c0ac7359376f87cfc92f721c75 Author: qiyao Date: Fri Jul 27 02:30:20 2012 +0000 gdb/gdbserver/ * server.c (process_point_options): Stop at 'X' when parsing. commit 1bb2d08f1f927762bacce6c3e7b8ae2cb1273e5e Author: gdbadmin Date: Fri Jul 27 00:00:32 2012 +0000 *** empty log message *** commit 5cc4f75ccb5fc22013f242381f5175bc7b4ab9b5 Author: Keith Seitz Date: Thu Jul 26 16:34:38 2012 +0000 * linespec.c (linespec_lexer_lex_number): The input is also a valid number if the next character is a comma or colon. commit b836b1e85b3ed63fba1f64d3e13165d6ce2f2cbe Author: gdbadmin Date: Thu Jul 26 00:00:03 2012 +0000 *** empty log message *** commit 977ab6ce155e1ca82219f03b4c04bab5fa99f6c0 Author: Jan Kratochvil Date: Wed Jul 25 20:35:30 2012 +0000 gdb/testsuite/ Fix testsuite regression after --use-deprecated-index-sections removal. * lib/mi-support.exp (gdbindex_warning_re): Update the expect string. commit e318761d1cf647e2fabd972222c8089836c838fd Author: corsepiu Date: Wed Jul 25 15:35:54 2012 +0000 2012-07-25 Ralf Corsépius * configure.tgt: Add v850*-*-rtems*. commit 85a5550fd99f1ed63e0d6cb2bd8b22a1be2528c9 Author: Hui Zhu Date: Wed Jul 25 12:50:07 2012 +0000 2012-07-25 Hui Zhu * linespec.c (linespec_lexer_lex_number): Update comments, change the return and add check to make sure the input is the decimal numbers. (linespec_lexer_lex_one): If linespec_lexer_lex_number return false, call linespec_lexer_lex_string. commit a0793ea3fadb615f8fd6bfb4e6da3e1acdfa70bc Author: gdbadmin Date: Wed Jul 25 00:00:32 2012 +0000 *** empty log message *** commit fe04b31b2a8e91ecdcf1a4398085040a0e0472de Author: Marc Khouzam Date: Tue Jul 24 17:41:31 2012 +0000 2012-07-24 Marc Khouzam * breakpoint.c (create_breakpoint): Store condition for pending breakpoints. commit ce083ecc15bb7355b4d0edc5e3d3de1b2808fa4c Author: gdbadmin Date: Tue Jul 24 00:00:33 2012 +0000 *** empty log message *** commit 262f25800ce21350b80df0002259f8ff5ea6c53c Author: Keith Seitz Date: Mon Jul 23 21:12:33 2012 +0000 * linespec.c (convert_linespec_to_sal): Don't add any symbols to the result vector if symbol_to_sal returns zero. commit b5a39a5de37b580b8a23bd22131b18d1f9b06c7c Author: gdbadmin Date: Mon Jul 23 00:00:34 2012 +0000 *** empty log message *** commit 2b5ccce60b26578651a6fe658f762fa8b082688b Author: gdbadmin Date: Sun Jul 22 00:00:03 2012 +0000 *** empty log message *** commit 74ef4c1cf21f9edc1e392959136eae47541972a6 Author: gdbadmin Date: Sat Jul 21 00:00:33 2012 +0000 *** empty log message *** commit c607b48599631c29a2e8a79fe8312c09f10f7c92 Author: Doug Evans Date: Fri Jul 20 17:59:04 2012 +0000 * NEWS: Document new options "set/show use-deprecated-index-sections", and delete reference to --use-deprecated-index-sections. * symfile.h (use_deprecated_index_sections): Delete. * dwarf2read.c (use_deprecated_index_sections): Make static. (read_index_from_section): Update wording of how to load deprecated index sections. (_initialize_dwarf2_read): New options "set/show use-deprecated-index-sections". * main.c (captured_main): Delete --use-deprecated-index-sections. doc/ * gdb.texinfo (Mode Options): Delete --use-deprecated-index-sections. (Index Files): Document how to control the use of deprecated index sections. (Index Section Format): Replace --use-deprecated-index-sections with "set use-deprecated-index-sections on". commit 106c053c6ee04e432b7fce34dec174cdf60fcade Author: gdbadmin Date: Fri Jul 20 00:00:03 2012 +0000 *** empty log message *** commit cbcb999b156fb341e1740c982c4a508113924fc5 Author: gdbadmin Date: Thu Jul 19 00:00:33 2012 +0000 *** empty log message *** commit e4df667e6522a3d59285f00907f5d5d9c3cb44e6 Author: gdbadmin Date: Wed Jul 18 16:34:42 2012 +0000 Set version to 7.4.91.20120718-cvs commit a8af3f6c5ca3d32c0cb1c24257dad42972963e26 Author: gdbadmin Date: Wed Jul 18 16:34:26 2012 +0000 GDB 7.4.91 released. commit f467d3abd8586ef655a9e9dda65575e7eb4ca64b Author: gdbadmin Date: Wed Jul 18 15:56:55 2012 +0000 NEWS: Replace "Changes since GDB 7.4" with "Changes in GDB 7.5" commit 0ed9f11dd7e3fcc6ea3bb166d013918f6c7e1abf Author: gdbadmin Date: Wed Jul 18 15:50:59 2012 +0000 Update GDB version number in version.in commit c936df07b82c0194d28fe7e1830dc8b07b6c3ee0 Author: gdbadmin Date: Wed Jul 18 03:43:40 2012 +0000 Set development mode to off by default. commit 60e7a77836a8e8002916b3204e003869f4998722 Author: gdbadmin Date: Wed Jul 18 03:35:25 2012 +0000 Record GDB 7.5 branch creation. Bump version number to 7.4.90.20120718-cvs. commit 814db9ee87e8d609ce60324760cf80cd4e4ec43a Merge: b478323 26ff6aa Author: Jan Kratochvil Date: Sat Jul 14 23:20:13 2012 +0200 Merge remote-tracking branch 'dwz/localmerge' into archer-jankratochvil-fedora18 commit 26ff6aa669fa17355cc926d5b3ed18a5f2fe8dfb Merge: cdb6bc0 e7d508e Author: Jan Kratochvil Date: Sat Jul 14 23:17:20 2012 +0200 Merge remote-tracking branch 'gdb/master' into localmerge Conflicts: gdb/Makefile.in gdb/buildsym.c gdb/buildsym.h gdb/dwarf2read.c gdb/utils.c commit cdb6bc05257160b0a8c70742ef6ed17341bcf063 Author: Jan Kratochvil Date: Sat Jul 14 23:15:36 2012 +0200 Revert "." This reverts commit b622df71c61011f99e15128b4846d9bf85a7cad0. Mistaken merge. commit b622df71c61011f99e15128b4846d9bf85a7cad0 Author: Jan Kratochvil Date: Sat Jul 14 23:10:14 2012 +0200 . commit b478323cbd38598902fa2efb1794192d7ba627b1 Merge: f07a2a2 4b3c3eb Author: Jan Kratochvil Date: Fri Jul 6 19:00:56 2012 +0200 Merge remote-tracking branch 'archer/archer-tromey-dwz-multifile-rebase' into archer-jankratochvil-fedora18 commit 4b3c3eb4fc52d4bb0605a21128ed7641be6dae3a Author: Tom Tromey Date: Fri Jul 6 10:58:00 2012 -0600 fix another thinko in binary search commit f07a2a24c493eebc9df6b7c9ca8c7fe0813aaffd Merge: b25849f e7da6d4 Author: Jan Kratochvil Date: Tue Jul 3 17:28:12 2012 +0200 Merge remote-tracking branch 'archer/archer-tromey-dwz-multifile-rebase' into archer-jankratochvil-fedora18 Conflicts: gdb/Makefile.in gdb/utils.c commit b25849fec54043e4664f65c085a9ca0821ffd90c Merge: b4dd83d 93bb792 Author: Jan Kratochvil Date: Tue Jul 3 17:27:19 2012 +0200 Merge remote-tracking branch 'archer/archer-tromey-python' into archer-jankratochvil-fedora18 commit b4dd83d73691a11683cb74a10131e2e545158c40 Merge: d102132 217d4b5 Author: Jan Kratochvil Date: Tue Jul 3 17:27:03 2012 +0200 Merge remote-tracking branch 'archer/archer-jankratochvil-vla' into archer-jankratochvil-fedora18 commit e7da6d4dccfbf97ee3a8a92a73be40703b7f8353 Author: Tom Tromey Date: Fri Jun 1 12:48:59 2012 -0600 replace cc-with-{index,dwz} with cc-with-tweaks This replaces cc-with-index and cc-with-dwz with a new cc-with-tweaks script, that lets one choose dwz or the index or both, using command-line options. * cc-with-index.sh, cc-with-dwz.sh: Remove. * contrib/cc-with-tweaks.sh: New file. commit 6b3c8a3627db3245e6cbe73e03b5273a8107071d Author: Tom Tromey Date: Tue Jun 5 09:21:49 2012 -0600 make gdb index work with dwz -m This updates gdb to handle .dwz files in conjunction with .gdb_index. We decided that the simplest and also most space-efficient plan was to put a simple .gdb_index into the .dwz file. This index would record the CU list, but nothing else. That is, it still follows the same format as an ordinary .gdb_index, but dwz will arrange for most sections to be empty. * dwarf2read.c (struct dwz_file) : New field. (locate_dwz_sections): Recognize .gdb_index. (create_cus_from_index_list): New function. (create_cus_from_index): Use it. Handle .dwz data. (read_index_from_section): New function, extracted from dwarf2_read_index. (dwarf2_read_index): Use it. Read .gdb_index from dwz file, if needed. commit b4a179ab3fbf61a483be0aec1886b3ce13df79ad Author: Tom Tromey Date: Fri Jun 1 10:20:12 2012 -0600 dwz -m support This patch does all the actual work of supporting 'dwz -m'. The .dwz file is referenced by a new .gnu_debugaltlink section. if this section exists, we read its contents to find the .dwz file. The .dwz BFDs are shared by all objfiles referring to them. It would be nice if we could go a step further and also share the data that is read out of them (partial symbols and such), but this would be quite hard at present. For the main debuginfo reading, the work is in supporting the new forms. DW_FORM_GNU_ref_alt is like DW_FORM_ref, but it refers to an offset in the .dwz file, not in the main file. DW_FORM_GNU_strp_alt is like DW_FORM_strp, but it refers to a string in the .dwz file, not in the main file. Much of the patch is just teaching various code about these forms. This is made much simpler due to the Fission patches -- thanks Doug. There are some minor fixes for latent Fission bugs buried in here; for example, I think there were a couple of places that were previously referencing the wrong abbrev section. The .dwz approach also introduces new DW_MACRO opcodes. Dealing with these is much more localized. * dwarf2read.c (struct dwarf2_per_objfile) : New field. (struct dwarf2_per_cu_data) : No longer bitfield. : New field. (struct dwz_file): New. (struct partial_die_info) : New fields. (locate_dwz_sections, dwarf2_get_dwz_file) (get_abbrev_section_for_cu): New functions. (error_check_comp_unit_head, read_and_check_comp_unit_head) (read_and_check_type_unit_head): Add abbrev_section argument. (create_debug_types_hash_table): Update. (init_cutu_and_read_dies): Use proper abbrev section. (init_cutu_and_read_dies_no_follow): Likewise. (set_partial_user): Do nothing if PST==NULL. (read_comp_units_from_section): New function. (create_all_comp_units): Use it. (scan_partial_symbols, partial_die_parent_scope): Update. (skip_one_die): Handle DW_FORM_GNU_ref_alt, DW_FORM_GNU_strp_alt. (process_imported_unit_die, read_partial_die): Handle .dwz files. (find_partial_die): Add offset_in_dwz argument. Update. (guess_partial_die_structure_name, fixup_partial_die): Update. (read_attribute_value): Handle DW_FORM_GNU_ref_alt, DW_FORM_GNU_strp_alt. (read_indirect_string_from_dwz): New function. (dwarf2_const_value_attr): Handle DW_FORM_GNU_strp_alt. (dump_die_shallow): Handle DW_FORM_GNU_ref_alt, DW_FORM_GNU_strp_alt. (is_ref_attr): Handle DW_FORM_GNU_ref_alt. (follow_die_offset): Add offset_in_dwz argument. (follow_die_ref, dwarf2_fetch_die_location_block): Update. (skip_form_bytes): Handle DW_FORM_GNU_strp_alt. (dwarf_decode_macro_bytes): Add section_is_dwz argument. Handle new macro forms. (dwarf_decode_macros): Update. (dwarf2_find_containing_comp_unit): Add offset_in_dwz argument. (dwarf2_per_objfile_free): Unref dwz_bfd, if it exists (lookup_die_type): Handle DW_FORM_GNU_ref_alt. (create_debug_types_hash_table): Use correct abbrev section. (get_debug_line_section): New function. (dwarf_decode_line_header, dwarf_decode_lines_1): Use it. (process_full_comp_unit): Use end_symtab_full. * buildsym.h (end_symtab_full): Declare. * buildsym.c (end_symtab_full): New function. (end_symtab): Use it. empty symtab fix commit b11b089a87268a9289bc9b89dc7405245921340f Author: Tom Tromey Date: Fri May 25 14:41:21 2012 -0600 attach most section data to the section, not to the BFD Most of the time, the section data read by dwarf2read.c is actually objfile-independent. This means that it makes sense to share this data across objfiles. This patch implements this sharing. It works by attaching the section data to the BFD section itself. It uses the section's user data field for this; this field is not otherwise used in gdb. * dwarf2read.c: Don't include zlib.h or sys/mman.h. (pagesize): Remove. (struct dwarf2_section_info) : Remove. (zlib_decompress_section): Remove. (dwarf2_read_section): Use gdb_bfd_map_section. (munmap_section_buffer): Remove. (free_dwo_file, dwarf2_per_objfile_free): Don't use munmap_section_buffer. * gdb_bfd.c: Include zlib.h, sys/mman.h. (struct gdb_bfd_section_data): New. (free_one_bfd_section): New function. (gdb_bfd_close_or_warn): Use free_one_bfd_section. (get_section_descriptor, zlib_decompress_section) (gdb_bfd_map_section): New functions. * gdb_bfd.h (gdb_bfd_map_section): Declare. commit cb2599c99c3b69a865c4c257a454c04526c606d9 Author: Tom Tromey Date: Fri May 25 11:09:25 2012 -0600 enable bfd sharing for DWOs It seems to me that DWO files are a good candidate for using the BFD cache. This patch implements that idea. * dwarf2read.c (try_open_dwo_file): use gdb_bfd_open. commit 01db572c969f6858d05b6834fa67e79d01c0bfad Author: Tom Tromey Date: Thu May 24 14:50:47 2012 -0600 introduce a BFD cache This introduces a BFD cache. This cache lets us share BFDs across multiple objfiles. This is a trimmed-down version of the patch from my earlier series. Unlike the earlier series, this patch does not introduce any users of the cache. I made this change because the earlier patch required a somewhat hacky change to some target section logic (which relies on BFDs not being shared). I do plan to resurrect that old series (see some recent followups I sent); but meanwhile this will let us share .dwz files easily. This doesn't suffer from the same problem as the earlier version of this patch because dwz sharing is purely internal to dwarf2read. commit 4f2db1ef81036b93bbb1e570fad2573e7600e51a Author: Tom Tromey Date: Mon Jun 4 12:02:31 2012 -0600 rename make_cleanup_bfd_close -> make_cleanup_bfd_unref Now that BFDs are reference counted everywhere in GDB, make_cleanup_bfd_close is a misnomer -- the cleanup does not close the BFD, rather it unrefs it. This patch renames the function. * utils.c (make_cleanup_bfd_unref): Rename from make_cleanup_bfd_close. * defs.h (make_cleanup_bfd_unref): Rename from make_cleanup_bfd_close. * cli/cli-dump.c (bfd_openr_with_cleanup): Update. (bfd_openw_with_cleanup): Update. * corelow.c (core_open): Update. * dsrec.c (load_srec): Update. * m32r-rom.c (m32r_load, m32r_upload_command): Update. * remote-m32r-sdi.c (m32r_load): Update. * remote-mips.c (mips_load_srec): Update. (pmon_load_fast): Update. * solib-darwin.c (darwin_solib_get_all_image_info_addr_at_init): Update. (darwin_bfd_open): Update. * solib.c (solib_bfd_fopen): Update. * symfile-mem.c (symbol_file_add_from_memory): Update. * symfile.c (symbol_file_add_with_addrs_or_offsets): Update. (symfile_bfd_open): Update. (generic_load): Update. commit d6e34fb7f9e2b9ae66a5cc3a15d78c83f07716b9 Author: Tom Tromey Date: Mon Dec 5 08:14:04 2011 -0700 fix a couple of bfd leaks While reading all the code that opens and closes BFDs in GDB, I found a few places where BFDs are leaked. This fixes some of those. I think there is one more leak in the Darwin code that I didn't fix. * remote-mips.c (mips_load_srec): Use make_cleanup_bfd_close. (pmon_load_fast): Likewise. * m32r-rom.c (m32r_load): Use make_cleanup_bfd_close. (m32r_upload_command): Likewise. * dsrec.c (load_srec): Use make_cleanup_bfd_close. * solib-darwin.c (darwin_solib_get_all_image_info_addr_at_init): Use make_cleanup_bfd_close. commit 9ca008975b2d372971115c5c4ac652f33aef0c3c Author: Tom Tromey Date: Wed Dec 7 10:03:56 2011 -0700 clean up allocation of bfd filenames BFD requires the user to allocate the file name for a BFD. GDB does this inconsistently: sometimes the file name is malloc'd, sometimes not. Sometimes it is freed, sometimes not. This patch adds a new function that reallocated the BFD's filename using bfd_alloc. This ties the lifetime to the BFD and removes the need to free the filename when closing the BFD. * symfile.c (symfile_bfd_open): Don't copy name. Call gdb_bfd_stash_filename. (load_command): Open the new BFD before freeing the old. (bfd_open_maybe_remote): Call gdb_bfd_stash_filename. * symfile-mem.c (symbol_file_add_from_memory): Don't copy name. Call gdb_bfd_stash_filename. * spu-linux-nat.c (spu_bfd_open): Don't copy name. * solib-spu.c (spu_bfd_fopen): Don't copy name. Call gdb_bfd_stash_filename. * solib-darwin.c (darwin_solib_get_all_image_info_addr_at_init): Free found_pathname. * rs6000-nat.c (add_vmap): Don't copy filename. Call gdb_bfd_stash_filename. * remote.c (remote_bfd_open): Call gdb_bfd_stash_filename. * machoread.c (macho_add_oso_symfile): Call gdb_bfd_stash_filename. (macho_symfile_read_all_oso): Arrange to free archive_name. Call gdb_bfd_stash_filename. (macho_check_dsym): Don't copy filename. Call gdb_bfd_stash_filename. * jit.c (bfd_open_from_target_memory): Don't copy the filename. * gdb_bfd.c (gdb_bfd_stash_filename): New function. * gdb_bfd.h (gdb_bfd_stash_filename): Declare. * gcore.c (create_gcore_bfd): Call gdb_bfd_stash_filename. * exec.c (exec_close): Don't free the BFD's filename. (exec_file_attach): Don't copy the filename. Call gdb_bfd_stash_filename. * corelow.c (core_close): Don't free the BFD's filename. (core_open): Call gdb_bfd_stash_filename. * corefile.c (reopen_exec_file): Remove #if 0 code. * solib.c (solib_bfd_fopen): Call gdb_bfd_stash_filename. Free pathname. * dwarf2read.c (try_open_dwo_file): Call gdb_bfd_stash_filename. commit b9221135ebc9620c30549dc5846dbd817aec2c54 Author: Tom Tromey Date: Mon Dec 5 08:11:48 2011 -0700 change gdb to refcount bfd everywhere Right now we reference count BFDs in a few places. This patch changes the reference counting to be universal. I think this is an improvement because it means that code in GDB can manipulate BFDs without having to know where they come from. In a few spots this could perhaps be dispensed with, but I think that the resulting uniformity is, in this case, more valuable than the potential micro-optimization. * dwarf2read.c (try_open_dwo_file): Use gdb_bfd_ref and gdb_bfd_unref. (free_dwo_file): Use gdb_bfd_unref. * cli/cli-dump.c: Include gdb_bfd.h. (bfd_openw_with_cleanup): Use gdb_bfd_ref. (bfd_openr_with_cleanup): Likewise. * windows-nat.c (windows_make_so): Use gdb_bfd_ref, gdb_bfd_unref. * utils.c: Include gdb_bfd.h. (do_bfd_close_cleanup): Use gdb_bfd_unref. * symfile.c: Include gdb_bfd.h. (separate_debug_file_exists): Use gdb_bfd_unref. (bfd_open_maybe_remote): Use gdb_bfd_ref. (symfile_bfd_open): Use gdb_bfd_ref, gdb_bfd_unref. (generic_load): Use gdb_bfd_ref. (reread_symbols): Use gdb_bfd_unref. * symfile-mem.c: Include gdb_bfd.h. (symbol_file_add_from_memory): Use make_cleanup_bfd_close. * spu-linux-nat.c (spu_bfd_open): Use gdb_bfd_ref, gdb_bfd_unref. * solib.c: Include gdb_bfd.h. (solib_bfd_fopen): Use gdb_bfd_ref. (solib_bfd_open): Use gdb_bfd_unref. (free_so_symbols): Use gdb_bfd_unref. (reload_shared_libraries_1): Use gdb_bfd_unref. * solib-spu.c: Include gdb_bfd.h. (spu_bfd_fopen): Use gdb_bfd_ref, gdb_bfd_unref. * solib-pa64.c (pa64_solib_create_inferior_hook): Use gdb_bfd_ref, gdb_bfd_unref. * solib-frv.c: Include gdb_bfd.h. (enable_break2): Use gdb_bfd_unref. * solib-dsbt.c: Include gdb_bfd.h. (enable_break2): Use gdb_bfd_unref. * solib-darwin.c: Include gdb_bfd.h. (darwin_solib_get_all_image_info_addr_at_init): Use gdb_bfd_ref, gdb_bfd_unref. (darwin_bfd_open): Use gdb_bfd_unref. * rs6000-nat.c (add_vmap): Use gdb_bfd_ref, gdb_bfd_unref. * remote-mips.c: Include gdb_bfd.h. (mips_load_srec): Use gdb_bfd_ref. (pmon_load_fast): Use gdb_bfd_ref. * remote-m32r-sdi.c: Include gdb_bfd.h. (m32r_load): Use gdb_bfd_ref. * record.c: Include gdb_bfd.h. (record_save_cleanups): Use gdb_bfd_unref. (cmd_record_save): Use gdb_bfd_unref. * procfs.c (insert_dbx_link_bpt_in_file): Use gdb_bfd_ref, gdb_bfd_unref. * objfiles.h (gdb_bfd_close_or_warn): Remove. (gdb_bfd_ref, gdb_bfd_unref): Move to gdb_bfd.h. * objfiles.c: Include gdb_bfd.h. (free_objfile): Use gdb_bfd_unref. (gdb_bfd_close_or_warn, gdb_bfd_ref, gdb_bfd_unref): Move to gdb_bfd.c. * machoread.c (macho_add_oso_symfile): Use gdb_bfd_unref. (macho_symfile_read_all_oso): Use gdb_bfd_ref, gdb_bfd_unref. (macho_check_dsym): Likewise. * m32r-rom.c: Include gdb_bfd.h. (m32r_load): Use gdb_bfd_ref. (m32r_upload_command): Use gdb_bfd_ref. * jit.c: Include gdb_bfd.h. (jit_bfd_try_read_symtab): Use gdb_bfd_ref, gdb_bfd_unref. * gdb_bfd.h: New file. * gdb_bfd.c: New file. * gcore.c: Include gdb_bfd.h. (create_gcore_bfd): Use gdb_bfd_ref. (do_bfd_delete_cleanup): Use gdb_bfd_unref. (gcore_command): Use gdb_bfd_unref. * exec.c: Include gdb_bfd.h. (exec_close): Use gdb_bfd_unref. (exec_close_1): Use gdb_bfd_unref. (exec_file_attach): Use gdb_bfd_ref. * elfread.c: Include gdb_bfd.h. (build_id_verify): Use gdb_bfd_unref. * dsrec.c: Include gdb_bfd.h. (load_srec): Use gdb_bfd_ref. * corelow.c: Include gdb_bfd.h. (core_close): Use gdb_bfd_unref. (core_open): Use gdb_bfd_ref. * bfd-target.c: Include gdb_bfd.h. (target_bfd_xclose): Use gdb_bfd_unref. (target_bfd_reopen): Use gdb_bfd_ref. * Makefile.in (SFILES): Add gdb_bfd.c. (HFILES_NO_SRCDIR): Add gdb_bfd.h. (COMMON_OBS): Add gdb_bfd.o. commit d10213220191589814714d71ef0f5ba64fbc3b75 Merge: 592f290 d5414be Author: Jan Kratochvil Date: Sat Jun 2 18:07:27 2012 +0200 Merge remote-tracking branch 'archer/archer-tromey-python' into archer-jankratochvil-fedora18 ----------------------------------------------------------------------- hooks/post-receive -- Repository for Project Archer.