aboutsummaryrefslogtreecommitdiff
path: root/gdb
AgeCommit message (Collapse)AuthorFilesLines
2010-10-10*** empty log message ***gdbadmin1-1/+1
2010-10-09*** empty log message ***gdbadmin1-1/+1
2010-10-08 * tracepoint.c (merge_uploaded_trace_state_variables): Only printDaniel Jacobowitz2-4/+13
messages if info_verbose.
2010-10-08Test case for unimplemented overload cases.Sami Wagiaalla3-0/+312
2010-10-08 Sami Wagiaalla <swagiaal@redhat.com> * gdb.cp/oranking.exp: New test. * gdb.cp/oranking.cc: New test program.
2010-10-08gdb:Ken Werner6-19/+112
* valops.c (value_cast): Handle vector types. * valarith.c (value_binop): Widen scalar to vector if appropriate. gdb/testsuite: * gdb.base/gnu_vector.c (ia, ib, fa, fb): New variables. * gdb.base/gnu_vector.exp: Add tests for scalar to vector widening.
2010-10-08 * arm-tdep.c (thumb_expand_immediate): New function.Ulrich Weigand2-42/+404
(thumb_instruction_changes_pc): Likewise. (thumb2_instruction_changes_pc): Likewise. (thumb_analyze_prologue): Handle 32-bit Thumb instructions during prologue parsing. Improved support for optimized code. (thumb_scan_prologue): Do not reply on line-number information, use same heuristics as arm_scan_prologue insead. (skip_prologue_function): Accept functions "__tls_get_addr" and "__aeabi_read_tp".
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-07 * cc-with-index.sh (output_file): Default to a.out.Doug Evans2-0/+3
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-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 * 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-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*** empty log message ***gdbadmin1-1/+1
2010-10-05 * gdb.arch/altivec-abi.exp: Fix a typo.Maciej W. Rozycki2-2/+6
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-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-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-03*** empty log message ***gdbadmin1-1/+1
2010-10-02 * lib/mi-support.exp (thread_selected_re): Correct pattern usedMaciej W. Rozycki2-1/+6
to match a thread ID.
2010-10-02gdb/testsuite/Jan Kratochvil2-1/+6
Fix s390x testcase compatibility. * gdb.dwarf2/dw2-double-set-die-type.S: Use .2byte, not .value.
2010-10-02*** empty log message ***gdbadmin1-1/+1
2010-10-01 * dwarf2read.c (_initialize_dwarf2_read): Add usage info to help textDoug Evans2-1/+9
for `save gdb-index' command.
2010-10-01 * symfile.h (allocate_symtab): Update.Tom Tromey11-24/+45
* symfile.c (allocate_symtab): Make 'filename' const. * psymtab.c (add_psymbol_to_bcache): Make 'name' const. (add_psymbol_to_list): Likewise. * psympriv.h (struct partial_symtab) <filename, dirname>: Now const. (add_psymbol_to_list): Update. * mdebugread.c (new_symtab): Make 'name' const. (psymtab_to_symtab_1): Make 'filename' const. * elfread.c (elfstab_offset_sections): Update. * dwarf2read.c (dwarf_decode_lines): Make 'comp_dir' const. (dwarf2_start_subfile): Make 'dirname' and 'comp_dir' const. (psymtab_include_file_name): Update. * dbxread.c (find_stab_function_addr): Make 'filename' const. * buildsym.h (start_subfile): Update. * buildsym.c (start_subfile): Make arguments const.
2010-10-012010-09-30 Ali Lakhia <lakhia@alumni.utexas.net>Michael Snyder2-7/+13
* fork-child.c (breakup_args): Fix crash if shell forking is disabled at compile time.
2010-10-01 * lib/gdb-python.exp: New file.Doug Evans14-166/+85
* gdb.python/py-block.exp: Use it. * gdb.python/py-breakpoint.exp: Ditto. * gdb.python/py-frame.exp: Ditto. * gdb.python/py-inferior.exp: Ditto. * gdb.python/py-param.exp: Ditto. * gdb.python/py-prettyprint.exp: Ditto. * gdb.python/py-shared.exp: Ditto. * gdb.python/py-symbol.exp: Ditto. * gdb.python/py-symtab.exp: Ditto. * gdb.python/py-type.exp: Ditto. * gdb.python/py-value.exp: Ditto. * gdb.python/python.exp: Ditto.
2010-10-01[Ada] array and bounds in fat pointer can be a stubJoel Brobecker2-4/+38
This patch adds handling of the case when a fat pointer has the P_ARRAY and/or P_BOUNDS fields defined as a stub. In that case, this stub needs to be resolved. There are two issues: . First, making sure that the resolution takes place itself. That's the change to ada_check_typedef. . Make sure that the type returned after resolution is not itself a typedef. This is the change to ada_check_typedef. gdb/ChangeLog (Jerome Guitton, Joel Brobecker): * ada-lang.c (desc_bounds): Add handling of the case where the P_BOUNDS field is a pointer to a stub. (desc_data_target_type): Same for P_ARRAY field. (ada_check_typedef): Strip the typedef layers from the type found by ada_find_any_type.
2010-10-01[sparc] inferior SEGV while calling Ada subprogramJoel Brobecker3-0/+23
gdb/ChangeLog: * sparc-tdep.c (sparc32_frame_align): New function. (sparc32_gdbarch_init): Set the frame_align gdbarch method. * sparc64-tdep.c (sparc64_frame_align): New function. (sparc64_gdbarch_init): Set the frame_align gdbarch method.
2010-10-01Set MAX_REGISTER_SIZE to 64.H.J. Lu2-1/+5
2010-09-30 H.J. Lu <hongjiu.lu@intel.com> * defs.h (MAX_REGISTER_SIZE): Set to 64.
2010-10-01*** empty log message ***gdbadmin1-1/+1
2010-09-30 * symfile.h (struct sym_fns) <next>: Remove.Tom Tromey11-44/+50
(add_symtab_fns): Update. * symfile.c (sym_fns_ptr): New typedef. (symtab_fns): Now a VEC. (add_symtab_fns): Update. Change argument type. (find_sym_fns): Update. Change return type. (get_symfile_segment_data): Update. * objfiles.h (struct objfile) <sf>: Now const. * somread.c (som_sym_fns): Now const. Update. * xcoffread.c (xcoff_sym_fns): Now const. Update. * mipsread.c (ecoff_sym_fns): Now const. Update. * machoread.c (macho_sym_fns): Now const. Update. * elfread.c (elf_sym_fns): Now const. Update. (elf_sym_fns_gdb_index): Likewise. * dbxread.c (aout_sym_fns): Now const. Update. * coffread.c (coff_sym_fns): Now const. Update.
2010-09-30gdbTom Tromey5-2/+77
* value.c (value_primitive_field): Take 'offset' into account for packed field. gdb/testsuite * gdb.base/anon.exp: New file. * gdb.base/anon.c: New file.
2010-09-30gdbTom Tromey5-5/+41
* completer.c (count_struct_fields): Handle anonymous structs and unions. (add_struct_fields): Likewise. gdb/testsuite * gdb.base/completion.exp: Test completion through anonymous union. * gdb.base/break1.c (struct some_struct): Add anonymous union.
2010-09-30gdb/Jan Kratochvil9-11/+296
Fix printing parameters of inlined functions. * ada-lang.c (is_known_support_routine) (ada_unhandled_exception_name_addr_from_raise): Provide NULL parameter for find_frame_funname. * python/py-frame.c (frapy_name): Likewise. * stack.c (find_frame_funname): New parameter funcp. Update the function comment. Fill it in. (print_frame): New variable func. Initialize it by find_frame_funname. Print arguments only if FUNC is not NULL. Use FUNC as the parameter of print_args_stub. * stack.h (find_frame_funname): New parameter funcp. Remove the function declaration comment. gdb/testsuite/ Fix printing parameters of inlined functions. * gdb.dwarf2/dw2-inline-param.exp: New file. * gdb.dwarf2/dw2-inline-param-main.c: New file. * gdb.dwarf2/dw2-inline-param.S: New file.
2010-09-30gdb/Jan Kratochvil4-8/+58
PR corefiles/12071. * inferior.c (have_live_inferiors): New variables old_chain, inf and tp. Iterate INFERIOR_LIST and call target_has_execution. gdb/testsuite/ PR corefiles/12071. * gdb.base/corefile.exp (quit with a process, no question: load core) (quit with a core file): New tests.