aboutsummaryrefslogtreecommitdiff
path: root/gdb
AgeCommit message (Collapse)AuthorFilesLines
2010-10-17gdb/Jan Kratochvil11-15/+199
* infrun.c (follow_exec): Replace symbol_file_add_main by symbol_file_add with SYMFILE_DEFER_BP_RESET, set_initial_language and breakpoint_re_set. * m32r-rom.c (m32r_load, m32r_upload_command): Use parameter 0 for clear_symtab_users. * objfiles.c (free_all_objfiles): Likewise. * remote-m32r-sdi.c (m32r_load): Likewise. * solib-som.c (som_solib_create_inferior_hook): Likewise. * symfile.c (new_symfile_objfile): New comment for add_flags. Call clear_symtab_users with ADD_FLAGS. (reread_symbols): Use parameter 0 for clear_symtab_users. (clear_symtab_users): New parameter add_flags. Do not call breakpoint_re_set if SYMFILE_DEFER_BP_RESET. (clear_symtab_users_cleanup): Use parameter 0 for clear_symtab_users. * symtab.h (clear_symtab_users): New parameter add_flags. gdb/testsuite/ * gdb.base/pie-execl.exp: New file. * gdb.base/pie-execl.c: New file.
2010-10-17gdb/Jan Kratochvil2-1/+7
Fix GCC false warning. * varobj.c (value_get_print_value) <str_addr>: Initialize it.
2010-10-17*** empty log message ***gdbadmin1-1/+1
2010-10-16*** empty log message ***gdbadmin1-1/+1
2010-10-15 * p-typeprint.c (pascal_type_print_method_args): Fix problem inPierre Muller2-4/+10
display of type of method arguments.
2010-10-15 PR python/11948:Tom Tromey14-165/+135
* varobj.c (value_get_print_value): Use val_print_string to print lazy strings. * python/py-prettyprint.c (print_string_repr): Use val_print_string to print lazy strings. Fix cleanup logic. (print_children): Likewise. * python/python-internal.h (gdbpy_extract_lazy_string): Update. * python/py-lazy-string.c (gdbpy_extract_lazy_string): Rewrite. Change return type to 'void', add 'addr' argument. * value.h (val_print_string): Update. * valprint.c (val_print_string): Add 'encoding' argument. * printcmd.c (print_formatted): Update. * p-valprint.c (pascal_val_print): Update. * m2-valprint.c (print_unpacked_pointer): Update. (m2_print_array_contents): Likewise. * jv-valprint.c (java_value_print): Update. * f-valprint.c (f_val_print): Update. * c-valprint.c (c_val_print): Update. * auxv.c (fprint_target_auxv): Update.
2010-10-15gdb/Jan Kratochvil6-28/+159
PR exp/12117 * gdbtypes.c (check_typedef): Clean up function comment. Keep track of instance flags as we strip typedefs and create a new type to preserve them if necessary. * gdbtypes.h (type) <instance_flags>: Extend the comment. gdb/testsuite/ PR exp/12117 * gdb.cp/ptype-cv-cp.cc: New file. * gdb.cp/ptype-cv-cp.exp: New file.
2010-10-15 * p-lang.c (is_pascal_string_type): Use TYPE_FIELD_NAME accessor.Pierre Muller2-10/+14
2010-10-15*** empty log message ***gdbadmin1-1/+1
2010-10-14Fixed void* vs int* overload issue (PR C++/10343).Sami Wagiaalla9-28/+207
2010-10-14 Sami Wagiaalla <swagiaal@redhat.com> * gdbtypes.h: Create BASE_PTR_CONVERSION_BADNESS. * gdbtypes.c (rank_one_type): Move type comparison code out of here to... (types_equal): ...here. And changed it as follows: Outside of typedefs type must be of the same TYPE_CODE. When compairing two pointers or references they are equal if their targets are equal. Correct pointer conversions. 2010-10-14 Sami Wagiaalla <swagiaal@redhat.com> * gdb.cp/converts.cc: New test program. * gdb.cp/converts.exp: New test. * gdb.cp/overload.exp: Added test for void* vs int*. * gdb.cp/overload.exp: Ditto. * gdb.cp/oranking.exp: Removed related kfail.
2010-10-14 * p-lang.c (is_pascal_string_type): Avoid crashes on structuresPierre Muller2-1/+10
having fields without names.
2010-10-14*** empty log message ***gdbadmin1-1/+1
2010-10-13 New python module gdb.types.Doug Evans11-2/+392
* NEWS: Document it. * data-directory/Makefile.in (PYTHON_FILES): Add gdb/types.py. * python/lib/gdb/types.py: New file. testsuite/ * lib/gdb-python.exp (gdb_check_python_config): New function. * gdb.python/Makefile.in (EXECUTABLES): Add lib-types. * gdb.python/lib-types.cc: New file. * gdb.python/lib-types.exp: New file. doc/ * gdb.texinfo (Python): Add "Python modules". (Types in Python): Add reference to gdb.types section. (Python modules): New node.
2010-10-13 * language.h (LA_PRINT_ARRAY_INDEX): Fix argument name.Tom Tromey2-1/+5
2010-10-13 * c-typeprint.c: Whitespace cleanup.Doug Evans2-15/+13
(cp_type_print_method_args): Remove unnecessary forward decl. (cp_type_print_derivation_info): Ditto. (c_type_print_varspec_prefix): Mark as static at definition. (c_type_print_modifier): Fix arg descriptions.
2010-10-13gdb/Jan Kratochvil14-34/+241
* python/py-breakpoint.c (bppy_set_condition): New comment. * python/py-cmd.c (cmdpy_function): Call also gdbpy_print_stack for failed PyUnicode_Decode. (cmdpy_completer): Skip element for failed python_string_to_host_string. (cmdpy_init): Return -1 on failed python_string_to_host_string. * python/py-frame.c (frapy_read_var): Extend the function comment. * python/py-function.c (fnpy_init): Return -1 on failed python_string_to_host_string. * python/py-inferior.c (infpy_read_memory, infpy_write_memory): Extend the function comment. (infpy_search_memory): Extend the function comment. Remove the PyErr_SetString call on already set error state. * python/py-param.c (set_parameter_value): Extend the function comment. Return -1 on failed python_string_to_host_string, twice. (set_attr): Extend the function comment. (compute_enum_values): Extend the function comment. New variable back_to. Protect self->enumeration by BACK_TO cleanups. Return 0 on failed python_string_to_host_string. (get_doc_string): Call gdbpy_print_stack on failed python_string_to_host_string. (parmpy_init): Extend the function comment. * python/py-prettyprint.c (pretty_print_one_value): Likewise. (gdbpy_get_display_hint, print_children): Call gdbpy_print_stack on failed python_string_to_host_string. * python/py-value.c (valpy_new, valpy_getitem, valpy_call) (valpy_binop, valpy_richcompare): Extend the function comment. * python/python.c (struct python_env) <error_type, error_value, error_traceback>: New fields. (restore_python_env): Handle PyErr_Occurred. Call PyErr_Restore. (ensure_python_env): Call PyErr_Fetch. * varobj.c (update_dynamic_varobj_children): Call gdbpy_print_stack on failed convert_value_from_python. (value_get_print_value): Call gdbpy_print_stack on failed python_string_to_target_python_string. gdb/testsuite/ * gdb.python/py-error.exp: New file. * gdb.python/py-error.py: New file.
2010-10-13*** empty log message ***gdbadmin1-1/+1
2010-10-12 * python/py-prettyprint.c (search_pp_list): Fix error checking.Tom Tromey2-3/+18
2010-10-12Eliminate 'is_ancestor' redundant code.Sami Wagiaalla2-25/+29
2010-10-12 Sami Wagiaalla <swagiaal@redhat.com> * gdbtypes.c (do_is_ancestor): New function. (is_ancestor): Use do_is_ancestor. (is_public_ancestor): Use do_is_ancestor.
2010-10-12gdb/testsuite/Jan Kratochvil2-9/+12
* gdb.base/break-interp.exp (test_ld): Replace gdb_expect by gdb_test_multiple.
2010-10-12gdb/testsuite/Jan Kratochvil6-8/+17
* gdb.base/break-interp.exp: Use ldlags for linking flags. * gdb.base/prelink.exp: Likewise. * gdb.base/solib-nodir.exp: Likewise. * lib/gdb.exp (gdb_compile) <*-*-openbsd*> (gdb_compile) <shlib_load>: Use ldlags for linking flags. * lib/prelink-support.exp (build_executable_own_libs): Likewise.
2010-10-12 * break-interp.exp (test_ld): Use two separate gdb_expect statementsUlrich Weigand2-3/+17
for the "info files" test to avoid timeouts on slow machines.
2010-10-12 * ser-go32.c (struct dos_ops): Add missing fdopen field.Pierre Muller2-0/+5
2010-10-12 * gdb/arm-tdep.c (arm_mode_strings): Add NULL entry at end of array.Matthew Gretton-Dann2-1/+6
2010-10-12*** empty log message ***gdbadmin1-1/+1
2010-10-11gdb/testsuite/Jan Kratochvil2-0/+11
* gdb.cp/infcall-dlopen.cc (openlib): Support NULL FILENAME. (main): Make openlib dummy call.
2010-10-11 * c-typeprint.c (c_type_print_modifier): Add note that this printsDoug Evans2-1/+7
the address space id too.
2010-10-11 * gdb.texinfo (Values From Inferior): Add reference to "Types inDoug Evans2-1/+6
Python" from gdb.Value.type description.
2010-10-11gdb/Jan Kratochvil2-0/+64
Fix attaching to re-prelinked executables on ppc64. * solib-svr4.c (svr4_exec_displacement): New variable plt2_asect, initialize it, try to adjust FILESZ field by it.
2010-10-11gdb/testsuite/Jan Kratochvil2-34/+91
Fix missing _start PIE relocation on ppc64 due to stop on dl_main. * break-interp.exp (reach): Move the core body ... (reach_1): ... here. Use stop-on-solib-events for _dl_debug_state. (test_ld): Provide always real argument, even to the linker. Replace dl_main by _dl_debug_state.
2010-10-11gdb/testsuite/Jan Kratochvil2-7/+23
Fix results of prelinked PIEs on ppc*. * gdb.base/break-interp.exp (reach, test_core, test_attach_gdb): Accept also DISPLACEMENT "PRESENT". (main): Replace "ZERO" displacements by "PRESENT".
2010-10-11*** empty log message ***gdbadmin1-1/+1
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.