* target.h (struct target_ops): Make to_has_all_memory,
[platform/upstream/binutils.git] / gdb / ChangeLog
index 69003a5..1e57b96 100644 (file)
@@ -1,3 +1,366 @@
+2009-06-07  Pedro Alves  <pedro@codesourcery.com>
+
+       * target.h (struct target_ops): Make to_has_all_memory,
+       to_has_memory, to_has_stack, to_has_registers and to_has_execution
+       methods instead of variables.
+       (target_has_all_memory_1, target_has_memory_1, target_has_stack_1)
+       (target_has_registers_1, target_has_execution_1): Declare
+       functions.
+       (target_has_all_memory): Rewrite to call target_has_all_memory_1.
+       (target_has_memory): Rewrite to call target_has_memory_1.
+       (target_has_stack): Rewrite to call target_has_all_stack_1.
+       (target_has_registers): Rewrite to call target_has_registers_1.
+       (target_has_execution): Rewrite to call target_has_execution_1.
+       (default_child_has_all_memory, default_child_has_memory)
+       (default_child_has_stack, default_child_has_registers)
+       (default_child_has_execution): Declare.
+       (target_mark_running, target_mark_exited): Delete declarations.
+       * target.c (default_child_has_all_memory,
+       default_child_has_memory, default_child_has_stack,
+       default_child_has_registers, default_child_has_execution): New.
+       (target_has_all_memory_1, target_has_memory_1, target_has_stack_1,
+       target_has_registers_1, target_has_execution_1): New.
+       (add_target): Default the to_has_all_memory, to_has_all_memory,
+       to_has_memory, to_has_stack, to_has_registers and to_has_execution
+       callbacks to return 0.
+       (update_current_target): Do not inherit to_has_all_memory,
+       to_has_memory, to_has_stack, to_has_registers or to_has_execution.
+       (target_mark_running, target_mark_exited): Delete.
+       (memory_xfer_partial): Adjust.
+       (target_read_memory, target_write_memory, target_search_memory):
+       Dispatch to the the top-most target, not the flattened
+       current_target.
+       (target_info): Adjust.
+       (init_dummy_target): Install return_zero as callback for
+       to_has_all_memory, to_has_memory, to_has_stack, to_has_registers,
+       to_has_execution.
+       (set_maintenance_target_async_permitted): Use have_live_inferiors
+       instead of target_has_execution.
+       * target-memory.c (target_write_memory_blocks): Dispatch memory
+       writes to the the top-most target, not the flattened
+       current_target.
+
+       * breakpoint.c (insert_breakpoints): Don't check for
+       target_has_execution here.
+       (update_global_location_list): Check if there are live inferiors
+       to debug instead of target_has_execution.
+       * infcmd.c (kill_command, detach_command): Check if there are
+       inferiors instead of target_has_execution.
+       * inferior.h (have_live_inferiors): Declare.
+       * inferior.c (have_live_inferiors): New.
+       * infrun.c (normal_stop): Don't check for target_has_execution to
+       finish the thread states.
+       * thread.c (is_thread_state, is_stopped, is_exited, is_running)
+       (any_running, is_executing): Remove checks for
+       target_has_execution.
+       * top.c (kill_or_detach): Don't try to kill core inferiors.
+       (quit_target): Don't check for target_has_execution.
+
+       * corelow.c (core_has_memory, core_has_stack, core_has_registers):
+       New.
+       (init_core_ops): Install core_has_memory, core_has_stack and
+       core_has_registers.
+       * exec.c (exec_has_memory): New.
+       (init_exec_ops): Install exec_has_memory.
+       * remote.c (remote_add_inferior): Don't call target_mark_running.
+       (remote_start_remote): Don't call target_mark_exited or call
+       target_mark_running.
+       (remote_open_1): Use have_inferiors instead of
+       target_has_execution.  Don't use target_mark_exited.
+       (init_remote_ops): Install deafult_child_has_all_memory,
+       default_child_has_memory, default_child_has_stack,
+       default_child_has_registers, default_child_has_execution.
+       * bsd-kvm.c (bsd_kvm_return_one): New.
+       (bsd_kvm_add_target): Register bsd_kvm_return_one as
+       to_has_memory, to_has_stack and to_has_registers callbacks.
+       * remote-m32r-sdi.c (m32r_return_one): New.
+       (init_m32r_ops): Register it.
+       * inf-child.c (inf_child_target): Adjust to register
+       default_child_has_all_memory, default_child_has_memory,
+       default_child_has_stack, default_child_has_registers,
+       default_child_has_execution callbacks.
+       * gnu-nat.c (init_gnu_ops): Likewise.
+       * go32-nat.c (init_go32_ops): Likewise.
+       * hpux-thread.c (init_hpux_thread_ops): Likewise.
+       * monitor.c (init_base_monitor_ops): Likewise.
+       * nto-procfs.c (init_procfs_ops): Likewise.
+       * remote-mips.c (_initialize_remote_mips): Likewise.
+       * windows-nat.c (init_windows_ops): Likewise.
+       * remote-sim.c (gdbsim_create_inferior): Don't use
+       target_mark_running or target_mark_exited.
+       (gdbsim_mourn_inferior): Don't call target_mark_exited.
+       (init_gdbsim_ops): Adjust to register
+       default_child_has_all_memory, default_child_has_memory,
+       default_child_has_stack, default_child_has_registers,
+       default_child_has_execution callbacks.
+
+       * linux-nat.c (linux_nat_xfer_partial): If reading memory, and
+       there's no inferior selected, defer to a lower stratum.
+
+2009-06-05  Tom Tromey  <tromey@redhat.com>
+
+       * varobj.c (update_dynamic_varobj_children): Wrap error text in
+       _().
+       (install_visualizer): Likewise.
+       (varobj_set_visualizer): Likewise.
+
+2009-06-05  Marc Khouzam  <marc.khouzam@ericsson.com>
+
+       * mi/mi-main.c (mi_cmd_exec_continue)
+       (mi_cmd_exec_interrupt): Adjust parsing of thread group
+       ids to current reality, where they don't have any 'p' prefix.
+
+2009-06-05  Aleksandar Ristovski  <aristovski@qnx.com>
+
+       * corelow.c (core_open): Check for core_gdbarch before calling
+       gdbarch_target_signal_from_host.
+
+2009-06-05  Tom Tromey  <tromey@redhat.com>
+
+       * c-exp.y (parse_number): Don't use K&R definition.
+       (yylex): Likewise.
+       (yyerror): Likewise.
+
+2009-06-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * varobj.c (varobj_update): Fix out of scope varobjs to not to change.
+
+2009-06-04  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * symtab.h: Rename SYMBOL_OPS to SYMBOL_COMPUTED_OPS.
+       * ax-gdb.c (gen_var_ref): Likewise.
+       * findvar.c (read_var_value, symbol_read_needs_frame): Likewise.
+       * printcmd.c (address_info): Likewise.
+       * dwarf2loc.c (dwarf_expr_frame_base): Likewise.
+       * dwarf2read.c (dwarf2_symbol_mark_computed): Likewise.
+       * symtab.h: Rename struct symbol_ops to struct symbol_computed_ops.
+       * dwarf2loc.h: Likewise.
+       * dwarf2loc.c (dwarf2_locexpr_funcs, dwarf2_loclist_funcs): Likewise.
+
+       * symtab.h: (struct symbol_register_ops): New struct definition.
+       (struct symbol): Make "ops" member a union of symbol_computed_ops and
+       symbol_register_ops callback pointers.
+       (SYMBOL_REGISTER_OPS): New macro.
+       * tracepoint.c: Include "objfiles.h".
+       (scope_info, collect_symbol): Use SYMBOL_REGISTER_OPS register_number
+       callback to retrieve register numbers.
+       * ax-gdb.c (gen_var_ref): Likewise.
+       * findvar.c (read_var_value): Likewise.
+       * printcmd.c (address_info): Likewise.
+
+       * coffread.c (coff_reg_to_regnum): New function.
+       (coff_register_funcs): New static variable.
+       (process_coff_symbol): Do not call gdbarch_sdb_reg_to_regnum.
+       Install SYMBOL_REGISTER_OPS callbacks.
+       * mdebugread.c (mdebug_reg_to_regnum): New function.
+       (mdebug_register_funcs): New static variable.
+       (parse_symbol): Do not call gdbarch_ecoff_reg_to_regnum.
+       Install SYMBOL_REGISTER_OPS callbacks.
+       * stabsread.c (stab_reg_to_regnum): New function.
+       (stab_register_funcs): New static variable.
+       (define_symbol): Do not call gdbarch_stab_reg_to_regnum.
+       Install SYMBOL_REGISTER_OPS callbacks.
+
+2009-06-03  Doug Evans  <dje@google.com>
+
+       * symfile.c (reread_symbols): Reset psymtabs_addrmap to NULL
+       after discarding its contents.
+
+2009-06-03  Pedro Alves  <pedro@codesourcery.com>
+
+       * target.c: Include "exec.h".
+       (update_current_target): Don't inherit to_sections or
+       to_sections_end.
+       (target_get_section_table): New.
+       (target_section_by_addr): Fetch the section table from the passed
+       in target.
+       (memory_xfer_partial): Handle unmapped overlay sections before
+       anything else.  Get the overlay mapped address here.  Adjust to
+       use section_table_xfer_memory_partial.
+       (get_target_memory): Request a TARGET_OBJECT_RAW_MEMORY object
+       instead of TARGET_OBJECT_MEMORY.
+       (target_resize_to_sections): Delete.
+       (remove_target_sections): Adjust to remove target sections from
+       `current_target_sections', and use resize_section_table.
+       * target.h (struct target_ops) <to_sections, to_sections_end>:
+       Remove fields.
+       <to_get_section_table>: New method.
+       (xfer_memory, print_section_info): Delete declarations.
+       (struct target_section_table): New type.
+       (target_get_section_table): Declare.
+       (target_resize_to_sections): Delete declaration.
+       (remove_target_sections): Delete declaration.
+       * bfd-target.c (target_bfd_xfer_partial): Get the section table
+       from to_data.
+       (target_bfd_get_section_table): New.
+       (target_bfd_xclose): Adjust.
+       (target_bfd_reopen): Store the section table in the to_data field.
+       * corelow.c (core_data): New.
+       (core_close): Adjust to release core_data and its sections.
+       (core_open): Allocate core_data, and build its target sections
+       table.
+       (deprecated_core_resize_section_table): New.
+       (core_files_info): Pass core_data to print_section_info.
+       (core_xfer_partial): Adjust to use
+       section_table_xfer_memory_partial for TARGET_OBJECT_MEMORY xfers.
+       (init_core_ops): Do not install a deprecated_xfer_memory callback
+       anymore.
+       * solib.c (update_solib_list): Add the shared library sections
+       to the current target sections table.
+       * exec.c (current_target_sections_1): New global.
+       (current_target_sections): New global.
+       (exec_close_1): New function, refactored from exec_close.  Remove
+       the exec_bfd's sections from the current target sections table.
+       Adjust to not use to_sections.
+       (exec_close): Remove all target sections.  Call exec_close_1.
+       (exec_file_clear): Use exec_close_1 instead of unpushing the
+       target.
+       (exec_file_attach): Likewise.  Adjust to not use to_sections.  Add
+       exec_bfd's sections to the current target sections table.  Don't
+       push the exec_ops target here.
+       (resize_section_table): New.
+       (add_target_sections): New.
+       (remove_target_sections): Moved here.
+       (section_table_xfer_memory): Adjust to implement the xfer_partial
+       interface, and rename to...
+       (section_table_xfer_memory_partial): ... this, replacing the
+       current function of that same name.
+       (exec_get_section_table): New.
+       (exec_xfer_partial): New.
+       (xfer_memory): Delete.
+       (print_section_info): Replace the target_ops parameter by a
+       target_section_table parameter.
+       (exec_files_info, set_section_command, exec_set_section_address):
+       Adjust to use the current sections table.
+       (init_exec_ops): Do not register a deprecated_xfer_memory
+       callback.  Register to_xfer_partial and to_get_section_table
+       callbacks.
+       * infrun.c (handle_inferior_event): Update comments around
+       solib_add.
+       * rs6000-nat.c (xcoff_relocate_core): Adjust to use
+       deprecated_core_resize_section_table.
+       * exec.h (resize_section_table): Declare.
+       (section_table_xfer_memory_partial): Add const char * argument.
+       (remove_target_sections): Declare here.
+       (add_target_sections): Declare.
+       (print_section_info): Declare here.
+       * gdbcore.h (deprecated_core_resize_section_table): Declare.
+
+2009-06-03  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * value.h (struct internalvar): Remove.
+       (get_internalvar_integer): Add prototype.
+       (set_internalvar_integer): Add prototype.
+       (clear_internalvar): Add prototype.
+
+       * value.c (struct internalvar): Move here.  Add type member.  Remove
+       endian member.  Add union_internalvar member instead of value member.
+       (init_if_undefined_command): Use intvar->type.
+       (create_internalvar): Do not initialize value/endian, but type.
+       (create_internalvar_type_lazy): Call create_internalvar.
+       (value_of_internalvar): Handle host-side internalvar contents.
+       (set_internalvar_component): Likewise.
+       (set_internalvar): Likewise.
+       (get_internalvar_integer): New function.
+       (clear_internalvar): Likewise.
+       (set_internalvar_integer): Likewise.
+       (preserve_values): Handle host-side internalvar contents.
+
+       * breakpoint.c (set_breakpoint_count, set_tracepoint_count): Call
+       set_internalvar_integer instead of set_internalvar.
+       * findcmd.c (find_command): Likewise.
+       * infrun.c (handle_inferior_event): Likewise.
+       * source.c (forward_search_command, reverse_search_command): Likewise.
+       * tracepoint.c (set_traceframe_num, set_tracepoint_num,
+       set_traceframe_context): Likewise.
+
+       * printcmd.c (x_command): Call clear_internalvar instead of
+       set_internalvar.
+       * tracepoint.c (set_traceframe_context): Likewise.
+       
+       * breakpoint.c (get_number_trailer): Call get_internalvar_integer
+       instead of value_of_internalvar.
+       * linespec.c (decode_dollar): Likewise.
+
+       * expprint.c (dump_subexp_body_standard): Use internalvar_name
+       instead of accessing internalvar private elements.
+       * valops.c (value_assign): Copy from original source instead of
+       accessing internalvar private elements.
+
+2009-06-03  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * scm-lang.c (builtin_type_scm): Remove.
+       (scm_lookup_name): Add GDBARCH parameter.  Use it instead of
+       objfile architecture.  Use per-architecture builtin_scm_type instead
+       of builtin_type_scm.
+       (evaluate_exp): Pass expression architecture to scm_lookup_name.
+
+       (scm_get_field): Add SIZE parameter.  Use it instead of 
+       TYPE_LENGTH (builtin_type_scm).
+
+       (build_scm_types): New function.
+       (scm_type_data): New variable.
+       (builtin_scm_type): New function.
+       (_initialize_scheme_language): Do not initialize builtin_type_scm.
+       Register build_scm_types as post-init function for scm_type_data.
+
+       * scm-exp.c (scm_lreadr): Use per-architecture builtin_scm_type
+       instead of builtin_type_scm.
+
+       * scm-lang.h (SCM_CAR, SCM_CDR): Pass SCM_SIZE to scm_get_field.
+       (scm_get_field): Add SIZE paramter.
+       (scm_scmval_print): Remove prototype.
+       (builtin_type_scm): Remove.
+       (struct builtin_scm_type): Add structure definition.
+       (builtin_scm_type): Add prototype.
+
+       * scm-valprint.c (scm_inferior_print): Add TYPE parameter.  Use it
+       instead of builtin_core_addr type; do not use objfile architecture.
+       (scm_scmlist_print): Add TYPE parameter.  Use it to define SCM_SIZE.
+       Pass type to scm_scmval_print.
+       (scm_ipruk): Add TYPE parameter.  Use it to define SCM_SIZE.
+       (scm_scmval_print): Make static.  Add TYPE parameter.  Use it to
+       define SCM_SIZE.  Pass type to scm_ipruk and scm_scmlist_print.
+       (scm_val_print): Pass type to scm_inferior_print and scm_scmval_print.
+
+2009-06-03  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * mdebugread.c (mdebug_type_void, mdebug_type_char, mdebug_type_short,
+       mdebug_type_int, mdebug_type_int_32, mdebug_type_int_64,
+       mdebug_type_long_32, mdebug_type_long_64, mdebug_type_long_long_64,
+       mdebug_type_unsigned_char, mdebug_type_unsigned_short,
+       mdebug_type_unsigned_int_32, mdebug_type_unsigned_int_64,
+       mdebug_type_unsigned_long_32, mdebug_type_unsigned_long_64,
+       mdebug_type_unsigned_long_long_64, mdebug_type_adr_32,
+       mdebug_type_adr_64, mdebug_type_float, mdebug_type_double,
+       mdebug_type_complex, mdebug_type_double_complex,
+       mdebug_type_fixed_dec, mdebug_type_float_dec, mdebug_type_string):
+       Remove.
+
+       (basic_type_data): New global variable.
+       (basic_type): New function.
+       (parse_type): Remove static basic type map map_bt.  Call basic_type
+       to get basic types instead of using mdebug_type_ variables.
+
+       (parse_symbol): Use builtin types instead of mdebug_type_ variables.
+       (upgrade_type): Likewise.
+       (parse_procedure): Likewise.
+       (psymtab_to_symtab_1): Likewise.
+
+       (_initialize_mdebugread): Do not initialize mdebug_type_ variables.
+       Initialize basic_type_data.
+
+2009-06-03  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * dfp.h (decimal_binop): Convert LEN_RESULT to input parameter.
+       * dfp.c (promote_decimal): Remove.
+       (decimal_binop): Convert LEN_RESULT to input parameter.
+       Remove call to decimal_binop.
+       (decimal_compare): Remove call to decimal_binop.
+
+       * valarith.c (value_binop): Pass desired result type length
+       to decimal_binop.
+
 2009-06-01  Tristan Gingold  <gingold@adacore.com>
 
        * configure.tgt (avr): Set gdb_sim to use the simulator.