aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-10-082010-10-08 Ulrich Weigand <uweigand@de.ibm.com>Ulrich Weigand2-0/+208
Daniel Jacobowitz <dan@codesourcery.com> * arm-tdep.c (thumb_in_function_epilogue_p) (arm_in_function_epilogue_p): New. (arm_gdbarch_init): Install arm_in_function_epilogue_p as gdbarch_in_function_epilogue_p callback.
2010-10-08*** empty log message ***gdbadmin1-1/+1
2010-10-07daily updateAlan Modra1-1/+1
2010-10-07 * configure.ac (build_lto_plugin): New shell variable.Dave Korn3-6/+29
(--enable-lto): Turn on by default for all non-ELF platforms that have had LTO support added so far. Set build_lto_plugin appropriately for both ELF and non-ELF. (configdirs): Add lto-plugin or not based on build_lto_plugin. * configure: Regenerate.
2010-10-07 * cc-with-index.sh (output_file): Default to a.out.Doug Evans2-0/+3
2010-10-07Add missing ChangeLog entry for toplevel configure from 2010-07-26.Ralf Wildenhues1-0/+5
2010-10-07 * dwarf2read.c (mapped_index): Rename member index_table toDoug Evans2-27/+36
symbol_table and index_table_slots to symbol_table_slots. All uses updated. (create_symbol_hash_table): Renamed from create_index_table. All callers updated. (add_indices_to_cpool): Rename arg index_table to symbol_hash_table. (write_hash_table): Rename local index_table to symbol_hash_table.
2010-10-07 * addrmap.h (addrmap_foreach_fn): New typedef.Doug Evans3-2/+88
(addrmap_foreach): Declare. * addrmap.c (struct addrmap_funcs): New member foreach. (addrmap_foreach): New function. (addrmap_fixed_foreach): New function. (addrmap_fixed_funcs): Update. (struct mutable_foreach_data): New struct. (addrmap_mutable_foreach_worker): New function. (addrmap_mutable_foreach): New function. (addrmap_mutable_funcs): Update.
2010-10-07merge from gccDJ Delorie3-13/+13
2010-10-07gas/Bernd Schmidt7-3/+39
* config/tc-tic6x.c (tic6x_try_encode): Correct encoding of fstg field in SPKERNEL instructions. opcodes/ * tic6x-dis.c (print_insn_tic6x): Correct decoding of fstg field in SPKERNEL instructions. gas/testsuite/ * gas/tic6x/insns-c674x-sploop.d: Add two more sploop/spkernel tests. * gas/tic6x/insns-c674x-sploop.s: Likewise.
2010-10-07Correct dict_hash to our most recent version.Paul N. Hilfinger2-8/+22
Several changes to dict_hash from Adacore's local version were inadvertantly left out of the last change to that function. These changes conservatively cause dict_hash to revert to msymbol_hash_iw in more cases where the symbol being hashed is known not to be Ada-encoded. This avoids a few cases where the function hashes large groups of names with similar prefixes to the same value. Changelog: gdb/ * dictionary.c (dict_hash): Revert to msymbol_hash_iw in more cases.
2010-10-07Rework symbol searches to move Ada-specific stuff to ada-lang.c.Paul N. Hilfinger5-231/+336
This is a clean-up of some of our symbol-lookup machinery to pull some kludgy Ada-specific definitions out of psymtab.c. In place of map_ada_symtabs and ada_lookup_partial_symbol, we have a method map_matching_symbols, which searches through all symbol tables and partial symbol tables looking for a symbol that matches according to a matching function that is passed as a parameter. This requires some care, because partial symbol tables speed up searches by binary search, while full symbol tables use hashing. To call map_matching_symbols, therefore, you may need to supply both a matching function that is compatible with the dictionary hash function and an ordering relation that is compatible with strcmp_iw, which is used to order partial symbol tables. Having added this general routine to psymtab.c, we use it in ada-lang.c to rework add_non_local_symbols (now renamed add_nonlocal_symbols). Changelog: gdb/ * ada-lang.c (full_match): Declare. (ada_match_name): Rename to match_name (we should avoid prefixing static symbols with "ada_"). (match_name): New name for ada_match_name. (struct ada_psym_data): Remove and replace with... (struct match_data): User data for map_matching_symbols. (ada_add_psyms): Remove. (aux_add_nonlocal_symbols): New function, used as callback for map_matching_symbols. (compare_names): Ordering function adopted from strcmp_iw for Ada-encoded symbols. (ada_add_non_local_symbols): Rename to add_nonlocal_symbols. (add_nonlocal_symbols): Renamed from ada_add_non_local_symbols. Rework to use map_matching_symbols instead of map_ada_symtabs. (ada_lookup_symbol_list): Use add_nonlocal_symbols. * psymtab.c: Include dependency on dictionary.h. (match_partial_symbol): New function. (ada_lookup_partial_symbol): Remove. (map_block): New function, auxiliary to map_matching_symbols_psymtab. (map_matching_symbols_psymtab): New function. (psym_functions): Replace map_ada_symtabs with map_matching_symbols_psymtab. * symfile.h: Replace map_ada_symtabs definition with map_matching_symbols.
2010-10-07Extend hashed symbol dictionaries to work with AdaPaul N. Hilfinger4-59/+200
This patch allows Ada to speed up symbol lookup by using the facilities in dictionary.[ch] for hashed lookups. First, we generalize dictionary search to allow clients to specify any matching function compatible with the hashing function. Next, we modify the hashing algorithm so that symbols that wild-match a name hash to the same value. Finally, we modify Ada symbol lookup to use these facilities. Because this patch touches on a hashing algorithm used by other languages, I took the precaution of doing a speed test on a list of about 12000 identifiers (repeatedly inserting all of them into a table and then doing a lookup on a million names at random, thus testing the speed of the hashing algorithm and how well it distributed names). There was actually a slight speedup, probably as a result of open- coding some of the tests in msymbol_hash_iw. By design, the revised hashing algorithm produces the same results as the original on most "normal" C identifiers. We considered augmenting the dictionary interface still further by allowing different hashing algorithms for different dictionaries, based on the (supposed) language of the symbols in that dictionary. While this produced better isolation of the changes to Ada programs, the additional flexibility also complicated the dictionary interface. I'd prefer to keep things simple for now. Tested w/o regressions on Linux i686. ChangeLog: gdb/ * ada-lang.c (ada_match_name): Use new API for wild_match. (wild_match): Change API to be consistent with that of strcmp_iw; return 0 for a match, and switch operand order. (full_match): New function. (ada_add_block_symbols): Use dict_iter_match_{first,next} for matching to allow use of hashing. * dictionary.c (struct dict_vector): Generalize iter_name_first, iter_name_next ot iter_match_first, iter_match_next. (iter_name_first_hashed): Replace with iter_match_first_hashed. (iter_name_next_hashed): Replace with iter_match_next_hashed. (iter_name_first_linear): Replace with iter_match_first_linear. (iter_name_next_linear): Replace with iter_match_next_linear. (dict_iter_name_first): Re-implement to use dict_iter_match_first. (dict_iter_name_next): Re-implement to use dict_iter_match_next. (dict_iter_match_first): New function. (dict_iter_match_next): New function. (dict_hash): New function. * dictionary.h (dict_iter_match_first, dict_iter_match_next): Declare. * psymtab.c (ada_lookup_partial_symbol): Use new wild_match API.
2010-10-07 * data-directory/Makefile.in: Remove @host_makefile_frag@, @frags@.Doug Evans2-5/+5
2010-10-07*** empty log message ***gdbadmin1-1/+1
2010-10-06 * callback.c (os_lseek): Call wrap on lseek result.Hans-Peter Nilsson2-1/+5
2010-10-06 * traps.c (cris_break_13_handler): Pass lseekHans-Peter Nilsson2-0/+13
offset parameter as sign-extended.
2010-10-06 * sim/cris/c/seek3.c, sim/cris/c/seek4.c: New tests.Hans-Peter Nilsson3-0/+97
2010-10-06merge from gccDJ Delorie9-13/+136
2010-10-06daily updateAlan Modra1-1/+1
2010-10-06 * Makefile.in (REQUIRED_SUBDIRS): New var.Doug Evans2-0/+16
(subdir_do): Verify required subdir Makefiles exist.
2010-10-06gdb:Ken Werner6-2/+63
* dwarf2read.c (read_tag_const_type): Handle const arrays. gdb/testsuite: * gdb.base/constvars.c (logical, lugged, luck, lunar, lumen, lurk, lush, lynx) New constant. * gdb.base/constvars.exp: Test const array types. * gdb.dwarf2/dw2-strp.exp: Add const qualifier for ptype tests.
2010-10-06 Create subdir data-directory.Doug Evans8-45/+243
* Makefile.in (XML_SYSCALL_DIR, XML_SYSCALL_FILES): Moved to data-directory/Makefile.in. (SUBDIRS): Add data-directory. (all): Remove xml-syscall-copy dependency. (xml-syscall-copy): Moved to data-directory/Makefile.in as stamp-syscalls. (xml-syscall-install): Moved to data-directory/Makefile.in as install-syscalls. (install-only): Remove xml-syscall-install dependency. (all-data-directory): New rule. (data-directory/Makefile): New rule. * configure.ac (AC_OUTPUT): Add data-directory/Makefile. * configure: Regenerate. * data-directory/Makefile.in: New file. * python/lib/gdb/__init__.py: New file. testsuite/ * gdb.base/catch-syscall.exp (do_syscall_tests): Update location of syscall staging area.
2010-10-06[Ada] Fix ARI warnings in advance_wild_matchJoel Brobecker2-3/+9
gdb/ChangeLog: * ada-lang.c (advance_wild_match): Delete local variable t2. Adjust code accordingly. Minor reformatting.
2010-10-06 * script-sections.cc(class Memory_region): RemoveNick Clifton11-150/+496
current_lma_offset_ field. Rename current_vma_offset_ to current_offset_. Add last_section_ field. (Memory_region::get_current_vma_address): Rename to get_current_address. (Memory_region::get_current_lma_address): Delete. (Memory_region::increment_vma_offset): Rename to increment_offset. (Memory_region::increment_lma_offset): Delete. (Memory_region::attributes_compatible): New method. Returns true if the provided section is compatible with the region. (Memory_region::get_last_section): New method. Returns the last section to use the region. (Memory_region::set_last_section): New method. Stores the last section to use the region. (Script_sections::block_in_region): New method. Returns true if a block of memory is contained within a region. (Script_sections::find_memory_region): New method. Locates a memory region to be used to set a VMA or LMA address. (Output_section_definition::set_section_addresses): Add code to check for addresses set by memory regions. (Output_segment::set_section_addresses): Remove memory region walking code. (Script_sections::create_segment): Add a warning if a header segment is created outside of any region. * script-sections.h (class Script_sections): Add prototypes for find_memory_region and block_in_region methods. * testsuite/memory_test.s: Use .long instead of .word. * testsuite/memory_test.t: Add some more output sections. * testsuite/memory_test.sh: Update expected output. * ld.texinfo: Update description of computation of VMA and LMA addresses for output sections. * ld-scripts/rgn-at5.t: Add some more output sections. * ld-scripts/rgn-at5.d: Update expected output.
2010-10-06really sync config/ChangeLogPaolo Bonzini1-0/+19
2010-10-06gdb:Ken Werner8-23/+45
* gdbtypes.h (struct main_type): Remove flag_nottext. (enum type_flag_value): Remove TYPE_FLAG_NOTTEXT. (enum type_instance_flag_value): Add TYPE_INSTANCE_FLAG_NOTTEXT. (TYPE_NOTTEXT): Use TYPE_INSTANCE_FLAG_NOTTEXT instead of flag_nottext. * gdbtypes.c (make_vector_type): Use TYPE_INSTANCE_FLAG_NOTTEXT instead of TYPE_FLAG_NOTTEXT. (init_type): Remove the initialization of the flag_nottext field. (gdbtypes_post_init): Use TYPE_INSTANCE_FLAG_NOTTEXT instead of TYPE_FLAG_NOTTEXT. * c-valprint.c (c_val_print): Remove TYPE_VECTOR check. gdb/testsuite: * gdb.base/gnu_vector.c: Add variable c4. * gdb.base/gnu_vector.exp: Add tests for character vector printing. * gdb.arch/altivec-abi.exp: Fix expect pattern of character vectors.
2010-10-06 bfd/Nathan Sidwell4-13/+22
* elf32-arm.c (elf32_arm_stub_long_branch_any_arm_pic, elf32_arm_stub_long_branch_any_arm_pic): Use a consistent name for ip/r12. (arm_type_of_stub): Remove superfluous braces. gas/ * config/tc-arm.c (encode_branch): Remove superfluous braces. (do_t_branch): Move reloc setting to end of routine.
2010-10-06sync config/ChangeLogPaolo Bonzini1-23/+0
2010-10-06Fix typo in ld dependency commit.Ralf Wildenhues3-2/+5
ld/: * Makefile.am (ALL_64_EMULATIONS): Fix typo in last commit. * Makefile.in: Regenerate.
2010-10-06Fix dependency tracking in ld.Ralf Wildenhues3-672/+1018
ld/: * Makefile.am (ALL_EMULATIONS): Rewrite in terms of ... (ALL_EMULATION_SOURCES): ... this new variable. (ALL_64_EMULATIONS): Rewrite in terms of ... (ALL_64_EMULATION_SOURCES): ... this new variable. (EXTRA_ld_new_SOURCES): Rewrite in terms of the _SOURCES variables. (eelf32microblaze.c): Fix indentation. * Makefile.in: Regenerate.
2010-10-06*** empty log message ***gdbadmin1-1/+1
2010-10-05daily updateAlan Modra1-1/+1
2010-10-05 * bucomm.c (bfd_nonfatal, bfd_nonfatal_message): Don't clobber errno.Alan Modra2-2/+6
2010-10-05 * gdb.arch/altivec-abi.exp: Fix a typo.Maciej W. Rozycki2-2/+6
2010-10-05 * bucomm.c (bfd_nonfatal): Flush stdout before output to stderr.Alan Modra3-15/+44
(bfd_nonfatal_message, report, list_matching_formats): Likewise. (list_supported_targets): Tidy. * objdump.c (free_only_list): Formatting. (slurp_dynamic_symtab): Non-zero exit status for "not a dynamic object". (update_source_path): Delete redundant check for NULL filename. (disassemble_bytes): Error if disassemble_fn returns a value that won't increment address. (disassemble_data): Don't capitalize error message. (read_section_stabs): Likewise. (main): Return non-zero exit status on bad options.
2010-10-05 * cc-with-index.sh: New file.Doug Evans2-0/+124
2010-10-05 * dwarf2read.c (hash_strtab_entry): Insert blank line afterDoug Evans2-0/+29
function comment. (eq_strtab_entry, create_strtab, add_string): Ditto. (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry): Ditto. (create_index_table, create_mapped_symtab, find_slot): Ditto. (hash_expand, add_index_entry, add_indices_to_cpool): Ditto. (write_hash_table, add_address_entry, write_psymbols): Ditto. (write_obstack, unlink_if_set, write_one_signatured_type): Ditto. (write_psymtabs_to_index): Ditto.
2010-10-05 * dwarf2read.c (dw2_do_instantiate_symtab): Insert blank line afterDoug Evans2-0/+23
function comment. (dw2_instantiate_symtab, dw2_get_cu, extract_cu_value): Ditto. (create_cus_from_index, create_addrmap_from_index): Ditto. (mapped_index_string_hash, find_slot_in_mapped_hash): Ditto. (dw2_setup, dw2_require_line_header, dw2_require_full_path): Ditto. (dw2_do_expand_symtabs_matching): Ditto.
2010-10-05*** empty log message ***gdbadmin1-1/+1
2010-10-04* Makefile.in (uninstall): Use $(DESTDIR).Doug Evans2-1/+5
2010-10-04daily updateAlan Modra1-1/+1
2010-10-04[Ada/funcalls] do not coerce fat pointers on the stackJoel Brobecker4-48/+33
When one of the parameter values in a subprogram calls is an array whose value does not come from inferior memory, the debugger first copies the array value in inferior memory. Up to now, the memory used to hold that copy was taken from the stack (just below the SP), but this is causing problems on SPARC v9. So the immediate fix is to follow what C does with arrays and strings, which is allocate memory on the heap. gdb/ChangeLog: * ada-lang.c: #include "value.h". (ensure_lval): Delete advance declaration. Remove gdbarch and sp arguments. Implement using value_allocate_space_in_inferior instead of allocating memory from the stack. (make_array_descriptor): Remove gdbarch and sp parameters. Update calls to ensure_lval. (ada_convert_actual): Remove gdbarch and sp parameters. Update calls to make_array_descriptor and ensure_lval. * ada-lang.h (ada_convert_actual): Update declaration. * infcall.c (value_arg_coerce): Update call to ada_convert_actual.
2010-10-04 * python/python.c (_initialize_python): Define new functionDoug Evans2-14/+42
GdbSetPythonDirectory in python. Use it to update sys.path and gdb.__path__.
2010-10-042010-10-04 David Daney <ddaney@caviumnetworks.com>David Daney7-1/+139
* config/tc-mips.c (mips_fix_cn63xxp1): New variable. (mips_ip): Add errata work around when mips_fix_cn63xxp1 set. (OPTION_FIX_CN63XXP1, OPTION_NO_FIX_CN63XXP1): New enum options enumerations. (md_longopts): Add options for -mfix-cn63xxp1 and -mno-fix-cn63xxp1. (md_parse_option): Handle OPTION_FIX_CN63XXP1 and OPTION_NO_FIX_CN63XXP1. (md_show_usage): Add documentation for -mfix-cn63xxp1. * doc/c-mips.texi (-mfix-cn63xxp1, -mno-fix-cn63xxp1): Document the new options. 2010-10-04 David Daney <ddaney@caviumnetworks.com> * gas/mips/mips.exp (octeon-pref): Run the new test. * gas/mips/octeon-pref.s: New test. * gas/mips/octeon-pref.d: New expected results for the new test.
2010-10-04bfd/Bernd Schmidt20-413/+455
* elf-bfd.h (struct bfd_elf_section_reloc_data): New structure. (struct bfd_elf_section_data): New members REL and RELA; delete members REL_HDR, REL_HDR2, REL_COUNT, REL_COUNT2, REL_IDX, REL_IDX2, REL_HASHES. (_bfd_elf_init_reloc_shdr): Adjust declaration. (_bfd_elf_single_rel_hdr): Declare. (RELOC_AGAINST_DISCARDED_SECTION): Use it. * elf.c (bfd_section_from_shdr): Adjusted to match changes in data structures. (_bfd_elf_init_reloc_shdr): New arg RELDATA. Remove arg REL_HDR. All callers changed. Allocate memory for the Elf_Internal_Shdr structure. (_bfd_elf_single_rel_hdr): New function. (struct fake_section_arg): New structure. (elf_fake_section): Expect to see a pointer to it in the third argument. If doing a relocatable link, allocate both REL and RELA sections as needed. (assign_section_numbers): Adjusted to match changes in data structures. (_bfd_elf_compute_section_file_positions): Call elf_fake_sections with a struct fake_section_args argument. * elfcode.h (elf_write_relocs): Adjusted to match changes in data structures. (elf_slurp_reloc_table): Likewise. * elflink.c (_bfd_elf_link_read_relocs): Likewise. (_bfd_elf_link_size_reloc_section): Remove arg REL_HDR, replace with RELDATA. Remove argument O. All callers changed. Remove code to discover the right rel_hdr and count. (_bfd_elf_link_output_relocs): Adjusted to match changes in data structures. (elf_link_adjust_relocs): Remove args REL_HDR, COUNT and REL_HASH; replace with RELDATA. All callers changed. (elf_link_input_bfd): Correctly generate rel_hash data when both REL and RELA sections are present. (elf_reloc_link_order): Adjusted to match changes in data structures. (bfd_elf_final_link): Simplify code to count relocs. Free the hashes array for both REL and RELA. (get_dynamic_reloc_section_name): Use _bfd_elf_single_reloc_hdr * elf32-m32r.c (m32r_elf_fake_sections, elf_backend_fake_sections): Delete. * elf32-tic6x.c (elf32_tic6x_fake_sections, elf_backend_fake_sections): Delete. (elf32_tic6x_rel_relocation_p): Adjusted to match changes in data structures. * elf32-microblaze.c (microblaze_elf_check_relocs): Use _bfd_elf_single_rel_hdr. * elf32-ppc.c (ppc_elf_relax_section): Likewise. * elf32-spu.c (spu_elf_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. * elf64-hppa.c (get_reloc_section): Likewise. * elf64-mips.c (mips_elf64_slurp_reloc_table): Adjusted to match changes in data structures. (mips_elf64_write_relocs): Use _bfd_elf_single_rel_hdr. * elf64-ppc.c (ppc64_elf_edit_opd): Likewise. (ppc64_elf_edit_toc): Likewise. (get_relocs): Adjusted to match changes in data structures. Allocate an Elf_Internal_Shdr structure if necessary. (ppc64_elf_finish_dynamic_sections): Use _bfd_elf_single_rel_hdr. * elf64-sparc.c (elf64_sparc_slurp_reloc_table): Adjusted to match changes in data structures. * elfxx-ia64.c (get_reloc_section): Use _bfd_elf_single_rel_hdr. * elfxx-mips.c (MIPS_RELOC_RELA_P): Remove macro. (mips_elf_rel_relocation_p): Adjusted to match changes in data structures. (_bfd_mips_elf_relocate_section): Use mips_elf_rel_relocation_p rather than MIPS_RELOC_RELOCA_P. * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Use _bfd_elf_single_rel_hdr. (_bfd_sparc_elf_relocate_section): Likewise. ld/ * emultempl/xtensaelf.em (replace_insn_sec_with_prop_sec): Use _bfd_elf_single_rel_hdr.
2010-10-04Have ptype handle types declared pragma Unchecked_Variants.Paul N. Hilfinger2-35/+76
When a type is marked with pragma Unchecked_Variants, ptype did not print variants having a single component, since the compiler produces incorrect debugging output for such cases. With this patch, we special-case these components so that they print. Changelog: * gdb/ada-typeprint.c (print_selected_record_field_types): New function, incorporating and generalizing print_record_field_types. (print_record_field_types): Change return value and update comment. Re-implement using print_selected_record_field_types. (print_choices): Print "=>" here. Handle case of unencoded variant branch. (print_variant_clauses): Reformat comment. Special-case unencoded variant branch.
2010-10-04Replace wild_match with faster version and modify its interface.Paul N. Hilfinger5-25/+88
This new version of wild_match is comparable in speed to strcmp_iw, and has the same signature and same return value for equal names. gdb/ChangeLog: * ada-lang.c (wild_match): Reimplement. Change API to eliminate unused length argument, reverse arguments and make 0 the 'true' return value. (advance_wild_match): New auxiliary function for wild_match to improve readability. (ada_match_name, ada_add_block_symbols): Use new API for wild_match. * psymtab.c (ada_lookup_partial_symbol, map_ada_symtabs): Use new API for wild_match. * symfile.h (map_ada_symtabs): Modify declaration to use new API for wild_match. * dwarf2read.c (dw2_map_ada_symtabs): Ditto.
2010-10-04*** empty log message ***gdbadmin1-1/+1
2010-10-03daily updateAlan Modra1-1/+1