2011-10-16 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/13278
* ar.c (open_inarch): Set the target from the the first object
on the list only if it isn't set.
Fix results with system glibc debug info installed.
* gdb.base/disp-step-syscall.exp (continue to $syscall (1st time))
(continue to $syscall (2nd time), continue to $syscall (3rd time)):
Accept also __libc_ symbol prefix and no prefix.
* gdb.cp/converts.cc (foo3_1): New function.
(foo3_2): New functions.
* gdb.cp/converts.exp: Add tests for int to pointer conversion
and null pointer conversions of integer constant zero.
Add test to check if all arguments are checked for incompatible
conversion BADNESS.
* eval.c (evaluate_subexp_standard): Do not construct
an array of types; pass the value array directly to
find_overload_match.
* gdbtypes.h (NULL_POINTER_CONVERSION_BADNESS): Declare.
(rank_function): Take an array of values instead of types.
(rank_one_type): Add struct value * parameter.
* gdbtypes.c (NULL_POINTER_CONVERSION_BADNESS): Define.
(rank_function): For each argument, pass the argument's
value to rank_one_type.
(rank_one_type): Add VALUE parameter.
If the parameter type is a pointer and the argument type
is an integer, return NULL_POINTER_CONVERSION_BADNESS if
VALUE is zero.
Update all calls to rank_one_type, passing NULL for new
VALUE parameter.
* valarith.c (value_user_defined_cpp_op): Do not construct
an array of types; pass the value array directly to
find_overload_match.
* valops.c (find_overload_method_list): Take an array of
values instead of types.
Save the type of OBJP for later use.
Update calls to find_oload_champ, and find_oload_champ_namespace.
(find_oload_champ_namespace): Take an array of values instead
of types.
(find_oload_champ_namespace_loop): Likewise.
(find_oload_champ): Likewise.
(classify_oload_match): Inspect all arguments
until INCOMPATIBLE is found. Return the worst badness found
otherwise.
(compare_parameters): Update call to rank_one_type.
* value.h (find_overload_match): Take an array of values instead
of types.
Drop lazy lm_info reading.
* solib-svr4.c (struct lm_info): Remove field lm. New fields l_addr_p,
l_addr_inferior, l_ld, l_next, l_prev and l_name.
(lm_info_read): New function.
(lm_addr_from_link_map, lm_dynamic_from_link_map): Remove.
(lm_addr_check): Use l_addr_p. No longer use lm_addr_from_link_map and
lm_dynamic_from_link_map.
(lm_next, lm_prev, lm_name): Remove.
(svr4_keep_data_in_core): Use lm_info_read, drop the lm_info entries
initialization incl. read_memory. No longer use lm_name.
(svr4_free_so): Drop lm_info->lm freeing.
(svr4_default_sos): Initialize lminfo with zeroes. Use l_addr_p. Drop
explicit lm_addr and lm initialization.
(svr4_read_so_list): Use lm_info_read, drop the initailization of
fields by hand, incl. read_memory. No longer use lm_next, lm_prev and
lm_name.
* defs.h (struct so_list): New forward declaration.
(make_cleanup_free_so): New declaration.
* solib-svr4.c (ignore_first_link_map_entry): Remove.
(svr4_free_so): Move the function here from downwards. Handle NULL
so->lm_info.
(svr4_free_library_list): New.
(svr4_read_so_list): New, moved here code from svr4_current_sos.
Use more cleanups. Use new parameter ignore_first instead of
ignore_first_link_map_entry.
(svr4_current_sos): New variable ignore_first, initialize it. New
variable back_to, use it for svr4_free_library_list protection.
(svr4_free_so): Remove - move upwards.
* utils.c: Include solist.h.
(do_free_so, make_cleanup_free_so): New functions.
<R_CRIS_32_GOTPLT>: Fix missing update of gotplt refcount for
global symbols.
<R_CRIS_8, R_CRIS_16, R_CRIS_32>: New cases for similar missing
updates of the plt refcount.
(elf_cris_adjust_gotplt_to_got): Assert integrity of the gotplt
refcount in relation to the plt refcount.
* readelf.c (GET_ELF_SYMBOLS): Add sym_count parameter.
(get_32bit_elf_symbols): Add num_syms_return argument.
Return the number of symbols loaded into the symbol table.
(get_64bit_elf_symbols): Likewise.
(process_section_headers): Use GET_ELF_SYMBOLS to initialise
symbol count.
(proces_relocs): Likewise.
(ia64_process_unwind): Likewise.
(hppa_process_unwind): Likewise.
(arm_process_unwind): Likewise.
(process_dynamic_section): Likewise.
(process_version_sections): Likewise.
(process_symbol_table): Likewise.
(process_section_groups): Likewise.
Add check before indexing into the symbol table.
(apply_relocations): Likewise.
Fix empty DWARF expressions DATA vs. SIZE conditionals.
* dwarf2loc.c (dwarf2_find_location_expression): Clear *LOCEXPR_LENGTH.
(dwarf_expr_frame_base_1): Indicate unavailability via zero *LENGTH.
(locexpr_tracepoint_var_ref): Check only zero SIZE, not zero DATA.
(loclist_read_variable, loclist_tracepoint_var_ref): Do not check for
zero DATA.
* dwarf2loc.h (struct dwarf2_locexpr_baton): Comment DATA vs. SIZE
validity.
* dwarf2read.c (struct dwarf_block): Comment DATA validity.
(dwarf2_fetch_die_location_block, dwarf2_symbol_mark_computed): Do not
clear DATA on zero SIZE.
gdb/testsuite/
Fix empty DWARF expressions DATA vs. SIZE conditionals.
* gdb.dwarf2/dw2-op-call.S (arraycallnoloc, arraynoloc): New DIEs.
(loclist): New.
(4): New abbrev.
* gdb.dwarf2/dw2-op-call.exp: Remove variable srcfile and executable.
Use prepare_for_testing, remove clean_restart.
(p arraynoloc, p arraycallnoloc): New tests.
Fix compatibility with texinfo versions older than 4.12.
* Makefile.in (MAKEINFO): Set to @MAKEINFO@.
(MAKEINFOFLAGS, MAKEINFO_EXTRA_FLAGS, MAKEINFO_CMD): New.
(MAKEHTMLFLAGS): Use MAKEINFO_CMD.
(FLAGS_TO_PASS): Add MAKEINFOFLAGS and MAKEINFO_EXTRA_FLAGS.
* configure: Regenerate.
* configure.ac (MAKEINFO): Find it, from libiberty/configure.ac.
(MAKEINFOFLAGS): Pre-set it to --split-size=5000000.
(MAKEINFO_EXTRA_FLAGS): New test for -DHAVE_MAKEINFO_CLICK.
gdb/doc/
Fix compatibility with texinfo versions older than 4.12.
* Makefile.in (MAKEINFO): Set to @MAKEINFO@.
(MAKEINFOFLAGS, MAKEINFO_EXTRA_FLAGS, MAKEINFO_CMD): New.
(MAKEHTMLFLAGS): Use MAKEINFO_CMD.
(gdb.info, gdbint.info, stabs.info, annotate.info): Use MAKEINFO_CMD.
* gdb.texinfo (Tail Call Frames): Convert @arrow{} to @click, when possible.
Make the conversion conditional on HAVE_MAKEINFO_CLICK, using variables
CALLSEQ1A, CALLSEQ1B, CALLSEQ2A and CALLSEQ2B.
* breakpoint.h (pc_at_non_inline_function): Declare.
* breakpoint.c (is_non_inline_function,
pc_at_non_inline_function): New functions.
* infrun.c (handle_inferior_event): Don't call skip_inline_frames
if the stop is at a location where functions cannot be inlined.
2011-10-12 Pedro Alves <pedro@codesourcery.com>
* linux-nat.c (stop_and_resume_callback): Don't re-resume LWPs if
the core wanted them stopped, or if they now have a pending event
to report.
(linux_nat_filter_event): New parameter `new_pending_p'. Pass it
down to stop_and_resume_callback.
(linux_nat_wait_1): Always clear `options' when retrying. Handle
having new pending events after calling linux_nat_filter_event.