+2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * disasm.h (gdb_disassembly): Add GDBARCH parameter.
+ (gdb_print_insn): Likewise.
+ * disasm.c (dump_insns): Add GDBARCH parameter. Use it instead
+ of current_gdbarch.
+ (do_mixed_source_and_assembly): Add GDBARCH parameter. Pass to
+ dump_insns.
+ (do_assembly_only): Likewise.
+ (gdb_disassembly): Add GDBARCH parameter. Use it instead of
+ current_gdbarch. Pass to subroutines.
+ (gdb_print_insn): Add GDBARCH parameter. Use it instead of
+ current_gdbarch.
+
+ * stack.c (struct gdb_disassembly_stub_args): Add GDBARCH member.
+ (gdb_disassembly_stub): Pass architecture to gdb_disassembly.
+ (do_gdb_disassembly): Add GDBARCH argument. Store into args.
+ (print_frame_info): Pass architecture to do_gdb_disassembly.
+
+ * printcmd.c (print_formatted): Pass architecture to gdb_print_insn.
+
+ * mi/mi-cmd-disas.c: Include "arch-utils.h"
+ (mi_cmd_disassemble): Pass architecture to gdb_disassembly.
+
+ * cli/cli-cmds.c: Include "arch-utils.h".
+ (print_disassembly): Add GDBARCH parameter. Pass to gdb_disassembly
+ and tui_show_assembly.
+ (disassemble_current_function): Pass architecture to
+ tui_get_low_disassembly_address and print_disassembly.
+ (disassemble_command): Pass architecture to
+ tui_get_low_disassembly_address and print_disassembly.
+
+ * tui/tui.c (tui_show_assembly): Add GDBARCH parameter. Pass to
+ tui_update_source_windows_with_addr.
+
+ * tui/tui-data.h (struct tui_locator_element): Add GDBARCH member.
+ (struct tui_source_info): Likewise.
+ * tui/tui-data.c (tui_clear_win_detail): Clear source_info.gdbarch.
+
+ * tui/tui-disasm.c (tui_disassemble): Add GDBARCH parameter.
+ Pass to gdb_print_insn.
+ (tui_find_disassembly_address): Add GDBARCH parameter. Pass to
+ tui_disassemble.
+ (tui_set_disassem_content): Add GDBARCH parameter. Install into
+ source_info.gdbarch. Pass to tui_disassemble.
+ (tui_show_disassem): Add GDBARCH parameter. Pass to
+ tui_update_source_window.
+ (tui_show_disassem_and_update_source): Add GDBARCH parameter. Pass to
+ tui_show_disassem and tui_update_source_window.
+
+ (tui_get_begin_asm_address): Return locator architecture in addition
+ to locator PC value.
+
+ (tui_get_low_disassembly_address): Add GDBARCH parameter. Pass to
+ tui_get_low_disassembly_address.
+
+ (tui_vertical_disassem_scroll): Pass architecture to subroutines.
+
+ * tui/tui-disasm.h (tui_set_disassem_content): Add GDBARCH parameter.
+ (tui_show_disassem): Likewise.
+ (tui_show_disassem_and_update_source): Likewise.
+ (tui_get_begin_asm_address): Return architecture and PC value.
+
+ * tui/tui.h (tui_get_low_disassembly_address): Add GDBARCH parameter.
+ (tui_show_assembly): Add GDBARCH parameter.
+
+ * tui/tui-layout.c (extract_display_start_addr): Return current window
+ architecture in addition to current PC value.
+
+ (tui_set_layout): Update calls to tui_get_low_disassembly_address and
+ extract_display_start_addr. Pass architecture to
+ tui_update_source_windows_with_addr.
+
+ * tui/tui-source.c: Include "objfiles.h".
+ (tui_set_source_content): Initialize window architecture.
+ (tui_show_symtab_source): Add GDBARCH parameter. Pass to
+ tui_update_source_window_as_is
+
+ * tui/tui-source.h (tui_show_symtab_source): Add GDBARCH parameter.
+
+ * tui/tui-stack.c (tui_set_locator_info): Add GDBARCH parameter.
+ Install locator architecture.
+ (tui_set_locator_filename): Update call.
+ (tui_show_frame_info): Pass architecture to tui_set_locator_info
+ and subroutines.
+
+ * tui/tui-win.c (make_visible_with_new_height): Pass architecture
+ to tui_update_source_window.
+
+ * tui/tui-winsource.c: Include "objfiles.h".
+ (tui_display_main): Update call to tui_get_begin_asm_address.
+ Pass architecture to tui_update_source_windows_with_addr.
+ (tui_update_source_window): Add GDBARCH parameter. Pass to
+ tui_update_source_window_as_is.
+ (tui_update_source_window_as_is): Add GDBARCH parameter.
+ Pass to tui_set_disassem_content.
+ (tui_update_source_windows_with_addr): Add GDBARCH parameter.
+ Pass to subroutines.
+ (tui_update_source_windows_with_line): Pass objfile architecture
+ to subroutines.
+ (tui_horizontal_source_scroll): Pass architecture to
+ tui_update_source_window_as_is.
+
+ * tui/tui-winsource.h (tui_update_source_window): Add GDBARCH
+ parameter.
+ (tui_update_source_window_as_is): Likewise.
+ (tui_update_source_windows_with_addr): Likewise.
+
+2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * breakpoint.h (struct breakpoint): New member GDBARCH.
+ * breakpoint.c: Include "arch-utils.h".
+ (set_raw_breakpoint_without_location): Add GDBARCH parameter.
+ Use it to set breakpoint architecture.
+ (set_raw_breakpoint): Add GDBARCH parameter.
+ (create_internal_breakpoint): Likewise.
+ (create_catchpoint): Likewise.
+ (create_fork_vfork_event_catchpoint): Likewise.
+ (create_breakpoint): Likewise.
+ (create_breakpoints): Likewise.
+ (break_command_really): Likewise.
+ (create_ada_exception_breakpoint): Likewise.
+ Update local callers to pass architecture:
+ (create_internal_breakpoint): Update.
+ (create_overlay_event_breakpoint): Update.
+ (create_longjmp_master_breakpoint): Update.
+ (create_thread_event_breakpoint): Update.
+ (create_solib_event_breakpoint): Update.
+ (create_catchpoint): Update.
+ (create_fork_vfork_event_catchpoint): Update.
+ (set_momentary_breakpoint): Update.
+ (clone_momentary_breakpoint): Update.
+ (create_breakpoint): Update.
+ (create_breakpoints): Update.
+ (break_command_really): Update.
+ (break_command_1): Update.
+ (set_breakpoint): Update.
+ (watch_command_1): Update.
+ (catch_fork_command_1): Update.
+ (catch_exec_commnd_1): Update.
+ (handle_gnu_v3_exceptions): Update.
+ (create_ada_exception_breakpoint): Update.
+ (catch_ada_exception_command): Update.
+ (catch_assert_command): Update.
+ (trace_command): Update.
+
+ * breakpoint.h (struct bp_location): New member GDBARCH.
+ * breakpoint.c (get_sal_arch): New function.
+ (set_raw_breakpoint): Set location architecture.
+ (add_location_to_breakpoint): Likewise.
+ (clone_momentary_breakpoint): Likewise.
+ (watch_command_1): Likewise.
+ (update_watchpoint): Likewise.
+ (bp_loc_is_permanent): Use location architecture instead of
+ current_gdbarch.
+ (adjust_breakpoint_address): Add GDBARCH parameter; use it
+ instead of current_gdbarch.
+ Update callers of adjust_breakpoint_address to pass
+ breakpoint location architecture:
+ (set_raw_breakpoint): Update.
+ (watch_command_1): Update.
+
+ * tracepoint.c: (collect_symbol): Add GDBARCH parameter, use instead
+ of current_gdbarch.
+ (add_local_symbols): Add GDBARCH parameter. Pass to collect_symbol.
+ (encode_actions): Pass tracepoint architecture to add_local_symbols
+ (encode_actions): Use tracepoint architecture instead of
+ current_gdbarch. Pass it to add_local_symbols and collect_symbol.
+
+ * breakpoint.h (struct breakpoint_ops): Replace last_addr parameter
+ of print_one callback with last_loc.
+ * breakpoint.c (print_one_breakpoint_location): Replace last_addr
+ parameter with last_loc.
+ (print_one_breakpoint): Likewise.
+ (do_captured_breakpoint_query): Update call.
+ (breakpoint_1): Pass last_loc instead of last_addr to
+ print_one_breakpoint. Pass last location architecture instead of
+ current_gdbarch to set_next_address.
+ Update all implementations of the print_one callback:
+ * breakpoint.c (print_one_catch_fork): Update.
+ (print_one_catch_vfork): Update.
+ (print_one_catch_exec): Update.
+ (print_one_exception_catchpoint): Update.
+ * ada-lang.c (print_one_exception): Update.
+ (print_one_catch_exception): Update.
+ (print_one_catch_exception_unhandled): Update.
+ (print_one_catch_assert): Update.
+
+ * breakpoint.c (print_one_breakpoint_location): Add PRINT_ADDRESS_BITS
+ parameter. Use it instead of gdbarch_addr_bit (current_gdbarch).
+ (print_one_breakpoint): Add PRINT_ADDRESS_BITS parameter and pass it
+ to print_one_breakpoint_location.
+ (breakpoint_address_bits): New function.
+ (do_captured_breakpoint_query): Compute number of address bits to print
+ and pass it to print_one_breakpoint.
+ (breakpoint_1): Likewise. Use it instead of current_gdbarch.
+
+ * breakpoint.h (create_thread_event_breakpoint): Add GDBARCH.
+ * breakpoint.c (create_thread_event_breakpoint): Likewise.
+ Update callers to create_thread_event_breakpoint:
+ * aix-thread.c (pd_enable): Update.
+ * linux-thread-db.c (enable_thread_event): Update.
+
+ * breakpoint.h (create_solib_event_breakpoint): Add GDBARCH.
+ * breakpoint.c (create_solib_event_breakpoint): Likewise.
+ Update callers to create_solib_event_breakpoint:
+ * solib-frv.c (enable_break, enable_break2): Update.
+ * solib-pa64.c (pa64_solib_create_inferior_hook): Update.
+ * solib-som.c (som_solib_create_inferior_hook): Update.
+ * solib-darwin.c (darwin_solib_create_inferior_hook): Update.
+ * solib-svr4.c (enable_break): Update.
+
+ * breakpoint.h (insert_single_step_breakpoint): Add GDBARCH.
+ * breakpoint.c (insert_single_step_breakpoint): Likewise.
+ Update callers to insert_single_step_breakpoint:
+ * alpha-tdep.c (alpha_software_single_step): Update.
+ * arm-linux-tdep.c (arm_linux_software_single_step): Update.
+ * arm-tdep.c (arm_software_single_step): Update.
+ * cris-tdep.c (cris_software_single_step): Update.
+ * rs6000-aix-tdep.c (rs6000_software_single_step): Update.
+ * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Update.
+ * sparc-tdep.c (sparc_software_single_step): Update.
+ * spu-tdep.c (spu_software_single_step): Update.
+ * mips-tdep.c (deal_with_atomic_sequence): Add GDBARCH parameter.
+ Pass it to insert_single_step_breakpoint.
+ (mips_software_single_step): Pass architecture to
+ deal_with_atomic_sequence and insert_single_step_breakpoint.
+
+ * breakpoint.h (deprecated_insert_raw_breakpoint): Add GDBARCH.
+ (deprecated_remove_raw_breakpoint): Likewise.
+ * breakpoint.c (deprecated_insert_raw_breakpoint): Add GDBARCH.
+ (deprecated_remove_raw_breakpoint): Likewise.
+ Update callers to deprecated_insert_raw_breakpoint and
+ deprecated_remove_raw_breakpoint:
+ * breakpoint.c (single_step_gdbarch): New static variable.
+ (insert_single_step_breakpoint): Pass GDBARCH parameter to
+ deprecated_insert_raw_breakpoint. Store it in single_step_gdbarch.
+ (remove_single_step_breakpoints): Pass architecture stored in
+ single_step_gdbarch to deprecated_remove_raw_breakpoint.
+ * rs6000-nat.c (exec_one_dummy_insn): Update.
+ * solib-irix.c (enable_break, disable_break): Update.
+ * procfs.c (procfs_mourn_inferior): Update.
+ (remove_dbx_link_breakpoint): Update.
+
+ * breakpoint.h (set_breakpoint): Add GDBARCH parameter.
+ (set_momentary_breakpoint, set_momentary_breakpoint_at_pc): Likewise.
+ * breakpoint.c (set_breakpoint): Add GDBARCH parameter.
+ (set_momentary_breakpoint, set_momentary_breakpoint_at_pc): Likewise.
+ Update callers to set_breakpoint, set_momentary_breakpoint and
+ set_momentary_breakpoint_at_pc:
+ * breakpoint.c (set_momentary_breakpoint_at_pc): Update.
+ (until_break_command): Update.
+ * infcall.c (call_function_by_hand): Update.
+ * infcmd.c (finish_backward, finish_forward): Update.
+ * infrun.c (insert_step_resume_breakpoint_at_sal): Add GDBARCH
+ parameter. Pass it to set_momentary_breakpoint.
+ (insert_longjmp_resume_breakpoint): Add GDBARCH parameter.
+ Pass it to set_momentary_breakpoint_at_pc.
+ (handle_inferior_event): Update.
+ (insert_step_resume_breakpoint_at_frame): Update.
+ (insert_step_resume_breakpoint_at_caller): Update..
+ * mi/mi-cmd-break.c: Include "arch-utils.h".
+ (mi_cmd_break_insert): Update.
+
+ * target.h (struct target_ops): Add GDBARCH parameter to
+ to_insert_breakpoint, to_remove_breakpoint, to_insert_hw_breakpoint,
+ and to_remove_hw_breakpoint members.
+ (target_insert_breakpoint, target_remove_breakpoint,
+ target_insert_hw_breakpoint, target_remove_hw_breakpoint): Add GDBARCH
+ parameter, pass to target routine.
+ (memory_remove_breakpoint, memory_insert_breakpoint): Add GDBARCH
+ parameter.
+ * target.c (debug_to_insert_breakpoint, debug_to_remove_breakpoint,
+ debug_to_insert_hw_breakpoint, debug_to_remove_hw_breakpoint): Add
+ GDBARCH parameter, pass to target routine.
+ (update_current_target): Update function signature.
+ * breakpoint.c (insert_bp_location, remove_breakpoint,
+ deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint):
+ Pass architecture to target_ routines.
+ Update all implementations of the target breakpoint routines to take
+ GDBARCH parameter and use it instead of GDBARCH as appropriate:
+ * corelow.c (ignore): Update.
+ * exec.c (ignore): Update.
+ * mem-break.c (memory_insert_breakpoint): Update.
+ (memory_remove_breakpoint): Update.
+ * monitor.c (monitor_insert_breakpoint): Update.
+ (monitor_remove_breakpoint): Update.
+ * record.c (record_insert_breakpoint): Update.
+ (record_beneath_to_insert_breakpoint): Update.
+ (record_remove_breakpoint): Update.
+ (record_beneath_to_remove_breakpoint): Update.
+ * remote.c (remote_insert_breakpoint): Update.
+ (remote_remove_breakpoint): Update.
+ (remote_insert_hw_breakpoint): Update.
+ (remote_remove_hw_breakpoint): Update.
+ * remote-m32r-sdi.c (m32r_insert_breakpoint): Update.
+ (m32r_remove_breakpoint): Update.
+ * remote-mips.c (mips_insert_breakpoint): Update.
+ (mips_remove_breakpoint): Update.
+ * i386-nat.c (i386_insert_hw_breakpoint): Update.
+ (i386_remove_hw_breakpoint): Update.
+ * nto-procfs.c (procfs_insert_breakpoint): Update.
+ (procfs_remove_breakpoint): Update.
+ (procfs_insert_hw_breakpoint): Update.
+ (procfs_remove_hw_breakpoint): Update.
+
+2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * frame.h (frame_unwind_arch): New.
+ (frame_unwind_caller_arch): Likewise.
+ * frame-unwind.h (frame_prev_arch_ftype): New type.
+ (struct frame_unwind): New member prev_arch.
+ * frame.c (struct frame_info): New member prev_arch.
+ (frame_unwind_arch): New function.
+ (frame_unwind_caller_arch): Likewise..
+ (get_frame_arch): Reimplement in terms of frame_unwind_arch.
+ * sentinel-frame.c (sentinel_frame_prev_arch): New function.
+ (sentinel_frame_unwinder): Install it.
+
+ * frame.c (frame_pc_unwind): Use frame_unwind_arch instead
+ of get_frame_arch.
+ (frame_unwind_register_value): Likewise.
+ (frame_unwind_register_signed): Likewise.
+ (frame_unwind_register_unsigned): Likewise.
+ * frame-unwind.c (frame_unwind_got_optimized): Likewise.
+ (frame_unwind_got_register): Likewise.
+ (frame_unwind_got_constant): Likewise.
+ (frame_unwind_got_bytes): Likewise.
+ (frame_unwind_got_address): Likewise.
+
+ * frame.h (enum frame_type): New value ARCH_FRAME.
+ * frame.c (fprint_frame_type): Handle ARCH_FRAME.
+ * stack.c (print_frame_info): Likewise.
+
2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
* target.h (struct target_ops): New member to_thread_architecture.