Commit Graph

158 Commits

Author SHA1 Message Date
Tom Tromey 76727919ce Convert observers to C++
This converts observers from using a special source-generating script
to be plain C++.  This version of the patch takes advantage of C++11
by using std::function and variadic templates; incorporates Pedro's
patches; and renames the header file to "observable.h" (this change
eliminates the need for a clean rebuild).

Note that Pedro's patches used a template lambda in tui-hooks.c, but
this failed to compile on some buildbot instances (presumably due to
differing C++ versions); I replaced this with an ordinary template
function.

Regression tested on the buildbot.

gdb/ChangeLog
2018-03-19  Pedro Alves  <palves@redhat.com>
	    Tom Tromey  <tom@tromey.com>

	* unittests/observable-selftests.c: New file.
	* common/observable.h: New file.
	* observable.h: New file.
	* ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
	arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
	breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
	corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
	extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
	infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
	linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
	mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
	ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
	python/py-breakpoint.c, python/py-finishbreakpoint.c,
	python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
	record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
	riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
	spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
	symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
	tui/tui-interp.c, valops.c: Update all users.
	* tui/tui-hooks.c (tui_bp_created_observer)
	(tui_bp_deleted_observer, tui_bp_modified_observer)
	(tui_inferior_exit_observer, tui_before_prompt_observer)
	(tui_normal_stop_observer, tui_register_changed_observer):
	Remove.
	(tui_observers_token): New global.
	(attach_or_detach, tui_attach_detach_observers): New functions.
	(tui_install_hooks, tui_remove_hooks): Use
	tui_attach_detach_observers.
	* record-btrace.c (record_btrace_thread_observer): Remove.
	(record_btrace_thread_observer_token): New global.
	* observer.sh: Remove.
	* observer.c: Rename to observable.c.
	* observable.c (namespace gdb_observers): Define new objects.
	(observer_debug): Move into gdb_observers namespace.
	(struct observer, struct observer_list, xalloc_observer_list_node)
	(xfree_observer_list_node, generic_observer_attach)
	(generic_observer_detach, generic_observer_notify): Remove.
	(_initialize_observer): Update.
	Don't include observer.inc.
	* Makefile.in (generated_files): Remove observer.h, observer.inc.
	(clean mostlyclean): Likewise.
	(observer.h, observer.inc): Remove targets.
	(SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
	(COMMON_SFILES): Use observable.c, not observer.c.
	* .gitignore: Remove observer.h.

gdb/doc/ChangeLog
2018-03-19  Tom Tromey  <tom@tromey.com>

	* observer.texi: Remove.

gdb/testsuite/ChangeLog
2018-03-19  Tom Tromey  <tom@tromey.com>

	* gdb.gdb/observer.exp: Remove.
2018-03-19 09:37:49 -06:00
Joel Brobecker e2882c8578 Update copyright year range in all GDB files
gdb/ChangeLog:

        Update copyright year range in all GDB files
2018-01-02 07:38:06 +04:00
Yao Qi ac7936dfd0 s/get_regcache_arch (regcache)/regcache->arch ()/g
This patches removes get_regcache_arch, and use regache->arch () instead.
The motivation of this change is that I am going to move some basic stuff
into a base class of regcache.  I don't need to update "client" code
regcache->arch ().  On the other hand, this patch shortens the code a
little bit.

gdb:

2017-10-25  Yao Qi  <yao.qi@linaro.org>

	* aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
	regcache->arch () instead get_regcache_arch.
	* aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
	Likewise.
	(aarch64_fbsd_store_inferior_registers): Likewise.
	* aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
	(store_gregs_to_thread): Likewise.
	(fetch_fpregs_from_thread): Likewise.
	(store_fpregs_to_thread): Likewise.
	* aarch64-tdep.c (aarch64_extract_return_value): Likewise.
	(aarch64_store_return_value): Likewise.
	(aarch64_software_single_step): Likewise.
	* aix-thread.c (aix_thread_wait): Likewise.
	(supply_reg32): Likewise.
	(supply_sprs64): Likewise.
	(supply_sprs32): Likewise.
	(fill_gprs64): Likewise.
	(fill_gprs32): Likewise.
	(fill_sprs64): Likewise.
	(fill_sprs32): Likewise.
	(store_regs_user_thread): Likewise.
	(store_regs_kernel_thread): Likewise.
	* alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
	(alphabsd_store_inferior_registers): Likewise.
	* alpha-tdep.c (alpha_extract_return_value): Likewise.
	(alpha_store_return_value): Likewise.
	(alpha_deal_with_atomic_sequence): Likewise.
	(alpha_next_pc): Likewise.
	(alpha_software_single_step): Likewise.
	* amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
	(amd64bsd_store_inferior_registers): Likewise.
	* amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
	Likewise.
	(amd64_linux_store_inferior_registers): Likewise.
	* amd64-nat.c (amd64_supply_native_gregset): Likewise.
	(amd64_collect_native_gregset): Likewise.
	* amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
	(amd64obsd_collect_uthread): Likewise.
	* amd64-tdep.c (amd64_supply_fpregset): Likewise.
	(amd64_collect_fpregset): Likewise.
	(amd64_supply_fxsave): Likewise.
	(amd64_supply_xsave): Likewise.
	(amd64_collect_fxsave): Likewise.
	(amd64_collect_xsave): Likewise.
	* arc-tdep.c (arc_write_pc): Likewise.
	* arch-utils.c (default_skip_permanent_breakpoint): Likewise.
	* arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
	(arm_fbsd_store_inferior_registers): Likewise.
	* arm-linux-nat.c (fetch_vfp_regs): Likewise.
	(store_vfp_regs): Likewise.
	(arm_linux_fetch_inferior_registers): Likewise.
	(arm_linux_store_inferior_registers): Likewise.
	* arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
	(arm_linux_sigreturn_next_pc): Likewise.
	(arm_linux_get_next_pcs_syscall_next_pc): Likewise.
	* arm-nbsd-nat.c (arm_supply_gregset): Likewise.
	(fetch_register): Likewise.
	(store_register): Likewise.
	* arm-tdep.c (arm_is_thumb): Likewise.
	(displaced_in_arm_mode): Likewise.
	(bx_write_pc): Likewise.
	(arm_get_next_pcs_addr_bits_remove): Likewise.
	(arm_software_single_step): Likewise.
	(arm_extract_return_value): Likewise.
	(arm_store_return_value): Likewise.
	(arm_write_pc): Likewise.
	* bfin-tdep.c (bfin_extract_return_value): Likewise.
	* bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
	(bsd_uthread_store_registers): Likewise.
	* core-regset.c (fetch_core_registers): Likewise.
	* corelow.c (get_core_registers): Likewise.
	* cris-tdep.c (cris_store_return_value): Likewise.
	(cris_extract_return_value): Likewise.
	(find_step_target): Likewise.
	(find_step_target): Likewise.
	(cris_software_single_step): Likewise.
	* ctf.c (ctf_fetch_registers): Likewise.
	* darwin-nat.c (cancel_breakpoint): Likewise.
	* fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
	* frv-tdep.c (frv_extract_return_value): Likewise.
	* ft32-tdep.c (ft32_store_return_value): Likewise.
	(ft32_extract_return_value): Likewise.
	* go32-nat.c (fetch_register): Likewise.
	(go32_fetch_registers): Likewise.
	(go32_store_registers): Likewise.
	(store_register): Likewise.
	* h8300-tdep.c (h8300_extract_return_value): Likewise.
	(h8300_store_return_value): Likewise.
	* hppa-linux-nat.c (fetch_register): Likewise.
	(store_register): Likewise.
	(hppa_linux_fetch_inferior_registers): Likewise.
	(hppa_linux_store_inferior_registers): Likewise.
	* i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
	(i386_darwin_store_inferior_registers): Likewise.
	* i386-gnu-nat.c (gnu_fetch_registers): Likewise.
	(gnu_store_registers): Likewise.
	* i386-linux-nat.c (fetch_register): Likewise.
	(store_register): Likewise.
	(supply_gregset): Likewise.
	(fill_gregset): Likewise.
	(i386_linux_fetch_inferior_registers): Likewise.
	(i386_linux_store_inferior_registers): Likewise.
	(i386_linux_resume): Likewise.
	* i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
	Likewise.
	* i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
	* i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
	* i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
	(i386obsd_collect_uthread): Likewise.
	* i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
	(i386_supply_gregset): Likewise.
	(i386_collect_gregset): Likewise.
	(i386_supply_fpregset): Likewise.
	(i386_collect_fpregset): Likewise.
	(i386_mpx_bd_base): Likewise.
	* i386-v4-nat.c	(supply_fpregset): Likewise.
	(fill_fpregset): Likewise.
	* i387-tdep.c (i387_supply_fsave): Likewise.
	(i387_collect_fsave): Likewise.
	(i387_supply_fxsave): Likewise.
	(i387_collect_fxsave): Likewise.
	(i387_supply_xsave): Likewise.
	(i387_collect_xsave): Likewise.
	* ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
	(ia64_linux_store_registers): Likewise.
	* ia64-tdep.c (ia64_access_rse_reg): Likewise.
	(ia64_extract_return_value): Likewise.
	(ia64_store_return_value): Likewise.
	(find_func_descr): Likewise.
	* inf-child.c (inf_child_fetch_inferior_registers): Likewise.
	* inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
	(inf_ptrace_store_registers): Likewise.
	* infrun.c (use_displaced_stepping): Likewise.
	(displaced_step_prepare_throw): Likewise.
	(resume): Likewise.
	(proceed): Likewise.
	(do_target_wait): Likewise.
	(adjust_pc_after_break): Likewise.
	(handle_inferior_event_1): Likewise.
	(handle_signal_stop): Likewise.
	(save_infcall_suspend_state): Likewise.
	(restore_infcall_suspend_state): Likewise.
	* iq2000-tdep.c (iq2000_extract_return_value): Likewise.
	* jit.c (jit_frame_prev_register): Likewise.
	* linux-nat.c (save_stop_reason): Likewise.
	(linux_nat_wait_1): Likewise.
	(resume_stopped_resumed_lwps): Likewise.
	* linux-record.c (record_linux_sockaddr): Likewise.
	(record_linux_msghdr): Likewise.
	(record_linux_system_call): Likewise.
	* linux-tdep.c (linux_collect_thread_registers): Likewise.
	* lm32-tdep.c (lm32_extract_return_value): Likewise.
	(lm32_store_return_value): Likewise.
	* m32c-tdep.c (m32c_read_flg): Likewise.
	(m32c_pseudo_register_read): Likewise.
	(m32c_pseudo_register_write): Likewise.
	* m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
	(m32r_linux_collect_gregset): Likewise.
	* m32r-tdep.c (m32r_store_return_value): Likewise.
	(m32r_extract_return_value): Likewise.
	* m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
	(m68kbsd_collect_fpregset): Likewise.
	* m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
	* m68k-linux-nat.c (fetch_register): Likewise.
	(old_fetch_inferior_registers): Likewise.
	(old_store_inferior_registers): Likewise.
	(store_regs): Likewise.
	* m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
	(m68k_svr4_store_return_value): Likewise.
	* m88k-tdep.c (m88k_store_arguments): Likewise.
	* mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
	(mi_cmd_data_write_register_values): Likewise.
	* mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
	(mips_fbsd_store_inferior_registers): Likewise.
	* mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
	(mips_fbsd_supply_gregs): Likewise.
	(mips_fbsd_collect_fpregs): Likewise.
	(mips_fbsd_collect_gregs): Likewise.
	(mips_fbsd_supply_fpregset): Likewise.
	(mips_fbsd_collect_fpregset): Likewise.
	(mips_fbsd_supply_gregset): Likewise.
	(mips_fbsd_collect_gregset): Likewise.
	* mips-linux-nat.c (supply_gregset): Likewise.
	(fill_gregset): Likewise.
	(supply_fpregset): Likewise.
	(fill_fpregset): Likewise.
	* mips-linux-tdep.c (mips_supply_gregset): Likewise.
	(mips_fill_gregset): Likewise.
	(mips_supply_fpregset): Likewise.
	(mips_fill_fpregset): Likewise.
	(mips64_supply_gregset): Likewise.
	(micromips_linux_sigframe_validate): Likewise.
	* mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
	(mipsnbsd_fetch_inferior_registers): Likewise.
	(mipsnbsd_store_inferior_registers): Likewise.
	* mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
	(mipsnbsd_supply_gregset): Likewise.
	(mipsnbsd_iterate_over_regset_sections): Likewise.
	(mipsnbsd_supply_reg): Likewise.
	(mipsnbsd_supply_fpreg): Likewise.
	* mips-tdep.c (mips_in_frame_stub): Likewise.
	(mips_dummy_id): Likewise.
	(is_octeon_bbit_op): Likewise.
	(micromips_bc1_pc): Likewise.
	(extended_mips16_next_pc): Likewise.
	(mips16_next_pc): Likewise.
	(deal_with_atomic_sequence): Likewise.
	* moxie-tdep.c (moxie_process_readu): Likewise.
	* nios2-tdep.c (nios2_get_next_pc): Likewise.
	* nto-procfs.c (procfs_store_registers): Likewise.
	* ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
	(ppcfbsd_store_inferior_registers): Likewise.
	* ppc-linux-nat.c (fetch_vsx_register): Likewise.
	(fetch_altivec_register): Likewise.
	(get_spe_registers): Likewise.
	(fetch_spe_register): Likewise.
	(fetch_altivec_registers): Likewise.
	(fetch_all_gp_regs): Likewise.
	(fetch_all_fp_regs): Likewise.
	(store_vsx_register): Likewise.
	(store_altivec_register): Likewise.
	(set_spe_registers): Likewise.
	(store_spe_register): Likewise.
	(store_altivec_registers): Likewise.
	(store_all_gp_regs): Likewise.
	(store_all_fp_regs): Likewise.
	* ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
	(ppc_linux_collect_gregset): Likewise.
	(ppc_canonicalize_syscall): Likewise.
	(ppc_linux_record_signal): Likewise.
	(ppu2spu_prev_register): Likewise.
	* ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
	* ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
	(ppcobsd_store_registers): Likewise.
	* ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
	Likewise.
	(ppc_ravenscar_generic_store_registers): Likewise.
	* procfs.c (procfs_fetch_registers): Likewise.
	(procfs_store_registers): Likewise.
	* ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
	(ravenscar_store_registers): Likewise.
	(ravenscar_prepare_to_store): Likewise.
	* record-btrace.c (record_btrace_fetch_registers): Likewise.
	* record-full.c (record_full_wait_1): Likewise.
	(record_full_registers_change): Likewise.
	(record_full_store_registers): Likewise.
	(record_full_core_fetch_registers): Likewise.
	(record_full_save): Likewise.
	(record_full_goto_insn): Likewise.
	* regcache.c (regcache_register_size): Likewise.
	(get_regcache_arch): Remove.
	(regcache_read_pc): Likewise.
	* regcache.h (get_regcache_arch): Remove.
	* remote-sim.c (gdbsim_fetch_register): Likewise.
	(gdbsim_store_register): Likewise.
	* remote.c (fetch_register_using_p): Likewise.
	(send_g_packet): Likewise.
	(remote_prepare_to_store): Likewise.
	(store_registers_using_G): Likewise.
	* reverse.c (save_bookmark_command): Likewise.
	(goto_bookmark_command): Likewise.
	* rs6000-aix-tdep.c (branch_dest): Likewise.
	* rs6000-nat.c (rs6000_ptrace64): Likewise.
	(fetch_register): Likewise.
	* rs6000-tdep.c (ppc_supply_reg): Likewise.
	(ppc_collect_reg): Likewise.
	(ppc_collect_gregset): Likewise.
	(ppc_collect_fpregset): Likewise.
	(ppc_collect_vsxregset): Likewise.
	(ppc_collect_vrregset): Likewise.
	(ppc_displaced_step_hw_singlestep): Likewise.
	(rs6000_pseudo_register_read): Likewise.
	(rs6000_pseudo_register_write): Likewise.
	* s390-linux-nat.c (supply_gregset): Likewise.
	(fill_gregset): Likewise.
	(s390_linux_fetch_inferior_registers): Likewise.
	* s390-linux-tdep.c (s390_write_pc): Likewise.
	(s390_software_single_step): Likewise.
	(s390_all_but_pc_registers_record): Likewise.
	(s390_linux_syscall_record): Likewise.
	* sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
	* sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
	(shnbsd_store_inferior_registers): Likewise.
	* sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
	(sh_extract_return_value_fpu): Likewise.
	(sh_store_return_value_nofpu): Likewise.
	(sh_corefile_supply_regset): Likewise.
	(sh_corefile_collect_regset): Likewise.
	* sh64-tdep.c (sh64_extract_return_value): Likewise.
	(sh64_store_return_value): Likewise.
	* sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
	* sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
	(sparc_store_inferior_registers): Likewise.
	* sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
	(sparc_ravenscar_prepare_to_store): Likewise.
	* sparc-tdep.c (sparc32_store_arguments): Likewise.
	(sparc_analyze_control_transfer): Likewise.
	(sparc_step_trap): Likewise.
	(sparc_software_single_step): Likewise.
	(sparc32_gdbarch_init): Likewise.
	(sparc_supply_rwindow): Likewise.
	(sparc_collect_rwindow): Likewise.
	* sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
	* sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
	(sparc64nbsd_collect_gregset): Likewise.
	(sparc64nbsd_supply_fpregset): Likewise.
	(sparc64nbsd_collect_fpregset): Likewise.
	* sparc64-tdep.c (sparc64_store_arguments): Likewise.
	(sparc64_supply_gregset): Likewise.
	(sparc64_collect_gregset): Likewise.
	(sparc64_supply_fpregset): Likewise.
	(sparc64_collect_fpregset): Likewise.
	* spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
	* spu-tdep.c (spu_unwind_sp): Likewise.
	(spu2ppu_prev_register): Likewise.
	(spu_memory_remove_breakpoint): Likewise.
	* stack.c (return_command): Likewise.
	* tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
	* tracefile-tfile.c (tfile_fetch_registers): Likewise.
	* tracefile.c (trace_save_ctf): Likewise.
	* windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
	(do_windows_store_inferior_registers): Likewise.
	(windows_resume): Likewise.
	* xtensa-linux-nat.c (fill_gregset): Likewise.
	(supply_gregset_reg): Likewise.
	* xtensa-tdep.c (xtensa_register_write_masked): Likewise.
	(xtensa_register_read_masked): Likewise.
	(xtensa_supply_gregset): Likewise.
	(xtensa_extract_return_value): Likewise.
	(xtensa_store_return_value): Likewise.
2017-10-25 16:37:03 +01:00
Tom Tromey a90ecff85a Remove cleanup from ppc-linux-nat.c
This removes a cleanup from ppc-linux-nat.c, by using
unique_xmalloc_ptr.  It also slightly simplifies the code by using
XDUP rather than XNEW and memcpy.

ChangeLog
2017-10-16  Tom Tromey  <tom@tromey.com>

	* ppc-linux-nat.c (hwdebug_insert_point): Use
	gdb::unique_xmalloc_ptr, XDUP.
2017-10-16 16:10:20 -06:00
John Baldwin 481695ed5f Remove unnecessary function prototypes.
These prototypes were required when compiling GDB as C but are not
required for C++.

gdb/ChangeLog:

	* aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
	prototype.
	* aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
	prototype.
	* aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
	prototype.
	* aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
	* ada-exp.y: Remove _initialize_ada_exp prototype.
	* ada-lang.c: Remove _initialize_ada_language prototype.
	* ada-tasks.c: Remove _initialize_tasks prototype.
	* addrmap.c: Remove _initialize_addrmap prototype.
	* agent.c: Remove _initialize_agent prototype.
	* aix-thread.c: Remove _initialize_aix_thread prototype.
	* alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
	* alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
	* alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
	prototype.
	* alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
	* alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
	* alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
	* amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
	prototype.
	* amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
	prototype.
	* amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
	* amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
	* amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
	* amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
	prototype.
	* amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
	* amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
	* amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
	* amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
	* amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
	* amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
	* amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
	prototype.
	* amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
	prototype.
	* annotate.c: Remove _initialize_annotate prototype.
	* arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
	* arc-tdep.c: Remove _initialize_arc_tdep prototype.
	* arch-utils.c: Remove _initialize_gdbarch_utils prototype.
	* arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
	* arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
	* arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
	* arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
	* arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
	prototype.
	* arm-tdep.c: Remove _initialize_arm_tdep prototype.
	* arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
	* auto-load.c: Remove _initialize_auto_load prototype.
	* auxv.c: Remove _initialize_auxv prototype.
	* avr-tdep.c: Remove _initialize_avr_tdep prototype.
	* ax-gdb.c: Remove _initialize_ax_gdb prototype.
	* bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
	* bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
	* break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
	* break-catch-syscall.c: Remove _initialize_break_catch_syscall
	prototype.
	* break-catch-throw.c: Remove _initialize_break_catch_throw
	prototype.
	* breakpoint.c: Remove _initialize_breakpoint prototype.
	* bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
	* btrace.c: Remove _initialize_btrace prototype.
	* charset.c: Remove _initialize_charset prototype.
	* cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
	* cli/cli-dump.c: Remove _initialize_cli_dump prototype.
	* cli/cli-interp.c: Remove _initialize_cli_interp prototype.
	* cli/cli-logging.c: Remove _initialize_cli_logging prototype.
	* cli/cli-script.c: Remove _initialize_cli_script prototype.
	* coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
	* coffread.c: Remove _initialize_coffread prototype.
	* compile/compile.c: Remove _initialize_compile prototype.
	* complaints.c: Remove _initialize_complaints prototype.
	* completer.c: Remove _initialize_completer prototype.
	* copying.awk: Remove _initialize_copying prototype.
	* copying.c: Regenerate.
	* core-regset.c: Remove _initialize_core_regset prototype.
	* corefile.c: Remove _initialize_core prototype.
	* corelow.c: Remove _initialize_corelow prototype.
	* cp-abi.c: Remove _initialize_cp_abi prototype.
	* cp-namespace.c: Remove _initialize_cp_namespace prototype.
	* cp-support.c: Remove _initialize_cp_support prototype.
	* cp-valprint.c: Remove _initialize_cp_valprint prototype.
	* cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
	* cris-tdep.c: Remove _initialize_cris_tdep prototype.
	* ctf.c: Remove _initialize_ctf prototype.
	* d-lang.c: Remove _initialize_d_language prototype.
	* darwin-nat-info.c: Remove _initialize_darwin_info_commands
	prototype.
	* darwin-nat.c: Remove _initialize_darwin_inferior prototype.
	* dbxread.c: Remove _initialize_dbxread prototype.
	* dcache.c: Remove _initialize_dcache prototype.
	* demangle.c: Remove _initialize_demangler prototype.
	* disasm-selftests.c: Remove _initialize_disasm_selftests
	prototype.
	* disasm.c: Remove _initialize_disasm prototype.
	* dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
	* dummy-frame.c: Remove _initialize_dummy_frame prototype.
	* dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
	prototype.
	* dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
	* dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
	* dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
	* dwarf2read.c: Remove _initialize_dwarf2_read prototype.
	* elfread.c: Remove _initialize_elfread prototype.
	* exec.c: Remove _initialize_exec prototype.
	* extension.c: Remove _initialize_extension prototype.
	* f-lang.c: Remove _initialize_f_language prototype.
	* f-valprint.c: Remove _initialize_f_valprint prototype.
	* fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
	* fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
	* filesystem.c: Remove _initialize_filesystem prototype.
	* findcmd.c: Remove _initialize_mem_search prototype.
	* fork-child.c: Remove _initialize_fork_child prototype.
	* frame-base.c: Remove _initialize_frame_base prototype.
	* frame-unwind.c: Remove _initialize_frame_unwind prototype.
	* frame.c: Remove _initialize_frame prototype.
	* frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
	* frv-tdep.c: Remove _initialize_frv_tdep prototype.
	* ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
	* gcore.c: Remove _initialize_gcore prototype.
	* gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
	* gdbarch.c: Regenerate.
	* gdbarch.sh: Remove _initialize_gdbarch prototype.
	* gdbtypes.c: Remove _initialize_gdbtypes prototype.
	* gnu-nat.c: Remove _initialize_gnu_nat prototype.
	* gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
	* gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
	* go-lang.c: Remove _initialize_go_language prototype.
	* go32-nat.c: Remove _initialize_go32_nat prototype.
	* guile/guile.c: Remove _initialize_guile prototype.
	* h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
	* hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
	* hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
	* hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
	* hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
	* hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
	* hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
	* hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
	* i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
	* i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
	prototype.
	* i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
	prototype.
	* i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
	* i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
	* i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
	* i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
	* i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
	* i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
	* i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
	* i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
	* i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
	* i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
	* i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
	* i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
	* i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
	* i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
	* i386-tdep.c: Remove _initialize_i386_tdep prototype.
	* i386-windows-nat.c: Remove _initialize_i386_windows_nat
	prototype.
	* ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
	prototype.
	* ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
	* ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
	* ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
	* ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
	* infcall.c: Remove _initialize_infcall prototype.
	* infcmd.c: Remove _initialize_infcmd prototype.
	* inferior.c: Remove _initialize_inferiors prototype.
	* inflow.c: Remove _initialize_inflow prototype.
	* infrun.c: Remove _initialize_infrun prototype.
	* interps.c: Remove _initialize_interpreter prototype.
	* iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
	* jit.c: Remove _initialize_jit prototype.
	* language.c: Remove _initialize_language prototype.
	* linux-fork.c: Remove _initialize_linux_fork prototype.
	* linux-nat.c: Remove _initialize_linux_nat prototype.
	* linux-tdep.c: Remove _initialize_linux_tdep prototype.
	* linux-thread-db.c: Remove _initialize_thread_db prototype.
	* lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
	* m2-lang.c: Remove _initialize_m2_language prototype.
	* m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
	* m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
	* m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
	* m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
	* m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
	* m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
	* m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
	* m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
	* m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
	* m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
	* m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
	* m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
	* machoread.c: Remove _initialize_machoread prototype.
	* macrocmd.c: Remove _initialize_macrocmd prototype.
	* macroscope.c: Remove _initialize_macroscope prototype.
	* maint.c: Remove _initialize_maint_cmds prototype.
	* mdebugread.c: Remove _initialize_mdebugread prototype.
	* memattr.c: Remove _initialize_mem prototype.
	* mep-tdep.c: Remove _initialize_mep_tdep prototype.
	* mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
	* mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
	* mi/mi-interp.c: Remove _initialize_mi_interp prototype.
	* mi/mi-main.c: Remove _initialize_mi_main prototype.
	* microblaze-linux-tdep.c: Remove
	_initialize_microblaze_linux_tdep prototype.
	* microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
	* mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
	* mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
	* mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
	* mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
	* mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
	* mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
	* mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
	* mips-tdep.c: Remove _initialize_mips_tdep prototype.
	* mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
	* mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
	prototype.
	* mipsread.c: Remove _initialize_mipsread prototype.
	* mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
	prototype.
	* mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
	* moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
	* msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
	* mt-tdep.c: Remove _initialize_mt_tdep prototype.
	* nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
	* nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
	prototype.
	* nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
	* nto-procfs.c: Remove _initialize_procfs prototype.
	* nto-tdep.c: Remove _initialize_nto_tdep prototype.
	* objc-lang.c: Remove _initialize_objc_language prototype.
	* objfiles.c: Remove _initialize_objfiles prototype.
	* observer.c: Remove observer_test_first_notification_function,
	observer_test_second_notification_function,
	observer_test_third_notification_function, and
	_initialize_observer prototypes.
	* opencl-lang.c: Remove _initialize_opencl_language prototypes.
	* osabi.c: Remove _initialize_gdb_osabi prototype.
	* osdata.c: Remove _initialize_osdata prototype.
	* p-valprint.c: Remove _initialize_pascal_valprint prototype.
	* parse.c: Remove _initialize_parse prototype.
	* ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
	* ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
	* ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
	* ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
	* ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
	* ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
	* ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
	* ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
	* printcmd.c: Remove _initialize_printcmd prototype.
	* probe.c: Remove _initialize_probe prototype.
	* proc-api.c: Remove _initialize_proc_api prototype.
	* proc-events.c: Remove _initialize_proc_events prototype.
	* proc-service.c: Remove _initialize_proc_service prototype.
	* procfs.c: Remove _initialize_procfs prototype.
	* psymtab.c: Remove _initialize_psymtab prototype.
	* python/python.c: Remove _initialize_python prototype.
	* ravenscar-thread.c: Remove _initialize_ravenscar prototype.
	* record-btrace.c: Remove _initialize_record_btrace prototype.
	* record-full.c: Remove _initialize_record_full prototype.
	* record.c: Remove _initialize_record prototype.
	* regcache.c: Remove _initialize_regcache prototype.
	* reggroups.c: Remove _initialize_reggroup prototype.
	* remote-notif.c: Remove _initialize_notif prototype.
	* remote-sim.c: Remove _initialize_remote_sim prototype.
	* remote.c: Remove _initialize_remote prototype.
	* reverse.c: Remove _initialize_reverse prototype.
	* rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
	* rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
	* rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
	prototype.
	* rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
	* rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
	* rust-exp.y: Remove _initialize_rust_exp prototype.
	* rx-tdep.c: Remove _initialize_rx_tdep prototype.
	* s390-linux-nat.c: Remove _initialize_s390_nat prototype.
	* s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
	* score-tdep.c: Remove _initialize_score_tdep prototype.
	* selftest-arch.c: Remove _initialize_selftests_foreach_arch
	prototype.
	* ser-go32.c: Remove _initialize_ser_dos prototype.
	* ser-mingw.c: Remove _initialize_ser_windows prototype.
	* ser-pipe.c: Remove _initialize_ser_pipe prototype.
	* ser-tcp.c: Remove _initialize_ser_tcp prototype.
	* ser-unix.c: Remove _initialize_ser_hardwire prototype.
	* serial.c: Remove _initialize_serial prototype.
	* sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
	* sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
	* sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
	* sh-tdep.c: Remove _initialize_sh_tdep prototype.
	* skip.c: Remove _initialize_step_skip prototype.
	* sol-thread.c: Remove _initialize_sol_thread prototype.
	* solib-aix.c: Remove _initialize_solib_aix prototype.
	* solib-darwin.c: Remove _initialize_darwin_solib prototype.
	* solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
	* solib-frv.c: Remove _initialize_frv_solib prototype.
	* solib-spu.c: Remove _initialize_spu_solib prototype.
	* solib-svr4.c: Remove _initialize_svr4_solib prototype.
	* solib-target.c: Remove _initialize_solib_target prototype.
	* solib.c: Remove _initialize_solib prototype.
	* source.c: Remove _initialize_source prototype.
	* sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
	* sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
	prototype.
	* sparc-nat.c: Remove _initialize_sparc_nat prototype.
	* sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
	* sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
	* sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
	prototype.
	* sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
	* sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
	* sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
	* sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
	prototype.
	* sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
	prototype.
	* sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
	prototype.
	* sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
	prototype.
	* sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
	* sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
	prototype.
	* sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
	prototype.
	* sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
	prototype.
	* sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
	prototype.
	* sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
	prototype.
	* spu-linux-nat.c: Remove _initialize_spu_nat prototype.
	* spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
	* spu-tdep.c: Remove _initialize_spu_tdep prototype.
	* stabsread.c: Remove _initialize_stabsread prototype.
	* stack.c: Remove _initialize_stack prototype.
	* stap-probe.c: Remove _initialize_stap_probe prototype.
	* std-regs.c: Remove _initialize_frame_reg prototype.
	* symfile-debug.c: Remove _initialize_symfile_debug prototype.
	* symfile-mem.c: Remove _initialize_symfile_mem prototype.
	* symfile.c: Remove _initialize_symfile prototype.
	* symmisc.c: Remove _initialize_symmisc prototype.
	* symtab.c: Remove _initialize_symtab prototype.
	* target-dcache.c: Remove _initialize_target_dcache prototype.
	* target-descriptions.c: Remove _initialize_target_descriptions
	prototype.
	* thread.c: Remove _initialize_thread prototype.
	* tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
	prototype.
	* tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
	* tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
	* tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
	prototype.
	* tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
	* tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
	* tracefile.c: Remove _initialize_tracefile prototype.
	* tracepoint.c: Remove _initialize_tracepoint prototype.
	* tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
	* tui/tui-interp.c: Remove _initialize_tui_interp prototype.
	* tui/tui-layout.c: Remove _initialize_tui_layout prototype.
	* tui/tui-regs.c: Remove _initialize_tui_regs prototype.
	* tui/tui-stack.c: Remove _initialize_tui_stack prototype.
	* tui/tui-win.c: Remove _initialize_tui_win prototype.
	* tui/tui.c: Remove _initialize_tui prototype.
	* typeprint.c: Remove _initialize_typeprint prototype.
	* user-regs.c: Remove _initialize_user_regs prototype.
	* utils.c: Remove _initialize_utils prototype.
	* v850-tdep.c: Remove _initialize_v850_tdep prototype.
	* valarith.c: Remove _initialize_valarith prototype.
	* valops.c: Remove _initialize_valops prototype.
	* valprint.c: Remove _initialize_valprint prototype.
	* value.c: Remove _initialize_values prototype.
	* varobj.c: Remove _initialize_varobj prototype.
	* vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
	* vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
	* vax-tdep.c: Remove _initialize_vax_tdep prototype.
	* windows-nat.c: Remove _initialize_windows_nat,
	_initialize_check_for_gdb_ini, and _initialize_loadable
	prototypes.
	* windows-tdep.c: Remove _initialize_windows_tdep prototype.
	* xcoffread.c: Remove _initialize_xcoffread prototype.
	* xml-support.c: Remove _initialize_xml_support prototype.
	* xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
	* xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
	prototype.
	* xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
	prototype.
	* xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2017-09-09 11:02:37 -07:00
Alan Hayward 0f068fb5e5 Add PPC_MAX_REGISTER_SIZE
gdb/
	* ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
	(store_register): Likewise.
	* ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
	(get_decimal_float_return_value): Likewise.
	(do_ppc_sysv_return_value): Likewise.
	(ppc64_sysv_abi_push_integer): Likewise.
	(ppc64_sysv_abi_push_freg): Likewise.
	(ppc64_sysv_abi_return_value_base): Likewise.
	(ppc64_sysv_abi_return_value): Likewise.
	* rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
	* rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
	* rs6000-nat.c: Likewise.
	* rs6000-tdep.c (rs6000_register_to_value): Likewise.
	(rs6000_value_to_register): Likewise.
	* ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
2017-05-22 09:23:22 +01:00
Simon Marchi bcc0c096d5 Use ptid from regcache in almost all remaining nat files
This patch contains almost all of the remaining changes needed to make
to_fetch_registers/to_store_registers/to_prepare_to_store independent of
inferior_ptid.  It contains only some "trivial" changes, the more
complicated ones are in separate patches.

gdb/ChangeLog:

	* i386-linux-nat.c (fetch_register, store_register,
	i386_linux_fetch_inferior_registers,
	i386_linux_store_inferior_registers): Use ptid from regcache.
	* ia64-linux-nat.c (ia64_linux_fetch_register,
	ia64_linux_store_register): Likewise.
	* inf-ptrace.c (inf_ptrace_fetch_register,
	inf_ptrace_store_register): Likewise.
	* m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
	m32r_linux_store_inferior_registers): Likewise.
	* m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
	m68kbsd_store_inferior_registers): Likewise.
	* m68k-linux-nat.c (fetch_register, store_register,
	m68k_linux_fetch_inferior_registers,
	m68k_linux_store_inferior_registers): Likewise.
	* m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
	m88kbsd_store_inferior_registers): Likewise.
	* mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
	mips_fbsd_store_inferior_registers): Likewise.
	* mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
	mips64_linux_regsets_store_registers): Likewise.
	* mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
	mipsnbsd_store_inferior_registers): Likewise.
	* mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
	mips64obsd_store_inferior_registers): Likewise.
	* nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
	Likewise.
	* ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
	ppcfbsd_store_inferior_registers): Likewise.
	* ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
	ppc_linux_store_inferior_registers): Likewise.
	* ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
	ppcnbsd_store_inferior_registers): Likewise.
	* ppc-obsd-nat.c (ppcobsd_fetch_registers,
	ppcobsd_store_registers): Likewise.
	* procfs.c (procfs_fetch_registers, procfs_store_registers):
	Likewise.
	* ravenscar-thread.c (ravenscar_fetch_registers,
	ravenscar_store_registers, ravenscar_prepare_to_store):
	Likewise.
	* record-btrace.c (record_btrace_fetch_registers,
	record_btrace_store_registers, record_btrace_prepare_to_store):
	Likewise.
	* remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
	Lookup inferior using ptid from regcache, instead of
	current_inferior.
	* remote.c (remote_fetch_registers, remote_store_registers): Use
	ptid from regcache.
	* rs6000-nat.c (fetch_register, store_register): Likewise.
	* s390-linux-nat.c (s390_linux_fetch_inferior_registers,
	s390_linux_store_inferior_registers): Likewise.
	* sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
	shnbsd_store_inferior_registers): Likewise.
	* sol-thread.c (sol_thread_fetch_registers,
	sol_thread_store_registers): Likewise.
	* sparc-nat.c (sparc_fetch_inferior_registers,
	sparc_store_inferior_registers): Likewise.
	* tilegx-linux-nat.c (fetch_inferior_registers,
	store_inferior_registers): Likewise.
	* vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
	vaxbsd_store_inferior_registers): Likewise.
	* xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
	store_xtregs): Likewise.
2017-03-20 17:37:36 -04:00
Joel Brobecker 61baf725ec update copyright year range in GDB files
This applies the second part of GDB's End of Year Procedure, which
updates the copyright year range in all of GDB's files.

gdb/ChangeLog:

        Update copyright year range in all GDB files.
2017-01-01 10:52:34 +04:00
Edjunior Barbosa Machado 0154d99053 Fix checks for VSX and Altivec availability on Power
gdb/ChangeLog

	* ppc-linux-nat.c (ppc_linux_read_description): Use PPC_FEATURE_HAS_VSX
	and PPC_FEATURE_HAS_ALTIVEC to check if such features are available.
2016-04-22 19:39:12 -03:00
Joel Brobecker 618f726fcb GDB copyright headers update after running GDB's copyright.py script.
gdb/ChangeLog:

        Update year range in copyright notice of all files.
2016-01-01 08:43:22 +04:00
Simon Marchi f4b0a6714a target_ops mask_watchpoint: change int to target_hw_bp_type
Fixes:

/home/simark/src/binutils-gdb/gdb/ppc-linux-nat.c: In function ‘int ppc_linux_insert_mask_watchpoint(target_ops*, CORE_ADDR, CORE_ADDR, int)’:
/home/simark/src/binutils-gdb/gdb/ppc-linux-nat.c:1730:40: error: invalid conversion from ‘int’ to ‘target_hw_bp_type’ [-fpermissive]
   p.trigger_type = get_trigger_type (rw);
                                        ^

gdb/ChangeLog:

	* ppc-linux-nat.c (ppc_linux_insert_mask_watchpoint): Change
	type of rw to enum target_hw_bp_type.
	(ppc_linux_remove_mask_watchpoint): Likewise.
	* target.c (target_insert_mask_watchpoint): Likewise.
	(target_remove_mask_watchpoint): Likewise.
	* target.h (target_insert_mask_watchpoint): Likewise.
	(target_remove_mask_watchpoint): Likewise.
	(struct target_ops) <to_insert_mask_watchpoint>: Likewise.
	(struct target_ops) <to_remove_mask_watchpoint>: Likewise.
	* target-delegates.c: Regenerate.
2015-11-03 13:33:12 -05:00
Simon Marchi 8d7493201c Replace some xmalloc-family functions with XNEW-family ones
This patch is part of the make-gdb-buildable-in-C++ effort.  The idea is
to change some calls to the xmalloc family of functions to calls to the
equivalents in the XNEW family.  This avoids adding an explicit cast, so
it keeps the code a bit more readable.  Some of them also map relatively
well to a C++ equivalent (XNEW (struct foo) -> new foo), so it will be
possible to do scripted replacements if needed.

I only changed calls that were obviously allocating memory for one or
multiple "objects".  Allocation of variable sizes (such as strings or
buffer handling) will be for later (and won't use XNEW).

  - xmalloc (sizeof (struct foo)) -> XNEW (struct foo)
  - xmalloc (num * sizeof (struct foo)) -> XNEWVEC (struct foo, num)
  - xcalloc (1, sizeof (struct foo)) -> XCNEW (struct foo)
  - xcalloc (num, sizeof (struct foo)) -> XCNEWVEC (struct foo, num)
  - xrealloc (p, num * sizeof (struct foo) -> XRESIZEVEC (struct foo, p, num)
  - obstack_alloc (ob, sizeof (struct foo)) -> XOBNEW (ob, struct foo)
  - obstack_alloc (ob, num * sizeof (struct foo)) -> XOBNEWVEC (ob, struct foo, num)
  - alloca (sizeof (struct foo)) -> XALLOCA (struct foo)
  - alloca (num * sizeof (struct foo)) -> XALLOCAVEC (struct foo, num)

Some instances of xmalloc followed by memset to zero the buffer were
replaced by XCNEW or XCNEWVEC.

I regtested on x86-64, Ubuntu 14.04, but the patch touches many
architecture-specific files.  For those I'll have to rely on the
buildbot or people complaining that I broke their gdb.

gdb/ChangeLog:

	* aarch64-linux-nat.c (aarch64_add_process): Likewise.
	* aarch64-tdep.c (aarch64_gdbarch_init): Likewise.
	* ada-exp.y (write_ambiguous_var): Likewise.
	* ada-lang.c (resolve_subexp): Likewise.
	(user_select_syms): Likewise.
	(assign_aggregate): Likewise.
	(ada_evaluate_subexp): Likewise.
	(cache_symbol): Likewise.
	* addrmap.c (allocate_key): Likewise.
	(addrmap_create_mutable): Likewise.
	* aix-thread.c (sync_threadlists): Likewise.
	* alpha-tdep.c (alpha_push_dummy_call): Likewise.
	(alpha_gdbarch_init): Likewise.
	* amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
	* arm-linux-nat.c (arm_linux_add_process): Likewise.
	* arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
	* arm-tdep.c (push_stack_item): Likewise.
	(arm_displaced_step_copy_insn): Likewise.
	(arm_gdbarch_init): Likewise.
	(_initialize_arm_tdep): Likewise.
	* avr-tdep.c (push_stack_item): Likewise.
	* ax-general.c (new_agent_expr): Likewise.
	* block.c (block_initialize_namespace): Likewise.
	* breakpoint.c (alloc_counted_command_line): Likewise.
	(update_dprintf_command_list): Likewise.
	(parse_breakpoint_sals): Likewise.
	(decode_static_tracepoint_spec): Likewise.
	(until_break_command): Likewise.
	(clear_command): Likewise.
	(update_global_location_list): Likewise.
	(get_breakpoint_objfile_data) Likewise.
	* btrace.c (ftrace_new_function): Likewise.
	(btrace_set_insn_history): Likewise.
	(btrace_set_call_history): Likewise.
	* buildsym.c (add_symbol_to_list): Likewise.
	(record_pending_block): Likewise.
	(start_subfile): Likewise.
	(start_buildsym_compunit): Likewise.
	(push_subfile): Likewise.
	(end_symtab_get_static_block): Likewise.
	(buildsym_init): Likewise.
	* cli/cli-cmds.c (source_command): Likewise.
	* cli/cli-decode.c (add_cmd): Likewise.
	* cli/cli-script.c (build_command_line): Likewise.
	(setup_user_args): Likewise.
	(realloc_body_list): Likewise.
	(process_next_line): Likewise.
	(copy_command_lines): Likewise.
	* cli/cli-setshow.c (do_set_command): Likewise.
	* coff-pe-read.c (read_pe_exported_syms): Likewise.
	* coffread.c (coff_locate_sections): Likewise.
	(coff_symtab_read): Likewise.
	(coff_read_struct_type): Likewise.
	* common/cleanups.c (make_my_cleanup2): Likewise.
	* common/common-exceptions.c (throw_it): Likewise.
	* common/filestuff.c (make_cleanup_close): Likewise.
	* common/format.c (parse_format_string): Likewise.
	* common/queue.h (DEFINE_QUEUE_P): Likewise.
	* compile/compile-object-load.c (munmap_list_add): Likewise.
	(compile_object_load): Likewise.
	* compile/compile-object-run.c (compile_object_run): Likewise.
	* compile/compile.c (append_args): Likewise.
	* corefile.c (specify_exec_file_hook): Likewise.
	* cp-support.c (make_symbol_overload_list): Likewise.
	* cris-tdep.c (push_stack_item): Likewise.
	(cris_gdbarch_init): Likewise.
	* ctf.c (ctf_trace_file_writer_new): Likewise.
	* dbxread.c (init_header_files): Likewise.
	(add_new_header_file): Likewise.
	(init_bincl_list): Likewise.
	(dbx_end_psymtab): Likewise.
	(start_psymtab): Likewise.
	(dbx_end_psymtab): Likewise.
	* dcache.c (dcache_init): Likewise.
	* dictionary.c (dict_create_hashed): Likewise.
	(dict_create_hashed_expandable): Likewise.
	(dict_create_linear): Likewise.
	(dict_create_linear_expandable): Likewise.
	* dtrace-probe.c (dtrace_process_dof_probe): Likewise.
	* dummy-frame.c (register_dummy_frame_dtor): Likewise.
	* dwarf2-frame-tailcall.c (cache_new_ref1): Likewise.
	* dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
	(decode_frame_entry_1): Likewise.
	* dwarf2expr.c (new_dwarf_expr_context): Likewise.
	* dwarf2loc.c (dwarf2_compile_expr_to_ax): Likewise.
	* dwarf2read.c (dwarf2_has_info): Likewise.
	(create_signatured_type_table_from_index): Likewise.
	(dwarf2_read_index): Likewise.
	(dw2_get_file_names_reader): Likewise.
	(create_all_type_units): Likewise.
	(read_cutu_die_from_dwo): Likewise.
	(init_tu_and_read_dwo_dies): Likewise.
	(init_cutu_and_read_dies): Likewise.
	(create_all_comp_units): Likewise.
	(queue_comp_unit): Likewise.
	(inherit_abstract_dies): Likewise.
	(read_call_site_scope): Likewise.
	(dwarf2_add_field): Likewise.
	(dwarf2_add_typedef): Likewise.
	(dwarf2_add_member_fn): Likewise.
	(attr_to_dynamic_prop): Likewise.
	(abbrev_table_alloc_abbrev): Likewise.
	(abbrev_table_read_table): Likewise.
	(add_include_dir): Likewise.
	(add_file_name): Likewise.
	(dwarf_decode_line_header): Likewise.
	(dwarf2_const_value_attr): Likewise.
	(dwarf_alloc_block): Likewise.
	(parse_macro_definition): Likewise.
	(set_die_type): Likewise.
	(write_psymtabs_to_index): Likewise.
	(create_cus_from_index): Likewise.
	(dwarf2_create_include_psymtab): Likewise.
	(process_psymtab_comp_unit_reader): Likewise.
	(build_type_psymtab_dependencies): Likewise.
	(read_comp_units_from_section): Likewise.
	(compute_compunit_symtab_includes): Likewise.
	(create_dwo_unit_in_dwp_v1): Likewise.
	(create_dwo_unit_in_dwp_v2): Likewise.
	(read_func_scope): Likewise.
	(process_structure_scope): Likewise.
	(mark_common_block_symbol_computed): Likewise.
	(load_partial_dies): Likewise.
	(dwarf2_symbol_mark_computed): Likewise.
	* elfread.c (elf_symfile_segments): Likewise.
	(elf_read_minimal_symbols): Likewise.
	* environ.c (make_environ): Likewise.
	* eval.c (evaluate_subexp_standard): Likewise.
	* event-loop.c (create_file_handler): Likewise.
	(create_async_signal_handler): Likewise.
	(create_async_event_handler): Likewise.
	(create_timer): Likewise.
	* exec.c (build_section_table): Likewise.
	* fbsd-nat.c (fbsd_remember_child): Likewise.
	* fork-child.c (fork_inferior): Likewise.
	* frv-tdep.c (new_variant): Likewise.
	* gdbarch.sh (gdbarch_alloc): Likewise.
	(append_name): Likewise.
	* gdbtypes.c (rank_function): Likewise.
	(copy_type_recursive): Likewise.
	(add_dyn_prop): Likewise.
	* gnu-nat.c (make_proc): Likewise.
	(make_inf): Likewise.
	(gnu_write_inferior): Likewise.
	* gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
	(build_std_type_info_type): Likewise.
	* guile/scm-param.c (compute_enum_list): Likewise.
	* guile/scm-utils.c (gdbscm_parse_function_args): Likewise.
	* guile/scm-value.c (gdbscm_value_call): Likewise.
	* h8300-tdep.c (h8300_gdbarch_init): Likewise.
	* hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
	(read_unwind_info): Likewise.
	* ia64-tdep.c (ia64_gdbarch_init): Likewise.
	* infcall.c (dummy_frame_context_saver_setup): Likewise.
	(call_function_by_hand_dummy): Likewise.
	* infcmd.c (step_once): Likewise.
	(finish_forward): Likewise.
	(attach_command): Likewise.
	(notice_new_inferior): Likewise.
	* inferior.c (add_inferior_silent): Likewise.
	* infrun.c (add_displaced_stepping_state): Likewise.
	(save_infcall_control_state): Likewise.
	(save_inferior_ptid): Likewise.
	(_initialize_infrun): Likewise.
	* jit.c (bfd_open_from_target_memory): Likewise.
	(jit_gdbarch_data_init): Likewise.
	* language.c (add_language): Likewise.
	* linespec.c (decode_line_2): Likewise.
	* linux-nat.c (add_to_pid_list): Likewise.
	(add_initial_lwp): Likewise.
	* linux-thread-db.c (add_thread_db_info): Likewise.
	(record_thread): Likewise.
	(info_auto_load_libthread_db): Likewise.
	* m32c-tdep.c (m32c_gdbarch_init): Likewise.
	* m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
	* m68k-tdep.c (m68k_gdbarch_init): Likewise.
	* m88k-tdep.c (m88k_analyze_prologue): Likewise.
	* macrocmd.c (macro_define_command): Likewise.
	* macroexp.c (gather_arguments): Likewise.
	* macroscope.c (sal_macro_scope): Likewise.
	* macrotab.c (new_macro_table): Likewise.
	* mdebugread.c (push_parse_stack): Likewise.
	(parse_partial_symbols): Likewise.
	(parse_symbol): Likewise.
	(psymtab_to_symtab_1): Likewise.
	(new_block): Likewise.
	(new_psymtab): Likewise.
	(mdebug_build_psymtabs): Likewise.
	(add_pending): Likewise.
	(elfmdebug_build_psymtabs): Likewise.
	* mep-tdep.c (mep_gdbarch_init): Likewise.
	* mi/mi-main.c (mi_execute_command): Likewise.
	* mi/mi-parse.c (mi_parse_argv): Likewise.
	* minidebug.c (lzma_open): Likewise.
	* minsyms.c (terminate_minimal_symbol_table): Likewise.
	* mips-linux-nat.c (mips_linux_insert_watchpoint): Likewise.
	* mips-tdep.c (mips_gdbarch_init): Likewise.
	* mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
	* msp430-tdep.c (msp430_gdbarch_init): Likewise.
	* mt-tdep.c (mt_registers_info): Likewise.
	* nat/aarch64-linux.c (aarch64_linux_new_thread): Likewise.
	* nat/linux-btrace.c (linux_enable_bts): Likewise.
	(linux_enable_pt): Likewise.
	* nat/linux-osdata.c (linux_xfer_osdata_processes): Likewise.
	(linux_xfer_osdata_processgroups): Likewise.
	* nios2-tdep.c (nios2_gdbarch_init): Likewise.
	* nto-procfs.c (procfs_meminfo): Likewise.
	* objc-lang.c (start_msglist): Likewise.
	(selectors_info): Likewise.
	(classes_info): Likewise.
	(find_methods): Likewise.
	* objfiles.c (allocate_objfile): Likewise.
	(update_section_map): Likewise.
	* osabi.c (gdbarch_register_osabi): Likewise.
	(gdbarch_register_osabi_sniffer): Likewise.
	* parse.c (start_arglist): Likewise.
	* ppc-linux-nat.c (hwdebug_find_thread_points_by_tid): Likewise.
	(hwdebug_insert_point): Likewise.
	* printcmd.c (display_command): Likewise.
	(ui_printf): Likewise.
	* procfs.c (create_procinfo): Likewise.
	(load_syscalls): Likewise.
	(proc_get_LDT_entry): Likewise.
	(proc_update_threads): Likewise.
	* prologue-value.c (make_pv_area): Likewise.
	(pv_area_store): Likewise.
	* psymtab.c (extend_psymbol_list): Likewise.
	(init_psymbol_list): Likewise.
	(allocate_psymtab): Likewise.
	* python/py-inferior.c (add_thread_object): Likewise.
	* python/py-param.c (compute_enum_values): Likewise.
	* python/py-value.c (valpy_call): Likewise.
	* python/py-varobj.c (py_varobj_iter_next): Likewise.
	* python/python.c (ensure_python_env): Likewise.
	* record-btrace.c (record_btrace_start_replaying): Likewise.
	* record-full.c (record_full_reg_alloc): Likewise.
	(record_full_mem_alloc): Likewise.
	(record_full_end_alloc): Likewise.
	(record_full_core_xfer_partial): Likewise.
	* regcache.c (get_thread_arch_aspace_regcache): Likewise.
	* remote-fileio.c (remote_fileio_init_fd_map): Likewise.
	* remote-notif.c (remote_notif_state_allocate): Likewise.
	* remote.c (demand_private_info): Likewise.
	(remote_notif_stop_alloc_reply): Likewise.
	(remote_enable_btrace): Likewise.
	* reverse.c (save_bookmark_command): Likewise.
	* rl78-tdep.c (rl78_gdbarch_init): Likewise.
	* rx-tdep.c (rx_gdbarch_init): Likewise.
	* s390-linux-nat.c (s390_insert_watchpoint): Likewise.
	* ser-go32.c (dos_get_tty_state): Likewise.
	(dos_copy_tty_state): Likewise.
	* ser-mingw.c (ser_windows_open): Likewise.
	(ser_console_wait_handle): Likewise.
	(ser_console_get_tty_state): Likewise.
	(make_pipe_state): Likewise.
	(net_windows_open): Likewise.
	* ser-unix.c (hardwire_get_tty_state): Likewise.
	(hardwire_copy_tty_state): Likewise.
	* solib-aix.c (solib_aix_new_lm_info): Likewise.
	* solib-dsbt.c (dsbt_current_sos): Likewise.
	(dsbt_relocate_main_executable): Likewise.
	* solib-frv.c (frv_current_sos): Likewise.
	(frv_relocate_main_executable): Likewise.
	* solib-spu.c (spu_bfd_fopen): Likewise.
	* solib-svr4.c (lm_info_read): Likewise.
	(svr4_copy_library_list): Likewise.
	(svr4_default_sos): Likewise.
	* source.c (find_source_lines): Likewise.
	(line_info): Likewise.
	(add_substitute_path_rule): Likewise.
	* spu-linux-nat.c (spu_bfd_open): Likewise.
	* spu-tdep.c (info_spu_dma_cmdlist): Likewise.
	* stabsread.c (dbx_lookup_type): Likewise.
	(read_type): Likewise.
	(read_member_functions): Likewise.
	(read_struct_fields): Likewise.
	(read_baseclasses): Likewise.
	(read_args): Likewise.
	(_initialize_stabsread): Likewise.
	* stack.c (func_command): Likewise.
	* stap-probe.c (handle_stap_probe): Likewise.
	* symfile.c (addrs_section_sort): Likewise.
	(addr_info_make_relative): Likewise.
	(load_section_callback): Likewise.
	(add_symbol_file_command): Likewise.
	(init_filename_language_table): Likewise.
	* symtab.c (create_filename_seen_cache): Likewise.
	(sort_search_symbols_remove_dups): Likewise.
	(search_symbols): Likewise.
	* target.c (make_cleanup_restore_target_terminal): Likewise.
	* thread.c (new_thread): Likewise.
	(enable_thread_stack_temporaries): Likewise.
	(make_cleanup_restore_current_thread): Likewise.
	(thread_apply_all_command): Likewise.
	* tic6x-tdep.c (tic6x_gdbarch_init): Likewise.
	* top.c (gdb_readline_wrapper): Likewise.
	* tracefile-tfile.c (tfile_trace_file_writer_new): Likewise.
	* tracepoint.c (trace_find_line_command): Likewise.
	(all_tracepoint_actions_and_cleanup): Likewise.
	(make_cleanup_restore_current_traceframe): Likewise.
	(get_uploaded_tp): Likewise.
	(get_uploaded_tsv): Likewise.
	* tui/tui-data.c (tui_alloc_generic_win_info): Likewise.
	(tui_alloc_win_info): Likewise.
	(tui_alloc_content): Likewise.
	(tui_add_content_elements): Likewise.
	* tui/tui-disasm.c (tui_find_disassembly_address): Likewise.
	(tui_set_disassem_content): Likewise.
	* ui-file.c (ui_file_new): Likewise.
	(stdio_file_new): Likewise.
	(tee_file_new): Likewise.
	* utils.c (make_cleanup_restore_integer): Likewise.
	(add_internal_problem_command): Likewise.
	* v850-tdep.c (v850_gdbarch_init): Likewise.
	* valops.c (find_oload_champ): Likewise.
	* value.c (allocate_value_lazy): Likewise.
	(record_latest_value): Likewise.
	(create_internalvar): Likewise.
	* varobj.c (install_variable): Likewise.
	(new_variable): Likewise.
	(new_root_variable): Likewise.
	(cppush): Likewise.
	(_initialize_varobj): Likewise.
	* windows-nat.c (windows_make_so): Likewise.
	* x86-nat.c (x86_add_process): Likewise.
	* xcoffread.c (arrange_linetable): Likewise.
	(allocate_include_entry): Likewise.
	(process_linenos): Likewise.
	(SYMBOL_DUP): Likewise.
	(xcoff_start_psymtab): Likewise.
	(xcoff_end_psymtab): Likewise.
	* xml-support.c (gdb_xml_parse_attr_ulongest): Likewise.
	* xtensa-tdep.c (xtensa_register_type): Likewise.
	* gdbarch.c: Regenerate.
	* gdbarch.h: Regenerate.

gdb/gdbserver/ChangeLog:

	* ax.c (gdb_parse_agent_expr): Likewise.
	(compile_bytecodes): Likewise.
	* dll.c (loaded_dll): Likewise.
	* event-loop.c (append_callback_event): Likewise.
	(create_file_handler): Likewise.
	(create_file_event): Likewise.
	* hostio.c (handle_open): Likewise.
	* inferiors.c (add_thread): Likewise.
	(add_process): Likewise.
	* linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
	* linux-arm-low.c (arm_new_process): Likewise.
	(arm_new_thread): Likewise.
	* linux-low.c (add_to_pid_list): Likewise.
	(linux_add_process): Likewise.
	(handle_extended_wait): Likewise.
	(add_lwp): Likewise.
	(enqueue_one_deferred_signal): Likewise.
	(enqueue_pending_signal): Likewise.
	(linux_resume_one_lwp_throw): Likewise.
	(linux_resume_one_thread): Likewise.
	(linux_read_memory): Likewise.
	(linux_write_memory): Likewise.
	* linux-mips-low.c (mips_linux_new_process): Likewise.
	(mips_linux_new_thread): Likewise.
	(mips_add_watchpoint): Likewise.
	* linux-x86-low.c (initialize_low_arch): Likewise.
	* lynx-low.c (lynx_add_process): Likewise.
	* mem-break.c (set_raw_breakpoint_at): Likewise.
	(set_breakpoint): Likewise.
	(add_condition_to_breakpoint): Likewise.
	(add_commands_to_breakpoint): Likewise.
	(clone_agent_expr): Likewise.
	(clone_one_breakpoint): Likewise.
	* regcache.c (new_register_cache): Likewise.
	* remote-utils.c (look_up_one_symbol): Likewise.
	* server.c (queue_stop_reply): Likewise.
	(start_inferior): Likewise.
	(queue_stop_reply_callback): Likewise.
	(handle_target_event): Likewise.
	* spu-low.c (fetch_ppc_memory): Likewise.
	(store_ppc_memory): Likewise.
	* target.c (set_target_ops): Likewise.
	* thread-db.c (thread_db_load_search): Likewise.
	(try_thread_db_load_1): Likewise.
	* tracepoint.c (add_tracepoint): Likewise.
	(add_tracepoint_action): Likewise.
	(create_trace_state_variable): Likewise.
	(cmd_qtdpsrc): Likewise.
	(cmd_qtro): Likewise.
	(add_while_stepping_state): Likewise.
	* win32-low.c (child_add_thread): Likewise.
	(get_image_name): Likewise.
2015-08-26 17:18:12 -04:00
Pedro Alves e76460dbb9 Unbreak PPC gdb builds
Commit f486487f55 (Mostly trivial enum fixes) missed updating
ppc-linux-nat.c, resulting in:

 ../../src/gdb/ppc-linux-nat.c: In function ‘_initialize_ppc_linux_nat’:
 ../../src/gdb/ppc-linux-nat.c:2503:27: error: assignment from incompatible pointer type [-Werror]
 ../../src/gdb/ppc-linux-nat.c:2504:27: error: assignment from incompatible pointer type [-Werror]

gdb/ChangeLog
2015-08-02  Pedro Alves  <palves@redhat.com>

	* ppc-linux-nat.c (get_trigger_type, create_watchpoint_request)
	(ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint): Change
	parameter 'rw's type to enum target_hw_bp_type and rename to
	'type'.
2015-08-02 11:46:50 -07:00
Simon Marchi f486487f55 Mostly trivial enum fixes
This is a patch I extracted from Pedro's C++ branch.  It contains the
most trivial enum fixes, where an integer type/value was used instead
of the appropriate enum type/value.  It fixes many C++ errors, since
in C++ you can't mix integers and enums implicitely.

Regardless of the C++ conversion, I think this is a good cleanup to make
use of the appropriate enum types.

Regression-tested on native x86_64.

gdb/ChangeLog:

	* aarch64-linux-nat.c (aarch64_linux_can_use_hw_breakpoint): Use enum
	type or value instead of integer.
	(aarch64_linux_insert_watchpoint): Likewise.
	(aarch64_linux_remove_watchpoint): Likewise.
	* ada-lang.c (ada_op_print_tab): Likewise.
	* amd64-linux-tdep.c (amd64_canonicalize_syscall): Likewise.
	(amd64_linux_syscall_record_common): Likewise.
	* arch-utils.c (target_byte_order_user): Likewise.
	(default_byte_order): Likewise.
	* arm-linux-nat.c (arm_linux_can_use_hw_breakpoint): Likewise.
	(arm_linux_get_hwbp_type): Likewise.
	(arm_linux_hw_watchpoint_initialize): Likewise.
	(arm_linux_insert_watchpoint): Likewise.
	* arm-linux-tdep.c (arm_canonicalize_syscall): Likewise.
	(arm_linux_syscall_record): Likewise.
	* breakpoint.c (update_watchpoint): Likewise.
	(breakpoint_here_p): Likewise.
	(bpstat_print): Likewise.
	(enable_breakpoint_disp): Likewise.
	* c-lang.c (c_op_print_tab): Likewise.
	* cli/cli-decode.c (add_info_alias): Likewise.
	* d-lang.c (d_op_print_tab): Likewise.
	* eval.c (evaluate_subexp_standard): Likewise.
	* f-exp.y (dot_ops): Likewise.
	(f77_keywords): Likewise.
	* f-lang.c (f_op_print_tab): Likewise.
	* go-lang.c (go_op_print_tab): Likewise.
	* guile/scm-breakpoint.c (gdbscm_make_breakpoint): Likewise.
	* guile/scm-cmd.c (gdbscm_make_command): Likewise.
	* guile/scm-param.c (gdbscm_make_parameter): Likewise.
	* guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer): Likewise.
	* guile/scm-string.c (struct scm_to_stringn_data): Likewise.
	(struct scm_from_stringn_data): Likewise.
	* i386-linux-tdep.c (i386_canonicalize_syscall): Likewise.
	* ia64-linux-nat.c (ia64_linux_insert_watchpoint): Likewise.
	(ia64_linux_remove_watchpoint): Likewise.
	(ia64_linux_can_use_hw_breakpoint): Likewise.
	* infrun.c (print_stop_event): Likewise.
	* jv-lang.c (java_op_print_tab): Likewise.
	* linux-nat.c (linux_proc_xfer_partial): Likewise.
	* linux-nat.h (struct lwp_info): Likewise.
	* linux-thread-db.c (enable_thread_event): Likewise.
	* m2-lang.c (m2_op_print_tab): Likewise.
	* mi/mi-cmd-stack.c (mi_cmd_stack_list_locals): Likewise.
	(mi_cmd_stack_list_variables): Likewise.
	* mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
	* mi/mi-out.c (mi_table_begin): Likewise.
	(mi_table_header): Likewise.
	* mips-linux-nat.c (mips_linux_can_use_hw_breakpoint): Likewise.
	(mips_linux_insert_watchpoint): Likewise.
	(mips_linux_remove_watchpoint): Likewise.
	* nat/mips-linux-watch.c (mips_linux_watch_type_to_irw): Likewise.
	* nat/mips-linux-watch.h (struct mips_watchpoint): Likewise.
	(mips_linux_watch_type_to_irw): Likewise.
	* nto-procfs.c (procfs_can_use_hw_breakpoint): Likewise.
	(procfs_insert_hw_watchpoint): Likewise.
	(procfs_remove_hw_watchpoint): Likewise.
	(procfs_hw_watchpoint): Likewise.
	(procfs_can_use_hw_breakpoint): Likewise.
	(procfs_remove_hw_watchpoint): Likewise.
	(procfs_insert_hw_watchpoint): Likewise.
	* p-lang.c (pascal_op_print_tab): Likewise.
	* ppc-linux-nat.c (ppc_linux_can_use_hw_breakpoint): Likewise.
	* ppc-linux-tdep.c (ppu2spu_unwind_register): Likewise.
	* ppc-sysv-tdep.c (get_decimal_float_return_value): Likewise.
	* procfs.c (procfs_can_use_hw_breakpoint): Likewise.
	(procfs_insert_watchpoint): Likewise.
	(procfs_remove_watchpoint): Likewise.
	* psymtab.c (recursively_search_psymtabs): Likewise.
	* remote-m32r-sdi.c (m32r_can_use_hw_watchpoint): Likewise.
	(m32r_insert_watchpoint): Likewise.
	* remote-mips.c (mips_can_use_watchpoint): Likewise.
	(mips_insert_watchpoint): Likewise.
	(mips_remove_watchpoint): Likewise.
	* remote.c (watchpoint_to_Z_packet): Likewise.
	(remote_insert_watchpoint): Likewise.
	(remote_remove_watchpoint): Likewise.
	(remote_check_watch_resources): Likewise.
	* s390-linux-nat.c (s390_insert_watchpoint): Likewise.
	(s390_remove_watchpoint): Likewise.
	(s390_can_use_hw_breakpoint): Likewise.
	* s390-linux-tdep.c (s390_gdbarch_init): Likewise.
	* spu-linux-nat.c (spu_can_use_hw_breakpoint): Likewise.
	* target.h (struct target_ops): Likewise.
	* tilegx-tdep.c (tilegx_analyze_prologue): Likewise.
	* ui-out.c (struct ui_out_hdr): Likewise.
	(append_header_to_list): Likewise.
	(get_next_header): Likewise.
	(verify_field): Likewise.
	(ui_out_begin): Likewise.
	(ui_out_field_int): Likewise.
	(ui_out_field_fmt_int): Likewise.
	(ui_out_field_skip): Likewise.
	(ui_out_field_string): Likewise.
	(ui_out_field_fmt): Likewise.
	* varobj.c (new_variable): Likewise.
	* x86-nat.c (x86_insert_watchpoint): Likewise.
	(x86_remove_watchpoint): Likewise.
	(x86_can_use_hw_breakpoint): Likewise.
	* xtensa-tdep.h (struct gdbarch_tdep): Likewise.
	* inflow.c (enum gdb_has_a_terminal_flag_enum): Add name to
	previously anonymous enumeration type..
	* linux-record.h (enum gdb_syscall): Add gdb_sys_no_syscall
	value.
	* target-debug.h (target_debug_print_enum_target_hw_bp_type): New.
	(target_debug_print_enum_bptype): New.
	* target-delegates.c: Regenerate.
2015-07-31 13:19:53 -04:00
Pedro Alves 5826e15986 Linux: sys/ptrace.h -> nat/gdb_ptrace.h everywhere
So that we pick the enum __ptrace_request fix everywhere.

gdb/ChangeLog:
2015-07-24  Pedro Alves  <palves@redhat.com>

	* aarch64-linux-nat.c: Include nat/gdb_ptrace.h instead of
	sys/ptrace.h.
	* alpha-linux-nat.c: Likewise.
	* amd64-linux-nat.c: Likewise.
	* arm-linux-nat.c: Likewise.
	* hppa-linux-nat.c: Likewise.
	* i386-linux-nat.c: Likewise.
	* ia64-linux-nat.c: Likewise.
	* linux-fork.c: Likewise.
	* linux-nat.c: Likewise.
	* m32r-linux-nat.c: Likewise.
	* m68klinux-nat.c: Likewise.
	* mips-linux-nat.c: Likewise.
	* nat/linux-btrace.c: Likewise.
	* nat/linux-ptrace.c: Likewise.
	* nat/linux-ptrace.h
	* nat/mips-linux-watch.c: Likewise.
	* nat/x86-linux-dregs.c: Likewise.
	* ppc-linux-nat.c: Likewise.
	* s390-linux-nat.c: Likewise.
	* spu-linux-nat.c: Likewise.
	* tilegx-linux-nat.c: Likewise.
	* x86-linux-nat.c: Likewise.
	* xtensa-linux-nat.c: Likewise.

gdb/gdbserver/ChangeLog:
2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>

	* linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
	sys/ptrace.h.
	* linux-arm-low.c: Likewise.
	* linux-cris-low.c: Likewise.
	* linux-crisv32-low.c: Likewise.
	* linux-low.c: Likewise.
	* linux-m68k-low.c: Likewise.
	* linux-mips-low.c: Likewise.
	* linux-nios2-low.c: Likewise.
	* linux-s390-low.c: Likewise.
	* linux-sparc-low.c: Likewise.
	* linux-tic6x-low.c: Likewise.
	* linux-tile-low.c: Likewise.
	* linux-x86-low.c: Likewise.
2015-07-24 15:14:47 +01:00
Gary Benson dc06243f6f Remove redundant include directives.
stdint.h was added to common-defs.h some months ago and should
no longer be included directly by any file.

gdb_assert.h was added to common-defs.h nearly a year ago, but
three includes have crept in since then.

This commit removes all such redundant include directives.

gdb/ChangeLog:

	* common/buffer.c (stdint.h): Do not include.
	* common/print-utils.c (stdint.h): Likewise.
	* compile/compile-c-symbols.c (gdb_assert.h): Likewise.
	* compile/compile-c-types.c (gdb_assert.h): Likewise.
	* ft32-tdep.c (gdb_assert.h): Likewise.
	* guile/scm-utils.c (stdint.h): Likewise.
	* i386-linux-tdep.c (stdint.h): Likewise.
	* i386-tdep.c (stdint.h): Likewise.
	* nat/linux-btrace.c (stdint.h): Likewise.
	* nat/linux-btrace.h (stdint.h): Likewise.
	* nat/linux-ptrace.c (stdint.h): Likewise.
	* nat/mips-linux-watch.h (stdint.h): Likewise.
	* ppc-linux-nat.c (stdint.h): Likewise.
	* python/python-internal.h (stdint.h): Likewise.
	* stub-termcap.c (stdlib.h): Likewise.
	* target/target.h (stdint.h): Likewise.
	* xtensa-linux-nat.c (stdint.h): Likewise.

gdb/gdbserver/ChangeLog:

	* linux-i386-ipa.c (stdint.h): Do not include.
	* lynx-i386-low.c (stdint.h): Likewise.
	* lynx-ppc-low.c (stdint.h): Likewise.
	* mem-break.c (stdint.h): Likewise.
	* thread-db.c (stdint.h): Likewise.
	* tracepoint.c (stdint.h): Likewise.
	* win32-low.c (stdint.h): Likewise.
2015-06-24 13:52:29 +01:00
Yao Qi cdf436294f Detect 64-bit-ness in PowerPC Book III-E
This patch is to teach both GDB and GDBServer to detect 64-bit inferior
correctly.  We find a problem that GDBServer is unable to detect on a
e5500 core processor.  Current GDBServer assumes that MSR is a 64-bit
register, but MSR is a 32-bit register in Book III-E.  This patch is
to fix this problem by checking the right bit in MSR, in order to handle
both Book III-S and Book III-E.  In order to detect Book III-S and
Book III-E, we check the PPC_FEATURE_BOOKE from the host's HWCAP (by
getauxval on glibc >= 2.16.  If getauxval doesn't exist, we implement
the fallback by parsing /proc/self/auxv), because it should an invariant
on the same machine cross different processes.

In order to share code, I add nat/ppc-linux.c for both GDB and
GDBserver side.

gdb:

2015-01-14  Yao Qi  <yao@codesourcery.com>

	* Makefile.in (ppc-linux.o): New rule.
	* config/powerpc/ppc64-linux.mh (NATDEPFILES): Add ppc-linux.o.
	* configure.ac: AC_CHECK_FUNCS(getauxval).
	* config.in: Re-generated.
	* configure: Re-generated.
	* nat/ppc-linux.h [__powerpc64__] (ppc64_64bit_inferior_p):
	Declare.
	* nat/ppc-linux.c: New file.
	* ppc-linux-nat.c (ppc_linux_target_wordsize) [__powerpc64__]:
	Call ppc64_64bit_inferior_p.

gdb/gdbserver:

2015-01-14  Yao Qi  <yao@codesourcery.com>

	* Makefile.in (SFILES): Add nat/ppc-linux.c.
	(ppc-linux.o): New rule.
	* configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
	* configure.ac: AC_CHECK_FUNCS(getauxval).
	* config.in: Re-generated.
	* configure: Re-generated.
	* linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
	ppc64_64bit_inferior_p
2015-01-14 22:28:27 +08:00
Yao Qi 514c533895 Move some ppc macros to nat/ppc-linux.h
When I use PPC_FEATURE_BOOKE in GDBserver, I find it is defined in GDB
but not in GDBserver.  After taking a further look, I find some macros
are duplicated between ppc-linux-nat.c and linux-ppc-low.c, so this
patch is to move them into nat/ppc-linux.h.

gdb/gdbserver:

2015-01-14  Yao Qi  <yao@codesourcery.com>

	* linux-ppc-low.c: Include "nat/ppc-linux.h".
	 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
	(PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
	(PT_ORIG_R3, PT_TRAP): Likewise.
	(PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
	(PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
	(PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.

gdb:

2015-01-14  Yao Qi  <yao@codesourcery.com>

	* ppc-linux-nat.c (PT_ORIG_R3, PT_TRAP): Move to
	nat/ppc-linux.h.
	(PPC_FEATURE_CELL, PPC_FEATURE_BOOKE): Likewise.
	(PPC_FEATURE_HAS_DFP): Likewise.
	(PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
	(PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
	(PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
	Include "nat/ppc-linux.h".
	* nat/ppc-linux.h: New file.
	* Makefile.in (HFILES_NO_SRCDIR): Add nat/ppc-linux.h.
2015-01-14 22:28:22 +08:00
Joel Brobecker 32d0add0a6 Update year range in copyright notice of all files owned by the GDB project.
gdb/ChangeLog:

        Update year range in copyright notice of all files.
2015-01-01 13:32:14 +04:00
Maciej W. Rozycki 0d5ed15352 Avoid software breakpoint's instruction shadow inconsistency
This change:

commit b775012e84
Author: Luis Machado <luisgpm@br.ibm.com>
Date:   Fri Feb 24 15:10:59 2012 +0000

    2012-02-24  Luis Machado  <lgustavo@codesourcery.com>

	* remote.c (remote_supports_cond_breakpoints): New forward
	declaration.
[...]

changed the way breakpoints are inserted and removed such that
`insert_bp_location' can now be called with the breakpoint being handled
already in place, while previously the call was only ever made for
breakpoints that have not been put in place.  This in turn caused an
issue for software breakpoints and targets for which a breakpoint's
`placed_address' may not be the same as the original requested address.

The issue is `insert_bp_location' overwrites the previously adjusted
value in `placed_address' with the original address, that is only
replaced back with the correct adjusted address later on when
`gdbarch_breakpoint_from_pc' is called.  Meanwhile there's a window
where the value in `placed_address' does not correspond to data stored
in `shadow_contents', leading to incorrect instruction bytes being
supplied when `one_breakpoint_xfer_memory' is called to supply the
instruction overlaid by the breakpoint.

And this is exactly what happens on the MIPS target with software
breakpoints placed in microMIPS code.  In this case not only
`placed_address' is not the original address because of the ISA bit, but
`mips_breakpoint_from_pc' has to read the original instruction to
determine which one of the two software breakpoint instruction encodings
to choose as well.  The 16-bit encoding is used to replace 16-bit
instructions and similarly the 32-bit one is used with 32-bit
instructions, to satisfy branch delay slot size requirements.

The mismatch between `placed_address' and the address data in
`shadow_contents' has been obtained from leads to the wrong encoding
being used in some cases, which in the case of a 32-bit software
breakpoint instruction replacing a 16-bit instruction causes corruption
to the adjacent following instruction and leads the debug session astray
if execution reaches there e.g. with a jump.

To address this problem I made the change below, that adds a
`reqstd_address' field to `struct bp_target_info' and leaves
`placed_address' unchanged once it has been set.  This ensures data in
`shadow_contents' is always consistent with `placed_address'.

This approach also has this good side effect that all the places that
examine the breakpoint's address see a consistent value, either
`reqstd_address' or `placed_address', as required.  Currently some
places see either the original or the adjusted address in
`placed_address', depending on whether they have been called before
`gdbarch_remote_breakpoint_from_pc' or afterwards.  This is in
particular true for subsequent calls to
`gdbarch_remote_breakpoint_from_pc' itself, e.g. from
`one_breakpoint_xfer_memory'.  This is also important for places like
`find_single_step_breakpoint' where a breakpoint's address is compared
to the raw value of $pc.

	* breakpoint.h (bp_target_info): Add `reqstd_address' member,
	update comments.
	* breakpoint.c (one_breakpoint_xfer_memory): Use `reqstd_address'
	for the breakpoint's address.  Don't preinitialize `placed_size'.
	(insert_bp_location): Set `reqstd_address' rather than
	`placed_address'.
	(bp_target_info_copy_insertion_state): Also copy `placed_address'.
	(bkpt_insert_location): Use `reqstd_address' for the breakpoint's
	address.
	(bkpt_remove_location): Likewise.
	(deprecated_insert_raw_breakpoint): Likewise.
	(deprecated_remove_raw_breakpoint): Likewise.
	(find_single_step_breakpoint): Likewise.
	* mem-break.c (default_memory_insert_breakpoint): Use
	`reqstd_address' for the breakpoint's address.  Don't set
	`placed_address' or `placed_size' if breakpoint contents couldn't
	have been determined.
	* remote.c (remote_insert_breakpoint): Use `reqstd_address' for
	the breakpoint's address.
	(remote_insert_hw_breakpoint): Likewise.  Don't set
	`placed_address' or `placed_size' if breakpoint couldn't have been
	set.
	* aarch64-linux-nat.c (aarch64_linux_insert_hw_breakpoint): Use
	`reqstd_address' for the breakpoint's address.
	* arm-linux-nat.c (arm_linux_hw_breakpoint_initialize): Likewise.
	* ia64-tdep.c (ia64_memory_insert_breakpoint): Likewise.
	* m32r-tdep.c (m32r_memory_insert_breakpoint): Likewise.
	* microblaze-linux-tdep.c
	(microblaze_linux_memory_remove_breakpoint): Likewise.
	* monitor.c (monitor_insert_breakpoint): Likewise.
	* nto-procfs.c (procfs_insert_breakpoint): Likewise.
	(procfs_insert_hw_breakpoint): Likewise.
	* ppc-linux-nat.c (ppc_linux_insert_hw_breakpoint): Likewise.
	* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Likewise.
	* remote-m32r-sdi.c (m32r_insert_breakpoint): Likewise.
	* remote-mips.c (mips_insert_breakpoint): Likewise.
	* x86-nat.c (x86_insert_hw_breakpoint): Likewise.
2014-10-03 12:54:34 +01:00
Gary Benson 6d3d12ebef Include string.h in common-defs.h
This commit includes string.h in common-defs.h and removes all other
inclusions.

gdb/
2014-08-07  Gary Benson  <gbenson@redhat.com>

	* common/common-defs.h: Include string.h.
	* aarch64-tdep.c: Do not include string.h.
	* ada-exp.y: Likewise.
	* ada-lang.c: Likewise.
	* ada-lex.l: Likewise.
	* ada-typeprint.c: Likewise.
	* ada-valprint.c: Likewise.
	* aix-thread.c: Likewise.
	* alpha-linux-tdep.c: Likewise.
	* alpha-mdebug-tdep.c: Likewise.
	* alpha-nat.c: Likewise.
	* alpha-osf1-tdep.c: Likewise.
	* alpha-tdep.c: Likewise.
	* alphanbsd-tdep.c: Likewise.
	* amd64-dicos-tdep.c: Likewise.
	* amd64-linux-tdep.c: Likewise.
	* amd64-nat.c: Likewise.
	* amd64-sol2-tdep.c: Likewise.
	* amd64fbsd-tdep.c: Likewise.
	* amd64obsd-tdep.c: Likewise.
	* arch-utils.c: Likewise.
	* arm-linux-nat.c: Likewise.
	* arm-linux-tdep.c: Likewise.
	* arm-tdep.c: Likewise.
	* arm-wince-tdep.c: Likewise.
	* armbsd-tdep.c: Likewise.
	* armnbsd-nat.c: Likewise.
	* armnbsd-tdep.c: Likewise.
	* armobsd-tdep.c: Likewise.
	* avr-tdep.c: Likewise.
	* ax-gdb.c: Likewise.
	* ax-general.c: Likewise.
	* bcache.c: Likewise.
	* bfin-tdep.c: Likewise.
	* breakpoint.c: Likewise.
	* build-id.c: Likewise.
	* buildsym.c: Likewise.
	* c-exp.y: Likewise.
	* c-lang.c: Likewise.
	* c-typeprint.c: Likewise.
	* c-valprint.c: Likewise.
	* charset.c: Likewise.
	* cli-out.c: Likewise.
	* cli/cli-cmds.c: Likewise.
	* cli/cli-decode.c: Likewise.
	* cli/cli-dump.c: Likewise.
	* cli/cli-interp.c: Likewise.
	* cli/cli-logging.c: Likewise.
	* cli/cli-script.c: Likewise.
	* cli/cli-setshow.c: Likewise.
	* cli/cli-utils.c: Likewise.
	* coffread.c: Likewise.
	* common/agent.c: Likewise.
	* common/buffer.c: Likewise.
	* common/buffer.h: Likewise.
	* common/common-utils.c: Likewise.
	* common/filestuff.c: Likewise.
	* common/filestuff.c: Likewise.
	* common/format.c: Likewise.
	* common/print-utils.c: Likewise.
	* common/rsp-low.c: Likewise.
	* common/signals.c: Likewise.
	* common/vec.h: Likewise.
	* common/xml-utils.c: Likewise.
	* core-regset.c: Likewise.
	* corefile.c: Likewise.
	* corelow.c: Likewise.
	* cp-abi.c: Likewise.
	* cp-name-parser.y: Likewise.
	* cp-support.c: Likewise.
	* cp-valprint.c: Likewise.
	* cris-tdep.c: Likewise.
	* d-exp.y: Likewise.
	* darwin-nat.c: Likewise.
	* dbxread.c: Likewise.
	* dcache.c: Likewise.
	* demangle.c: Likewise.
	* dicos-tdep.c: Likewise.
	* disasm.c: Likewise.
	* doublest.c: Likewise.
	* dsrec.c: Likewise.
	* dummy-frame.c: Likewise.
	* dwarf2-frame.c: Likewise.
	* dwarf2loc.c: Likewise.
	* dwarf2read.c: Likewise.
	* elfread.c: Likewise.
	* environ.c: Likewise.
	* eval.c: Likewise.
	* event-loop.c: Likewise.
	* exceptions.c: Likewise.
	* exec.c: Likewise.
	* expprint.c: Likewise.
	* f-exp.y: Likewise.
	* f-lang.c: Likewise.
	* f-typeprint.c: Likewise.
	* f-valprint.c: Likewise.
	* fbsd-nat.c: Likewise.
	* findcmd.c: Likewise.
	* findvar.c: Likewise.
	* fork-child.c: Likewise.
	* frame.c: Likewise.
	* frv-linux-tdep.c: Likewise.
	* frv-tdep.c: Likewise.
	* gdb.c: Likewise.
	* gdb_bfd.c: Likewise.
	* gdbarch.c: Likewise.
	* gdbarch.sh: Likewise.
	* gdbtypes.c: Likewise.
	* gnu-nat.c: Likewise.
	* gnu-v2-abi.c: Likewise.
	* gnu-v3-abi.c: Likewise.
	* go-exp.y: Likewise.
	* go-lang.c: Likewise.
	* go32-nat.c: Likewise.
	* guile/guile.c: Likewise.
	* guile/scm-auto-load.c: Likewise.
	* hppa-hpux-tdep.c: Likewise.
	* hppa-linux-nat.c: Likewise.
	* hppanbsd-tdep.c: Likewise.
	* hppaobsd-tdep.c: Likewise.
	* i386-cygwin-tdep.c: Likewise.
	* i386-dicos-tdep.c: Likewise.
	* i386-linux-tdep.c: Likewise.
	* i386-nto-tdep.c: Likewise.
	* i386-sol2-tdep.c: Likewise.
	* i386-tdep.c: Likewise.
	* i386bsd-tdep.c: Likewise.
	* i386gnu-nat.c: Likewise.
	* i386nbsd-tdep.c: Likewise.
	* i386obsd-tdep.c: Likewise.
	* i387-tdep.c: Likewise.
	* ia64-libunwind-tdep.c: Likewise.
	* ia64-linux-nat.c: Likewise.
	* inf-child.c: Likewise.
	* inf-ptrace.c: Likewise.
	* inf-ttrace.c: Likewise.
	* infcall.c: Likewise.
	* infcmd.c: Likewise.
	* inflow.c: Likewise.
	* infrun.c: Likewise.
	* interps.c: Likewise.
	* iq2000-tdep.c: Likewise.
	* irix5-nat.c: Likewise.
	* jv-exp.y: Likewise.
	* jv-lang.c: Likewise.
	* jv-typeprint.c: Likewise.
	* jv-valprint.c: Likewise.
	* language.c: Likewise.
	* linux-fork.c: Likewise.
	* linux-nat.c: Likewise.
	* lm32-tdep.c: Likewise.
	* m2-exp.y: Likewise.
	* m2-typeprint.c: Likewise.
	* m32c-tdep.c: Likewise.
	* m32r-linux-nat.c: Likewise.
	* m32r-linux-tdep.c: Likewise.
	* m32r-rom.c: Likewise.
	* m32r-tdep.c: Likewise.
	* m68hc11-tdep.c: Likewise.
	* m68k-tdep.c: Likewise.
	* m68kbsd-tdep.c: Likewise.
	* m68klinux-nat.c: Likewise.
	* m68klinux-tdep.c: Likewise.
	* m88k-tdep.c: Likewise.
	* machoread.c: Likewise.
	* macrocmd.c: Likewise.
	* main.c: Likewise.
	* mdebugread.c: Likewise.
	* mem-break.c: Likewise.
	* memattr.c: Likewise.
	* memory-map.c: Likewise.
	* mep-tdep.c: Likewise.
	* mi/mi-cmd-break.c: Likewise.
	* mi/mi-cmd-disas.c: Likewise.
	* mi/mi-cmd-env.c: Likewise.
	* mi/mi-cmd-stack.c: Likewise.
	* mi/mi-cmd-var.c: Likewise.
	* mi/mi-cmds.c: Likewise.
	* mi/mi-console.c: Likewise.
	* mi/mi-getopt.c: Likewise.
	* mi/mi-interp.c: Likewise.
	* mi/mi-main.c: Likewise.
	* mi/mi-parse.c: Likewise.
	* microblaze-rom.c: Likewise.
	* microblaze-tdep.c: Likewise.
	* mingw-hdep.c: Likewise.
	* minidebug.c: Likewise.
	* minsyms.c: Likewise.
	* mips-irix-tdep.c: Likewise.
	* mips-linux-tdep.c: Likewise.
	* mips-tdep.c: Likewise.
	* mips64obsd-tdep.c: Likewise.
	* mipsnbsd-tdep.c: Likewise.
	* mipsread.c: Likewise.
	* mn10300-linux-tdep.c: Likewise.
	* mn10300-tdep.c: Likewise.
	* monitor.c: Likewise.
	* moxie-tdep.c: Likewise.
	* mt-tdep.c: Likewise.
	* nat/linux-btrace.c: Likewise.
	* nat/linux-osdata.c: Likewise.
	* nat/linux-procfs.c: Likewise.
	* nat/linux-ptrace.c: Likewise.
	* nat/linux-waitpid.c: Likewise.
	* nbsd-tdep.c: Likewise.
	* nios2-linux-tdep.c: Likewise.
	* nto-procfs.c: Likewise.
	* nto-tdep.c: Likewise.
	* objc-lang.c: Likewise.
	* objfiles.c: Likewise.
	* opencl-lang.c: Likewise.
	* osabi.c: Likewise.
	* osdata.c: Likewise.
	* p-exp.y: Likewise.
	* p-lang.c: Likewise.
	* p-typeprint.c: Likewise.
	* parse.c: Likewise.
	* posix-hdep.c: Likewise.
	* ppc-linux-nat.c: Likewise.
	* ppc-sysv-tdep.c: Likewise.
	* ppcfbsd-tdep.c: Likewise.
	* ppcnbsd-tdep.c: Likewise.
	* ppcobsd-tdep.c: Likewise.
	* printcmd.c: Likewise.
	* procfs.c: Likewise.
	* prologue-value.c: Likewise.
	* python/py-auto-load.c: Likewise.
	* python/py-gdb-readline.c: Likewise.
	* ravenscar-thread.c: Likewise.
	* regcache.c: Likewise.
	* registry.c: Likewise.
	* remote-fileio.c: Likewise.
	* remote-m32r-sdi.c: Likewise.
	* remote-mips.c: Likewise.
	* remote-notif.c: Likewise.
	* remote-sim.c: Likewise.
	* remote.c: Likewise.
	* reverse.c: Likewise.
	* rs6000-aix-tdep.c: Likewise.
	* ser-base.c: Likewise.
	* ser-go32.c: Likewise.
	* ser-mingw.c: Likewise.
	* ser-pipe.c: Likewise.
	* ser-tcp.c: Likewise.
	* ser-unix.c: Likewise.
	* serial.c: Likewise.
	* sh-tdep.c: Likewise.
	* sh64-tdep.c: Likewise.
	* shnbsd-tdep.c: Likewise.
	* skip.c: Likewise.
	* sol-thread.c: Likewise.
	* solib-dsbt.c: Likewise.
	* solib-frv.c: Likewise.
	* solib-osf.c: Likewise.
	* solib-som.c: Likewise.
	* solib-spu.c: Likewise.
	* solib-target.c: Likewise.
	* solib.c: Likewise.
	* somread.c: Likewise.
	* source.c: Likewise.
	* sparc-nat.c: Likewise.
	* sparc-sol2-tdep.c: Likewise.
	* sparc-tdep.c: Likewise.
	* sparc64-tdep.c: Likewise.
	* sparc64fbsd-tdep.c: Likewise.
	* sparc64nbsd-tdep.c: Likewise.
	* sparcnbsd-tdep.c: Likewise.
	* spu-linux-nat.c: Likewise.
	* spu-multiarch.c: Likewise.
	* spu-tdep.c: Likewise.
	* stabsread.c: Likewise.
	* stack.c: Likewise.
	* std-regs.c: Likewise.
	* symfile.c: Likewise.
	* symmisc.c: Likewise.
	* symtab.c: Likewise.
	* target.c: Likewise.
	* thread.c: Likewise.
	* tilegx-linux-nat.c: Likewise.
	* tilegx-tdep.c: Likewise.
	* top.c: Likewise.
	* tracepoint.c: Likewise.
	* tui/tui-command.c: Likewise.
	* tui/tui-data.c: Likewise.
	* tui/tui-disasm.c: Likewise.
	* tui/tui-file.c: Likewise.
	* tui/tui-layout.c: Likewise.
	* tui/tui-out.c: Likewise.
	* tui/tui-regs.c: Likewise.
	* tui/tui-source.c: Likewise.
	* tui/tui-stack.c: Likewise.
	* tui/tui-win.c: Likewise.
	* tui/tui-windata.c: Likewise.
	* tui/tui-winsource.c: Likewise.
	* typeprint.c: Likewise.
	* ui-file.c: Likewise.
	* ui-out.c: Likewise.
	* user-regs.c: Likewise.
	* utils.c: Likewise.
	* v850-tdep.c: Likewise.
	* valarith.c: Likewise.
	* valops.c: Likewise.
	* valprint.c: Likewise.
	* value.c: Likewise.
	* varobj.c: Likewise.
	* vax-tdep.c: Likewise.
	* vaxnbsd-tdep.c: Likewise.
	* vaxobsd-tdep.c: Likewise.
	* windows-nat.c: Likewise.
	* xcoffread.c: Likewise.
	* xml-support.c: Likewise.
	* xstormy16-tdep.c: Likewise.
	* xtensa-linux-nat.c: Likewise.

gdb/gdbserver/
2014-08-07  Gary Benson  <gbenson@redhat.com>

	* server.h: Do not include string.h.
	* event-loop.c: Likewise.
	* linux-low.c: Likewise.
	* regcache.c: Likewise.
	* remote-utils.c: Likewise.
	* spu-low.c: Likewise.
	* utils.c: Likewise.
2014-08-07 09:06:47 +01:00
Gary Benson dccbb60975 Include gdb_assert.h in common-defs.h
This commit includes gdb_assert.h in common-defs.h and removes all
other inclusions.

gdb/
2014-08-07  Gary Benson  <gbenson@redhat.com>

	* common/common-defs.h: Include gdb_assert.h.
	* aarch64-tdep.c: Do not include gdb_assert.h.
	* addrmap.c: Likewise.
	* aix-thread.c: Likewise.
	* alpha-linux-tdep.c: Likewise.
	* alpha-mdebug-tdep.c: Likewise.
	* alphanbsd-tdep.c: Likewise.
	* amd64-nat.c: Likewise.
	* amd64-tdep.c: Likewise.
	* amd64bsd-nat.c: Likewise.
	* amd64fbsd-nat.c: Likewise.
	* amd64fbsd-tdep.c: Likewise.
	* amd64nbsd-nat.c: Likewise.
	* amd64nbsd-tdep.c: Likewise.
	* amd64obsd-nat.c: Likewise.
	* amd64obsd-tdep.c: Likewise.
	* arch-utils.c: Likewise.
	* arm-tdep.c: Likewise.
	* armbsd-tdep.c: Likewise.
	* auxv.c: Likewise.
	* bcache.c: Likewise.
	* bfin-tdep.c: Likewise.
	* blockframe.c: Likewise.
	* breakpoint.c: Likewise.
	* bsd-kvm.c: Likewise.
	* bsd-uthread.c: Likewise.
	* buildsym.c: Likewise.
	* c-exp.y: Likewise.
	* c-lang.c: Likewise.
	* charset.c: Likewise.
	* cleanups.c: Likewise.
	* cli-out.c: Likewise.
	* cli/cli-decode.c: Likewise.
	* cli/cli-dump.c: Likewise.
	* cli/cli-logging.c: Likewise.
	* cli/cli-script.c: Likewise.
	* cli/cli-utils.c: Likewise.
	* coffread.c: Likewise.
	* common/common-utils.c: Likewise.
	* common/queue.h: Likewise.
	* common/signals.c: Likewise.
	* common/vec.h: Likewise.
	* complaints.c: Likewise.
	* completer.c: Likewise.
	* corelow.c: Likewise.
	* cp-abi.c: Likewise.
	* cp-name-parser.y: Likewise.
	* cp-namespace.c: Likewise.
	* cp-support.c: Likewise.
	* cris-tdep.c: Likewise.
	* dbxread.c: Likewise.
	* dictionary.c: Likewise.
	* doublest.c: Likewise.
	* dsrec.c: Likewise.
	* dummy-frame.c: Likewise.
	* dwarf2-frame-tailcall.c: Likewise.
	* dwarf2-frame.c: Likewise.
	* dwarf2expr.c: Likewise.
	* dwarf2loc.c: Likewise.
	* dwarf2read.c: Likewise.
	* eval.c: Likewise.
	* event-loop.c: Likewise.
	* exceptions.c: Likewise.
	* expprint.c: Likewise.
	* f-valprint.c: Likewise.
	* fbsd-nat.c: Likewise.
	* findvar.c: Likewise.
	* frame-unwind.c: Likewise.
	* frame.c: Likewise.
	* frv-tdep.c: Likewise.
	* gcore.c: Likewise.
	* gdb-dlfcn.c: Likewise.
	* gdb_bfd.c: Likewise.
	* gdbarch.c: Likewise.
	* gdbarch.sh: Likewise.
	* gdbtypes.c: Likewise.
	* gnu-nat.c: Likewise.
	* gnu-v3-abi.c: Likewise.
	* go-lang.c: Likewise.
	* guile/scm-exception.c: Likewise.
	* guile/scm-gsmob.c: Likewise.
	* guile/scm-lazy-string.c: Likewise.
	* guile/scm-math.c: Likewise.
	* guile/scm-pretty-print.c: Likewise.
	* guile/scm-safe-call.c: Likewise.
	* guile/scm-utils.c: Likewise.
	* guile/scm-value.c: Likewise.
	* h8300-tdep.c: Likewise.
	* hppa-hpux-nat.c: Likewise.
	* hppa-tdep.c: Likewise.
	* hppanbsd-tdep.c: Likewise.
	* hppaobsd-tdep.c: Likewise.
	* i386-darwin-nat.c: Likewise.
	* i386-darwin-tdep.c: Likewise.
	* i386-nto-tdep.c: Likewise.
	* i386-tdep.c: Likewise.
	* i386bsd-nat.c: Likewise.
	* i386fbsd-tdep.c: Likewise.
	* i386gnu-nat.c: Likewise.
	* i386nbsd-tdep.c: Likewise.
	* i386obsd-tdep.c: Likewise.
	* i387-tdep.c: Likewise.
	* ia64-libunwind-tdep.c: Likewise.
	* ia64-tdep.c: Likewise.
	* inf-ptrace.c: Likewise.
	* inf-ttrace.c: Likewise.
	* infcall.c: Likewise.
	* infcmd.c: Likewise.
	* infrun.c: Likewise.
	* inline-frame.c: Likewise.
	* interps.c: Likewise.
	* jv-lang.c: Likewise.
	* jv-typeprint.c: Likewise.
	* linux-fork.c: Likewise.
	* linux-nat.c: Likewise.
	* linux-thread-db.c: Likewise.
	* m32c-tdep.c: Likewise.
	* m32r-linux-nat.c: Likewise.
	* m32r-tdep.c: Likewise.
	* m68k-tdep.c: Likewise.
	* m68kbsd-nat.c: Likewise.
	* m68kbsd-tdep.c: Likewise.
	* m88k-tdep.c: Likewise.
	* machoread.c: Likewise.
	* macroexp.c: Likewise.
	* macrotab.c: Likewise.
	* maint.c: Likewise.
	* mdebugread.c: Likewise.
	* memory-map.c: Likewise.
	* mep-tdep.c: Likewise.
	* mi/mi-common.c: Likewise.
	* microblaze-tdep.c: Likewise.
	* mingw-hdep.c: Likewise.
	* mips-linux-nat.c: Likewise.
	* mips-linux-tdep.c: Likewise.
	* mips-tdep.c: Likewise.
	* mips64obsd-tdep.c: Likewise.
	* mipsnbsd-tdep.c: Likewise.
	* mn10300-linux-tdep.c: Likewise.
	* mn10300-tdep.c: Likewise.
	* moxie-tdep.c: Likewise.
	* mt-tdep.c: Likewise.
	* nat/linux-btrace.c: Likewise.
	* nat/linux-osdata.c: Likewise.
	* nat/linux-ptrace.c: Likewise.
	* nat/mips-linux-watch.c: Likewise.
	* nios2-linux-tdep.c: Likewise.
	* nios2-tdep.c: Likewise.
	* objc-lang.c: Likewise.
	* objfiles.c: Likewise.
	* obsd-nat.c: Likewise.
	* opencl-lang.c: Likewise.
	* osabi.c: Likewise.
	* parse.c: Likewise.
	* ppc-linux-nat.c: Likewise.
	* ppc-sysv-tdep.c: Likewise.
	* ppcfbsd-nat.c: Likewise.
	* ppcfbsd-tdep.c: Likewise.
	* ppcnbsd-nat.c: Likewise.
	* ppcnbsd-tdep.c: Likewise.
	* ppcobsd-nat.c: Likewise.
	* ppcobsd-tdep.c: Likewise.
	* printcmd.c: Likewise.
	* procfs.c: Likewise.
	* prologue-value.c: Likewise.
	* psymtab.c: Likewise.
	* python/py-lazy-string.c: Likewise.
	* python/py-value.c: Likewise.
	* regcache.c: Likewise.
	* reggroups.c: Likewise.
	* registry.c: Likewise.
	* remote-sim.c: Likewise.
	* remote.c: Likewise.
	* rs6000-aix-tdep.c: Likewise.
	* rs6000-tdep.c: Likewise.
	* s390-linux-tdep.c: Likewise.
	* score-tdep.c: Likewise.
	* ser-base.c: Likewise.
	* ser-mingw.c: Likewise.
	* sh-tdep.c: Likewise.
	* sh64-tdep.c: Likewise.
	* solib-darwin.c: Likewise.
	* solib-spu.c: Likewise.
	* solib-svr4.c: Likewise.
	* source.c: Likewise.
	* sparc-nat.c: Likewise.
	* sparc-sol2-tdep.c: Likewise.
	* sparc-tdep.c: Likewise.
	* sparc64-sol2-tdep.c: Likewise.
	* sparc64-tdep.c: Likewise.
	* sparc64fbsd-tdep.c: Likewise.
	* sparc64nbsd-tdep.c: Likewise.
	* sparc64obsd-tdep.c: Likewise.
	* sparcnbsd-tdep.c: Likewise.
	* sparcobsd-tdep.c: Likewise.
	* spu-multiarch.c: Likewise.
	* spu-tdep.c: Likewise.
	* stabsread.c: Likewise.
	* stack.c: Likewise.
	* symfile.c: Likewise.
	* symtab.c: Likewise.
	* target-descriptions.c: Likewise.
	* target-memory.c: Likewise.
	* target.c: Likewise.
	* tic6x-linux-tdep.c: Likewise.
	* tic6x-tdep.c: Likewise.
	* tilegx-linux-nat.c: Likewise.
	* tilegx-tdep.c: Likewise.
	* top.c: Likewise.
	* tramp-frame.c: Likewise.
	* tui/tui-out.c: Likewise.
	* tui/tui-winsource.c: Likewise.
	* ui-out.c: Likewise.
	* user-regs.c: Likewise.
	* utils.c: Likewise.
	* v850-tdep.c: Likewise.
	* valops.c: Likewise.
	* value.c: Likewise.
	* varobj.c: Likewise.
	* vax-nat.c: Likewise.
	* xml-syscall.c: Likewise.
	* xml-tdesc.c: Likewise.
	* xstormy16-tdep.c: Likewise.
	* xtensa-linux-nat.c: Likewise.
	* xtensa-tdep.c: Likewise.

gdb/gdbserver/
2014-08-07  Gary Benson  <gbenson@redhat.com>

	* server.h: Do not include gdb_assert.h.
2014-08-07 09:06:45 +01:00
Edjunior Barbosa Machado 572f65559b 2014-07-14 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
* ppc-linux-nat.c (ppc_linux_can_use_hw_breakpoint): Report no hardware
	breakpoint support correctly.
2014-07-14 20:18:10 -03:00
Tom Tromey c3a5ff8963 Add target_ops argument to to_can_accel_watchpoint_condition
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops)
	<to_can_accel_watchpoint_condition>: Add argument.
	(target_can_accel_watchpoint_condition): Add argument.
	* target.c (debug_to_can_accel_watchpoint_condition): Add
	argument.
	(update_current_target): Update.
	* ppc-linux-nat.c (ppc_linux_can_accel_watchpoint_condition): Add
	'self' argument.
2014-02-19 07:45:36 -07:00
Tom Tromey 31568a15a2 Add target_ops argument to to_region_ok_for_hw_watchpoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_region_ok_for_hw_watchpoint>:
	Add argument.
	(target_region_ok_for_hw_watchpoint): Add argument.
	* target.c (debug_to_region_ok_for_hw_watchpoint): Add argument.
	(default_region_ok_for_hw_watchpoint): Add argument.
	* spu-multiarch.c (spu_region_ok_for_hw_watchpoint): Add argument.
	* s390-linux-nat.c (s390_region_ok_for_hw_watchpoint): Add 'self'
	argument.
	* remote.c (remote_region_ok_for_hw_watchpoint): Add 'self'
	argument.
	* procfs.c (procfs_region_ok_for_hw_watchpoint): Add 'self'
	argument.
	* ppc-linux-nat.c (ppc_linux_region_ok_for_hw_watchpoint): Add
	'self' argument.
	* mips-linux-nat.c (mips_linux_region_ok_for_hw_watchpoint): Add
	'self' argument.
	* inf-ttrace.c (inf_ttrace_region_ok_for_hw_watchpoint): Add
	'self' argument.
	* i386-nat.c (i386_region_ok_for_watchpoint): Add 'self' argument.
	* arm-linux-nat.c (arm_linux_region_ok_for_hw_watchpoint): Add
	'self' argument.
	* aarch64-linux-nat.c (aarch64_linux_region_ok_for_hw_watchpoint):
	Add 'self' argument.
2014-02-19 07:45:35 -07:00
Tom Tromey 7bb99c5383 Add target_ops argument to to_insert_watchpoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_insert_watchpoint>: Add
	argument.
	(target_insert_watchpoint): Add argument.
	* target.c (debug_to_insert_watchpoint): Add argument.
	(update_current_target): Update.
	* s390-linux-nat.c (s390_insert_watchpoint): Add 'self' argument.
	* remote.c (remote_insert_watchpoint): Add 'self' argument.
	* remote-mips.c (mips_insert_watchpoint): Add 'self' argument.
	* remote-m32r-sdi.c (m32r_insert_watchpoint): Add 'self' argument.
	* procfs.c (procfs_insert_watchpoint): Add 'self' argument.
	* ppc-linux-nat.c (ppc_linux_insert_watchpoint): Add 'self'
	argument.
	* nto-procfs.c (procfs_insert_hw_watchpoint): Add 'self' argument.
	(procfs_insert_hw_watchpoint): Add 'self' argument.
	* mips-linux-nat.c (mips_linux_insert_watchpoint): Add 'self'
	argument.
	* inf-ttrace.c (inf_ttrace_insert_watchpoint): Add 'self'
	argument.
	* ia64-linux-nat.c (ia64_linux_insert_watchpoint): Add 'self'
	argument.
	* i386-nat.c (i386_insert_watchpoint): Add 'self' argument.
	* arm-linux-nat.c (arm_linux_insert_watchpoint): Add 'self'
	argument.
	* aarch64-linux-nat.c (aarch64_linux_insert_watchpoint): Add
	'self' argument.
2014-02-19 07:45:34 -07:00
Tom Tromey 11b5219af5 Add target_ops argument to to_remove_watchpoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_remove_watchpoint>: Add
	argument.
	(target_remove_watchpoint): Add argument.
	* target.c (debug_to_remove_watchpoint): Add argument.
	(update_current_target): Update.
	* s390-linux-nat.c (s390_remove_watchpoint): Add 'self' argument.
	* remote.c (remote_remove_watchpoint): Add 'self' argument.
	* remote-mips.c (mips_remove_watchpoint): Add 'self' argument.
	* remote-m32r-sdi.c (m32r_remove_watchpoint): Add 'self' argument.
	* procfs.c (procfs_remove_watchpoint): Add 'self' argument.
	* ppc-linux-nat.c (ppc_linux_remove_watchpoint): Add 'self'
	argument.
	* nto-procfs.c (procfs_remove_hw_watchpoint): Add 'self' argument.
	* mips-linux-nat.c (mips_linux_remove_watchpoint): Add 'self'
	argument.
	* inf-ttrace.c (inf_ttrace_remove_watchpoint): Add 'self'
	argument.
	* ia64-linux-nat.c (ia64_linux_remove_watchpoint): Add 'self'
	argument.
	* i386-nat.c (i386_remove_watchpoint): Add 'self' argument.
	* arm-linux-nat.c (arm_linux_remove_watchpoint): Add 'self'
	argument.
	* aarch64-linux-nat.c (aarch64_linux_remove_watchpoint): Add
	'self' argument.
2014-02-19 07:45:33 -07:00
Tom Tromey a64dc96c25 Add target_ops argument to to_remove_hw_breakpoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_remove_hw_breakpoint>: Add
	argument.
	(target_remove_hw_breakpoint): Add argument.
	* target.c (debug_to_remove_hw_breakpoint): Add argument.
	(update_current_target): Update.
	* remote.c (remote_remove_hw_breakpoint): Add 'self' argument.
	* ppc-linux-nat.c (ppc_linux_remove_hw_breakpoint): Add 'self'
	argument.
	* i386-nat.c (i386_remove_hw_breakpoint): Add 'self' argument.
	* arm-linux-nat.c (arm_linux_remove_hw_breakpoint): Add 'self'
	argument.
	* aarch64-linux-nat.c (aarch64_linux_remove_hw_breakpoint): Add
	'self' argument.
2014-02-19 07:45:32 -07:00
Tom Tromey 23a267714b Add target_ops argument to to_insert_hw_breakpoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_insert_hw_breakpoint>: Add
	argument.
	(target_insert_hw_breakpoint): Add argument.
	* target.c (debug_to_insert_hw_breakpoint): Add argument.
	(update_current_target): Update.
	* remote.c (remote_insert_hw_breakpoint): Add 'self' argument.
	* ppc-linux-nat.c (ppc_linux_insert_hw_breakpoint): Add 'self'
	argument.
	* nto-procfs.c (procfs_insert_hw_breakpoint): Add 'self' argument.
	* i386-nat.c (i386_insert_hw_breakpoint): Add 'self' argument.
	* arm-linux-nat.c (arm_linux_insert_hw_breakpoint): Add 'self'
	argument.
	* aarch64-linux-nat.c (aarch64_linux_insert_hw_breakpoint): Add
	'self' argument.
2014-02-19 07:45:31 -07:00
Tom Tromey 5461485a87 Add target_ops argument to to_can_use_hw_breakpoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_can_use_hw_breakpoint>: Add
	argument.
	(target_can_use_hardware_watchpoint): Add argument.
	* target.c (debug_to_can_use_hw_breakpoint): Add argument.
	(update_current_target): Update.
	* spu-linux-nat.c (spu_can_use_hw_breakpoint): Add 'self'
	argument.
	* s390-linux-nat.c (s390_can_use_hw_breakpoint): Add 'self'
	argument.
	* remote.c (remote_check_watch_resources): Add 'self' argument.
	* remote-mips.c (mips_can_use_watchpoint): Add 'self' argument.
	* remote-m32r-sdi.c (m32r_can_use_hw_watchpoint): Add 'self'
	argument.
	* procfs.c (procfs_can_use_hw_breakpoint): Add 'self' argument.
	* ppc-linux-nat.c (ppc_linux_can_use_hw_breakpoint): Add 'self'
	argument.
	* nto-procfs.c (procfs_can_use_hw_breakpoint): Add 'self'
	argument.
	* mips-linux-nat.c (mips_linux_can_use_hw_breakpoint): Add 'self'
	argument.
	* inf-ttrace.c (inf_ttrace_can_use_hw_breakpoint): Add 'self'
	argument.
	* ia64-linux-nat.c (ia64_linux_can_use_hw_breakpoint): Add 'self'
	argument.
	* ia64-hpux-nat.c (ia64_hpux_can_use_hw_breakpoint): Add 'self'
	argument.
	* i386-nat.c (i386_can_use_hw_breakpoint): Add 'self' argument.
	* arm-linux-nat.c (arm_linux_can_use_hw_breakpoint): Add 'self'
	argument.
	* aarch64-linux-nat.c (aarch64_linux_can_use_hw_breakpoint): Add
	'self' argument.
2014-02-19 07:45:30 -07:00
Tom Tromey 6a109b6b2c add "this" pointers to more target APIs
A subsequent pass introduces delegation helper functions to the target
API.  This delegation is much cleaner if the target_ops pointer is
directly available at delegation time.

This patch adds the "this" pointer to various to_* methods for this
purpose.

This updates a number of ports which I am unable to test.  Please give
them a look-over.  Any possible problem here is trivial, though, as
all that is required is adding an argument to a function.

2014-02-19  Tom Tromey  <tromey@redhat.com>

	* aarch64-linux-nat.c (aarch64_linux_stopped_by_watchpoint):
	Add 'ops' argument.
	* arm-linux-nat.c (arm_linux_stopped_by_watchpoint): Add
	'ops' argument.
	* i386-nat.c (i386_stopped_by_watchpoint): Add 'ops' argument.
	* ia64-linux-nat.c (ia64_linux_stopped_by_watchpoint): Add
	'ops' argument.
	* inf-ttrace.c (inf_ttrace_stopped_by_watchpoint): Add 'ops'
	argument.
	* linux-nat.c (save_sigtrap): Update.
	(linux_nat_stopped_by_watchpoint, linux_nat_is_async_p)
	(linux_nat_can_async_p, linux_nat_async): Add 'ops' argument.
	(linux_nat_close): Update.
	* mips-linux-nat.c (mips_linux_stopped_by_watchpoint): Add 'ops'
	argument.
	* ppc-linux-nat.c (ppc_linux_stopped_by_watchpoint): Add 'ops'
	argument.
	* procfs.c (procfs_stopped_by_watchpoint): Add 'ops' argument.
	* record-full.c (record_full_beneath_to_stopped_by_watchpoint)
	(record_full_beneath_to_async, tmp_to_stopped_by_watchpoint)
	(tmp_to_async): Add 'ops' argument.
	(record_full_stopped_by_watchpoint, record_full_async)
	(record_full_can_async_p, record_full_is_async_p): Add 'ops'
	argument.
	* remote-m32r-sdi.c (m32r_insert_breakpoint, m32r_remove_breakpoint)
	(m32r_stopped_by_watchpoint): Add 'ops' argument.
	* remote-mips.c	(mips_stopped_by_watchpoint): Add 'ops' argument.
	* remote.c (remote_stopped_by_watchpoint_p, remote_can_async_p)
	(remote_is_async_p, remote_async): Add 'ops' argument.
	(remote_stopped_data_address): Update.
	* s390-nat.c (s390_stopped_by_watchpoint): Add 'ops' argument.
	* target.c (update_current_target)
	(find_default_can_async_p, find_default_is_async_p): Update.
	(init_dummy_target): Update.
	(debug_to_stopped_by_watchpoint): Add 'ops' argument.
	* target.h (struct target_ops) <to_stopped_by_watchpoint,
	to_can_async_p, to_is_async_p, to_async>: Add 'ops' argument.
	(target_can_async_p, target_is_async_p, target_async)
	(target_stopped_by_watchpoint): Update.
2014-02-19 07:45:20 -07:00
Joel Brobecker ecd75fc8ee Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
Tom Tromey 0e9f083f4c remove gdb_string.h
This removes gdb_string.h.  This patch is purely mechanical.  I
created it by running the two commands:

    git rm common/gdb_string.h
    perl -pi -e's/"gdb_string.h"/<string.h>/;'  *.[chyl] */*.[chyl]

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* common/gdb_string.h: Remove.
	* aarch64-tdep.c: Use string.h, not gdb_string.h.
	* ada-exp.y: Use string.h, not gdb_string.h.
	* ada-lang.c: Use string.h, not gdb_string.h.
	* ada-lex.l: Use string.h, not gdb_string.h.
	* ada-typeprint.c: Use string.h, not gdb_string.h.
	* ada-valprint.c: Use string.h, not gdb_string.h.
	* aix-thread.c: Use string.h, not gdb_string.h.
	* alpha-linux-tdep.c: Use string.h, not gdb_string.h.
	* alpha-mdebug-tdep.c: Use string.h, not gdb_string.h.
	* alpha-nat.c: Use string.h, not gdb_string.h.
	* alpha-osf1-tdep.c: Use string.h, not gdb_string.h.
	* alpha-tdep.c: Use string.h, not gdb_string.h.
	* alphanbsd-tdep.c: Use string.h, not gdb_string.h.
	* amd64-dicos-tdep.c: Use string.h, not gdb_string.h.
	* amd64-linux-nat.c: Use string.h, not gdb_string.h.
	* amd64-linux-tdep.c: Use string.h, not gdb_string.h.
	* amd64-nat.c: Use string.h, not gdb_string.h.
	* amd64-sol2-tdep.c: Use string.h, not gdb_string.h.
	* amd64fbsd-tdep.c: Use string.h, not gdb_string.h.
	* amd64obsd-tdep.c: Use string.h, not gdb_string.h.
	* arch-utils.c: Use string.h, not gdb_string.h.
	* arm-linux-nat.c: Use string.h, not gdb_string.h.
	* arm-linux-tdep.c: Use string.h, not gdb_string.h.
	* arm-tdep.c: Use string.h, not gdb_string.h.
	* arm-wince-tdep.c: Use string.h, not gdb_string.h.
	* armbsd-tdep.c: Use string.h, not gdb_string.h.
	* armnbsd-nat.c: Use string.h, not gdb_string.h.
	* armnbsd-tdep.c: Use string.h, not gdb_string.h.
	* armobsd-tdep.c: Use string.h, not gdb_string.h.
	* avr-tdep.c: Use string.h, not gdb_string.h.
	* ax-gdb.c: Use string.h, not gdb_string.h.
	* ax-general.c: Use string.h, not gdb_string.h.
	* bcache.c: Use string.h, not gdb_string.h.
	* bfin-tdep.c: Use string.h, not gdb_string.h.
	* breakpoint.c: Use string.h, not gdb_string.h.
	* build-id.c: Use string.h, not gdb_string.h.
	* buildsym.c: Use string.h, not gdb_string.h.
	* c-exp.y: Use string.h, not gdb_string.h.
	* c-lang.c: Use string.h, not gdb_string.h.
	* c-typeprint.c: Use string.h, not gdb_string.h.
	* c-valprint.c: Use string.h, not gdb_string.h.
	* charset.c: Use string.h, not gdb_string.h.
	* cli-out.c: Use string.h, not gdb_string.h.
	* cli/cli-cmds.c: Use string.h, not gdb_string.h.
	* cli/cli-decode.c: Use string.h, not gdb_string.h.
	* cli/cli-dump.c: Use string.h, not gdb_string.h.
	* cli/cli-interp.c: Use string.h, not gdb_string.h.
	* cli/cli-logging.c: Use string.h, not gdb_string.h.
	* cli/cli-script.c: Use string.h, not gdb_string.h.
	* cli/cli-setshow.c: Use string.h, not gdb_string.h.
	* cli/cli-utils.c: Use string.h, not gdb_string.h.
	* coffread.c: Use string.h, not gdb_string.h.
	* common/common-utils.c: Use string.h, not gdb_string.h.
	* common/filestuff.c: Use string.h, not gdb_string.h.
	* common/linux-procfs.c: Use string.h, not gdb_string.h.
	* common/linux-ptrace.c: Use string.h, not gdb_string.h.
	* common/signals.c: Use string.h, not gdb_string.h.
	* common/vec.h: Use string.h, not gdb_string.h.
	* core-regset.c: Use string.h, not gdb_string.h.
	* corefile.c: Use string.h, not gdb_string.h.
	* corelow.c: Use string.h, not gdb_string.h.
	* cp-abi.c: Use string.h, not gdb_string.h.
	* cp-support.c: Use string.h, not gdb_string.h.
	* cp-valprint.c: Use string.h, not gdb_string.h.
	* cris-tdep.c: Use string.h, not gdb_string.h.
	* d-lang.c: Use string.h, not gdb_string.h.
	* dbxread.c: Use string.h, not gdb_string.h.
	* dcache.c: Use string.h, not gdb_string.h.
	* demangle.c: Use string.h, not gdb_string.h.
	* dicos-tdep.c: Use string.h, not gdb_string.h.
	* disasm.c: Use string.h, not gdb_string.h.
	* doublest.c: Use string.h, not gdb_string.h.
	* dsrec.c: Use string.h, not gdb_string.h.
	* dummy-frame.c: Use string.h, not gdb_string.h.
	* dwarf2-frame.c: Use string.h, not gdb_string.h.
	* dwarf2loc.c: Use string.h, not gdb_string.h.
	* dwarf2read.c: Use string.h, not gdb_string.h.
	* elfread.c: Use string.h, not gdb_string.h.
	* environ.c: Use string.h, not gdb_string.h.
	* eval.c: Use string.h, not gdb_string.h.
	* event-loop.c: Use string.h, not gdb_string.h.
	* exceptions.c: Use string.h, not gdb_string.h.
	* exec.c: Use string.h, not gdb_string.h.
	* expprint.c: Use string.h, not gdb_string.h.
	* f-exp.y: Use string.h, not gdb_string.h.
	* f-lang.c: Use string.h, not gdb_string.h.
	* f-typeprint.c: Use string.h, not gdb_string.h.
	* f-valprint.c: Use string.h, not gdb_string.h.
	* fbsd-nat.c: Use string.h, not gdb_string.h.
	* findcmd.c: Use string.h, not gdb_string.h.
	* findvar.c: Use string.h, not gdb_string.h.
	* fork-child.c: Use string.h, not gdb_string.h.
	* frame.c: Use string.h, not gdb_string.h.
	* frv-linux-tdep.c: Use string.h, not gdb_string.h.
	* frv-tdep.c: Use string.h, not gdb_string.h.
	* gdb.c: Use string.h, not gdb_string.h.
	* gdb_bfd.c: Use string.h, not gdb_string.h.
	* gdbarch.c: Use string.h, not gdb_string.h.
	* gdbtypes.c: Use string.h, not gdb_string.h.
	* gnu-nat.c: Use string.h, not gdb_string.h.
	* gnu-v2-abi.c: Use string.h, not gdb_string.h.
	* gnu-v3-abi.c: Use string.h, not gdb_string.h.
	* go-exp.y: Use string.h, not gdb_string.h.
	* go-lang.c: Use string.h, not gdb_string.h.
	* go32-nat.c: Use string.h, not gdb_string.h.
	* hppa-hpux-tdep.c: Use string.h, not gdb_string.h.
	* hppa-linux-nat.c: Use string.h, not gdb_string.h.
	* hppanbsd-tdep.c: Use string.h, not gdb_string.h.
	* hppaobsd-tdep.c: Use string.h, not gdb_string.h.
	* i386-cygwin-tdep.c: Use string.h, not gdb_string.h.
	* i386-dicos-tdep.c: Use string.h, not gdb_string.h.
	* i386-linux-nat.c: Use string.h, not gdb_string.h.
	* i386-linux-tdep.c: Use string.h, not gdb_string.h.
	* i386-nto-tdep.c: Use string.h, not gdb_string.h.
	* i386-sol2-tdep.c: Use string.h, not gdb_string.h.
	* i386-tdep.c: Use string.h, not gdb_string.h.
	* i386bsd-tdep.c: Use string.h, not gdb_string.h.
	* i386gnu-nat.c: Use string.h, not gdb_string.h.
	* i386nbsd-tdep.c: Use string.h, not gdb_string.h.
	* i386obsd-tdep.c: Use string.h, not gdb_string.h.
	* i387-tdep.c: Use string.h, not gdb_string.h.
	* ia64-libunwind-tdep.c: Use string.h, not gdb_string.h.
	* ia64-linux-nat.c: Use string.h, not gdb_string.h.
	* inf-child.c: Use string.h, not gdb_string.h.
	* inf-ptrace.c: Use string.h, not gdb_string.h.
	* inf-ttrace.c: Use string.h, not gdb_string.h.
	* infcall.c: Use string.h, not gdb_string.h.
	* infcmd.c: Use string.h, not gdb_string.h.
	* inflow.c: Use string.h, not gdb_string.h.
	* infrun.c: Use string.h, not gdb_string.h.
	* interps.c: Use string.h, not gdb_string.h.
	* iq2000-tdep.c: Use string.h, not gdb_string.h.
	* irix5-nat.c: Use string.h, not gdb_string.h.
	* jv-exp.y: Use string.h, not gdb_string.h.
	* jv-lang.c: Use string.h, not gdb_string.h.
	* jv-typeprint.c: Use string.h, not gdb_string.h.
	* jv-valprint.c: Use string.h, not gdb_string.h.
	* language.c: Use string.h, not gdb_string.h.
	* linux-fork.c: Use string.h, not gdb_string.h.
	* linux-nat.c: Use string.h, not gdb_string.h.
	* lm32-tdep.c: Use string.h, not gdb_string.h.
	* m2-exp.y: Use string.h, not gdb_string.h.
	* m2-typeprint.c: Use string.h, not gdb_string.h.
	* m32c-tdep.c: Use string.h, not gdb_string.h.
	* m32r-linux-nat.c: Use string.h, not gdb_string.h.
	* m32r-linux-tdep.c: Use string.h, not gdb_string.h.
	* m32r-rom.c: Use string.h, not gdb_string.h.
	* m32r-tdep.c: Use string.h, not gdb_string.h.
	* m68hc11-tdep.c: Use string.h, not gdb_string.h.
	* m68k-tdep.c: Use string.h, not gdb_string.h.
	* m68kbsd-tdep.c: Use string.h, not gdb_string.h.
	* m68klinux-nat.c: Use string.h, not gdb_string.h.
	* m68klinux-tdep.c: Use string.h, not gdb_string.h.
	* m88k-tdep.c: Use string.h, not gdb_string.h.
	* macrocmd.c: Use string.h, not gdb_string.h.
	* main.c: Use string.h, not gdb_string.h.
	* mdebugread.c: Use string.h, not gdb_string.h.
	* mem-break.c: Use string.h, not gdb_string.h.
	* memattr.c: Use string.h, not gdb_string.h.
	* memory-map.c: Use string.h, not gdb_string.h.
	* mep-tdep.c: Use string.h, not gdb_string.h.
	* mi/mi-cmd-break.c: Use string.h, not gdb_string.h.
	* mi/mi-cmd-disas.c: Use string.h, not gdb_string.h.
	* mi/mi-cmd-env.c: Use string.h, not gdb_string.h.
	* mi/mi-cmd-stack.c: Use string.h, not gdb_string.h.
	* mi/mi-cmd-var.c: Use string.h, not gdb_string.h.
	* mi/mi-cmds.c: Use string.h, not gdb_string.h.
	* mi/mi-console.c: Use string.h, not gdb_string.h.
	* mi/mi-getopt.c: Use string.h, not gdb_string.h.
	* mi/mi-interp.c: Use string.h, not gdb_string.h.
	* mi/mi-main.c: Use string.h, not gdb_string.h.
	* mi/mi-parse.c: Use string.h, not gdb_string.h.
	* microblaze-rom.c: Use string.h, not gdb_string.h.
	* microblaze-tdep.c: Use string.h, not gdb_string.h.
	* mingw-hdep.c: Use string.h, not gdb_string.h.
	* minidebug.c: Use string.h, not gdb_string.h.
	* minsyms.c: Use string.h, not gdb_string.h.
	* mips-irix-tdep.c: Use string.h, not gdb_string.h.
	* mips-linux-tdep.c: Use string.h, not gdb_string.h.
	* mips-tdep.c: Use string.h, not gdb_string.h.
	* mips64obsd-tdep.c: Use string.h, not gdb_string.h.
	* mipsnbsd-tdep.c: Use string.h, not gdb_string.h.
	* mipsread.c: Use string.h, not gdb_string.h.
	* mn10300-linux-tdep.c: Use string.h, not gdb_string.h.
	* mn10300-tdep.c: Use string.h, not gdb_string.h.
	* monitor.c: Use string.h, not gdb_string.h.
	* moxie-tdep.c: Use string.h, not gdb_string.h.
	* mt-tdep.c: Use string.h, not gdb_string.h.
	* nbsd-tdep.c: Use string.h, not gdb_string.h.
	* nios2-linux-tdep.c: Use string.h, not gdb_string.h.
	* nto-procfs.c: Use string.h, not gdb_string.h.
	* nto-tdep.c: Use string.h, not gdb_string.h.
	* objc-lang.c: Use string.h, not gdb_string.h.
	* objfiles.c: Use string.h, not gdb_string.h.
	* opencl-lang.c: Use string.h, not gdb_string.h.
	* osabi.c: Use string.h, not gdb_string.h.
	* osdata.c: Use string.h, not gdb_string.h.
	* p-exp.y: Use string.h, not gdb_string.h.
	* p-lang.c: Use string.h, not gdb_string.h.
	* p-typeprint.c: Use string.h, not gdb_string.h.
	* parse.c: Use string.h, not gdb_string.h.
	* posix-hdep.c: Use string.h, not gdb_string.h.
	* ppc-linux-nat.c: Use string.h, not gdb_string.h.
	* ppc-sysv-tdep.c: Use string.h, not gdb_string.h.
	* ppcfbsd-tdep.c: Use string.h, not gdb_string.h.
	* ppcnbsd-tdep.c: Use string.h, not gdb_string.h.
	* ppcobsd-tdep.c: Use string.h, not gdb_string.h.
	* printcmd.c: Use string.h, not gdb_string.h.
	* procfs.c: Use string.h, not gdb_string.h.
	* prologue-value.c: Use string.h, not gdb_string.h.
	* python/py-auto-load.c: Use string.h, not gdb_string.h.
	* python/py-gdb-readline.c: Use string.h, not gdb_string.h.
	* ravenscar-thread.c: Use string.h, not gdb_string.h.
	* regcache.c: Use string.h, not gdb_string.h.
	* registry.c: Use string.h, not gdb_string.h.
	* remote-fileio.c: Use string.h, not gdb_string.h.
	* remote-m32r-sdi.c: Use string.h, not gdb_string.h.
	* remote-mips.c: Use string.h, not gdb_string.h.
	* remote-sim.c: Use string.h, not gdb_string.h.
	* remote.c: Use string.h, not gdb_string.h.
	* reverse.c: Use string.h, not gdb_string.h.
	* rs6000-aix-tdep.c: Use string.h, not gdb_string.h.
	* ser-base.c: Use string.h, not gdb_string.h.
	* ser-go32.c: Use string.h, not gdb_string.h.
	* ser-mingw.c: Use string.h, not gdb_string.h.
	* ser-pipe.c: Use string.h, not gdb_string.h.
	* ser-tcp.c: Use string.h, not gdb_string.h.
	* ser-unix.c: Use string.h, not gdb_string.h.
	* serial.c: Use string.h, not gdb_string.h.
	* sh-tdep.c: Use string.h, not gdb_string.h.
	* sh64-tdep.c: Use string.h, not gdb_string.h.
	* shnbsd-tdep.c: Use string.h, not gdb_string.h.
	* skip.c: Use string.h, not gdb_string.h.
	* sol-thread.c: Use string.h, not gdb_string.h.
	* solib-dsbt.c: Use string.h, not gdb_string.h.
	* solib-frv.c: Use string.h, not gdb_string.h.
	* solib-osf.c: Use string.h, not gdb_string.h.
	* solib-spu.c: Use string.h, not gdb_string.h.
	* solib-target.c: Use string.h, not gdb_string.h.
	* solib.c: Use string.h, not gdb_string.h.
	* somread.c: Use string.h, not gdb_string.h.
	* source.c: Use string.h, not gdb_string.h.
	* sparc-nat.c: Use string.h, not gdb_string.h.
	* sparc-sol2-tdep.c: Use string.h, not gdb_string.h.
	* sparc-tdep.c: Use string.h, not gdb_string.h.
	* sparc64-tdep.c: Use string.h, not gdb_string.h.
	* sparc64fbsd-tdep.c: Use string.h, not gdb_string.h.
	* sparc64nbsd-tdep.c: Use string.h, not gdb_string.h.
	* sparcnbsd-tdep.c: Use string.h, not gdb_string.h.
	* spu-linux-nat.c: Use string.h, not gdb_string.h.
	* spu-multiarch.c: Use string.h, not gdb_string.h.
	* spu-tdep.c: Use string.h, not gdb_string.h.
	* stabsread.c: Use string.h, not gdb_string.h.
	* stack.c: Use string.h, not gdb_string.h.
	* std-regs.c: Use string.h, not gdb_string.h.
	* symfile.c: Use string.h, not gdb_string.h.
	* symmisc.c: Use string.h, not gdb_string.h.
	* symtab.c: Use string.h, not gdb_string.h.
	* target.c: Use string.h, not gdb_string.h.
	* thread.c: Use string.h, not gdb_string.h.
	* tilegx-linux-nat.c: Use string.h, not gdb_string.h.
	* tilegx-tdep.c: Use string.h, not gdb_string.h.
	* top.c: Use string.h, not gdb_string.h.
	* tracepoint.c: Use string.h, not gdb_string.h.
	* tui/tui-command.c: Use string.h, not gdb_string.h.
	* tui/tui-data.c: Use string.h, not gdb_string.h.
	* tui/tui-disasm.c: Use string.h, not gdb_string.h.
	* tui/tui-file.c: Use string.h, not gdb_string.h.
	* tui/tui-layout.c: Use string.h, not gdb_string.h.
	* tui/tui-out.c: Use string.h, not gdb_string.h.
	* tui/tui-regs.c: Use string.h, not gdb_string.h.
	* tui/tui-source.c: Use string.h, not gdb_string.h.
	* tui/tui-stack.c: Use string.h, not gdb_string.h.
	* tui/tui-win.c: Use string.h, not gdb_string.h.
	* tui/tui-windata.c: Use string.h, not gdb_string.h.
	* tui/tui-winsource.c: Use string.h, not gdb_string.h.
	* typeprint.c: Use string.h, not gdb_string.h.
	* ui-file.c: Use string.h, not gdb_string.h.
	* ui-out.c: Use string.h, not gdb_string.h.
	* user-regs.c: Use string.h, not gdb_string.h.
	* utils.c: Use string.h, not gdb_string.h.
	* v850-tdep.c: Use string.h, not gdb_string.h.
	* valarith.c: Use string.h, not gdb_string.h.
	* valops.c: Use string.h, not gdb_string.h.
	* valprint.c: Use string.h, not gdb_string.h.
	* value.c: Use string.h, not gdb_string.h.
	* varobj.c: Use string.h, not gdb_string.h.
	* vax-tdep.c: Use string.h, not gdb_string.h.
	* vaxnbsd-tdep.c: Use string.h, not gdb_string.h.
	* vaxobsd-tdep.c: Use string.h, not gdb_string.h.
	* windows-nat.c: Use string.h, not gdb_string.h.
	* xcoffread.c: Use string.h, not gdb_string.h.
	* xml-support.c: Use string.h, not gdb_string.h.
	* xstormy16-tdep.c: Use string.h, not gdb_string.h.
	* xtensa-linux-nat.c: Use string.h, not gdb_string.h.
2013-11-18 13:29:00 -07:00
Luis Machado dfd4cc6311 * aarch64-linux-nat.c: Replace PIDGET with ptid_get_pid.
Replace TIDGET with ptid_get_lwp.
	Replace GET_LWP with ptid_get_lwp.
	* aix-thread.c (BUILD_THREAD, BUILD_LWP): Remove.
	Replace BUILD_THREAD with ptid_build.
	Replace BUILD_LWP with ptid_build.
	Replace PIDGET with ptid_get_pid.
	Replace TIDGET with ptid_get_lwp.
	* alphabsd-nat.c: Replace PIDGET with ptid_get_pid.
	* amd64-linux-nat.c: Replace PIDGET with ptid_get_pid.
	Replace TIDGET with ptid_get_lwp.
	* amd64bsd-nat.c: Replace PIDGET with ptid_get_pid.
	* arm-linux-nat.c: Replace PIDGET with ptid_get_pid.
	Replace TIDGET with ptid_get_lwp.
	Replace GET_LWP with ptid_get_lwp.
	* armnbsd-nat.c: Replace PIDGET with ptid_get_pid.
	* auxv.c: Likewise.
	* breakpoint.c: Likewise.
	* common/ptid.c (ptid_is_pid): Condense check for
	null_ptid and minus_one_ptid.
	(ptid_lwp_p): New function.
	(ptid_tid_p): New function.
	* common/ptid.h: Update comments for accessors.
	(ptid_lwp_p): New prototype.
	(ptid_tid_p): New prototype.
	* defs.h (PIDGET, TIDGET, MERGEPID): Do not define.
	* gcore.c: Replace PIDGET with ptid_get_pid.
	* gdbthread.h: Likewise.
	* gnu-nat.c: Likewise.
	* hppa-linux-nat.c: Replace PIDGET with ptid_get_pid.
	Replace TIDGET with ptid_get_lwp.
	* hppabsd-nat.c: Replace PIDGET with ptid_get_pid.
	* hppanbsd-nat.c: Likewise.
	* i386-linux-nat.c: Replace PIDGET with ptid_get_pid.
	Replace TIDGET with ptid_get_lwp.
	* i386bsd-nat.c: Replace PIDGET with ptid_get_pid.
	* ia64-linux-nat.c: Replace PIDGET with ptid_get_pid.
	* infcmd.c: Likewise.
	* inferior.h: Likewise.
	* inflow.c: Likewise.
	* infrun.c: Likewise.
	* linux-fork.c: Likewise.
	* linux-nat.c: Replace PIDGET with ptid_get_pid.
	Replace GET_PID with ptid_get_pid.
	Replace is_lwp with ptid_lwp_p.
	Replace GET_LWP with ptid_get_lwp.
	Replace BUILD_LWP with ptid_build.
2013-09-30 11:50:12 +00:00
Tom Tromey 3a1115a0cc fix PR symtab/15719
This patch fixes PR symtab/15719.

The bug is that "watch -location" crashes on a certain expression.

The problem is that fetch_subexp_value is catching an exception.
For ordinary watchpoints this is ok; but for location watchpoints,
it is better for the exception to propagate.

Built and regtested on x86-64 Fedora 18.
New test case included.

	PR symtab/15719:
	* breakpoint.c (update_watchpoint, watchpoint_check)
	(watch_command_1): Update.
	* eval.c (fetch_subexp_value): Add "preserve_errors"
	parameter.
	* ppc-linux-nat.c (check_condition): Update.
	* value.h (fetch_subexp_value): Update.

	* gdb.base/watchpoint.c (struct foo5): New.
	(nullptr): New global.
	* gdb.base/watchpoint.exp (test_watch_location): Add test.
2013-08-02 16:41:08 +00:00
Ulrich Weigand e23b9d6ed2 2013-07-22 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
* ppc-linux-nat.c (PPC_DEBUG_FEATURE_DATA_BP_DAWR): New define.
	(ppc_linux_region_ok_for_hw_watchpoint): Add checking to use the new
	DAWR interface for longer ranges hardware watchpoint (up to 512 bytes).
2013-07-22 13:17:51 +00:00
Ulrich Weigand 926bf92da5 2013-07-15 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
* ppc-linux-nat.c: Since the new PowerPC specific ptrace interface is
	now available for embedded (BookE) and server (BookS) processors,
	correct mentions of 'booke' and adjust comments accordingly in order to
	avoid confusion. Rename struct 'booke_debug_info' to 'hwdebug_info'.
	(have_ptrace_booke_interface): Rename function and variable
	'have_ptrace_booke_interface' to 'have_ptrace_hwdebug_interface'.
	Rename struct 'booke_debug_info' to 'hwdebug_info'. Update all uses.
	(booke_cmp_hw_point): Rename function 'booke_cmp_hw_point' to
	'hwdebug_point_cmp'. Update all uses.
	(booke_find_thread_points_by_tid): Rename function
	'booke_find_thread_points_by_tid' to
	'hwdebug_find_thread_points_by_tid'. Update all uses.
	(booke_insert_point): Rename function 'booke_insert_point' to
	'hwdebug_insert_point'. Update all uses.
	(booke_remove_point): Rename function 'booke_remove_point' to
	'hwdebug_remove_point'. Update all uses.
2013-07-15 16:01:26 +00:00
Pedro Alves d8d2a3ee47 Normalize on PATH_MAX instead of MAXPATHLEN throughout.
With the pathmax gnulib module in place, we can use PATH_MAX
consistently throughout, instead of the current mixbag of PATH_MAX and
MAXPATHLEN uses.  It's no longer necessary to include sys/param.h
(supposedly, I can't check all ports touched here) for MAXPATHLEN.

Don't remove sys/param.h from GDB's configure.ac, as later tests in
the file use HAVE_SYS_PARAM_H checks.

Tested on x86_64 Fedora 17.

Also cross-built for --host=i686-w64-mingw32, and --host=i586-pc-msdosdjgpp.

gdb/
2013-07-01  Pedro Alves  <palves@redhat.com>

	* defs.h: Include "pathmax.h".
	* utils.c: Don't include sys/param.h.
	(gdb_realpath): Remove code that checks for MAXPATHLEN.
	* solib-ia64-hpux.c (ia64_hpux_handle_load_event): Use PATH_MAX
	instead of MAXPATHLEN.
	* solib-sunos.c: Don't include sys/param.h.
	* xcoffread.c: Don't include sys/param.h.
	* bsd-kvm.c: Don't include sys/param.h.
	* darwin-nat.c: Don't include sys/param.h.
	(darwin_pid_to_exec_file): Use PATH_MAX instead of MAXPATHLEN.
	* darwin-nat-info.c: Don't include sys/param.h.
	* fbsd-nat.c (fbsd_pid_to_exec_file): Use PATH_MAX instead of
	MAXPATHLEN.
	* i386obsd-nat.c: Don't include sys/param.h.
	* inf-child.c: Don't include sys/param.h.
	(inf_child_fileio_readlink): Use PATH_MAX instead of MAXPATHLEN.
	* linux-fork.c: Don't include sys/param.h.
	(fork_save_infrun_state): Use PATH_MAX instead of MAXPATHLEN.
	* linux-nat.c: Don't include sys/param.h.
	(linux_child_pid_to_exec_file, linux_proc_pending_signals)
	(linux_proc_pending_signals): Use PATH_MAX instead of MAXPATHLEN.
	* m68klinux-nat.c: Don't include sys/param.h.
	* nbsd-nat.c: Don't include sys/param.h.
	(nbsd_pid_to_exec_file): Use PATH_MAX instead of MAXPATHLEN.
	* ppc-linux-nat.c: Don't include sys/param.h.
	* rs6000-nat.c: Don't include sys/param.h.
	* spu-linux-nat.c. Don't include sys/param.h.
	* windows-nat.c: Don't include sys/param.h.
	* xtensa-linux-nat.c: Don't include sys/param.h.
	* config/i386/nm-fbsd.h: Don't include sys/param.h.

gdb/gdbserver/
2013-07-01  Pedro Alves  <palves@redhat.com>

	* server.h: Include "pathmax.h".
	* linux-low.c: Don't include sys/param.h.
	(linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
	MAXPATHLEN.
	* win32-low.c: Don't include sys/param.h.
	(win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2013-07-01 11:28:30 +00:00
Edjunior Barbosa Machado 4feebbddff 2013-05-17 Edjunior Machado <emachado@linux.vnet.ibm.com>
* ppc-linux-nat.c (ppc_linux_region_ok_for_hw_watchpoint): Check if the
	region is ok for a hardware watchpoint using the new ptrace interface
	on Power servers.
2013-05-17 23:05:00 +00:00
Luis Machado aacbb8a556 gdb/
* ppc-linux-nat.c (ppc_linux_new_thread): Clear the new thread's
	debug state prior to replicating existing hardware watchpoints or
	breakpoints.

	gdb/testsuite/
	* gdb.threads/wp-replication.c: New file.
	* gdb.threads/wp-replication.exp: New file.
2013-05-07 07:43:33 +00:00
Pedro Alves e362b51003 Use gdb_byte for bytes from the program being debugged.
gdb_byte should be used for bytes from the program being debugged.  We
have many places using char or unsigned char instead all over the
existing ports, and more ends up added over time due to copy/paste as
new code is based on old code.

I've greped the tree for "char buf[", and fixed all I found.

Tested by building with --enable-targets=all.

2013-03-01  Pedro Alves  <palves@redhat.com>

	Use gdb_byte for bytes from the program being debugged.

	* arm-tdep.c (arm_store_return_value, arm_get_longjmp_target):
	Change type of local 'buf' to gdb_byte.
	* avr-tdep.c (avr_frame_prev_register, avr_push_dummy_call): Likewise.
	* bfin-tdep.c (bfin_push_dummy_call): Likewise.
	* cris-tdep.c (cris_sigcontext_addr)
	(cris_sigtramp_frame_unwind_cache): Likewise.
	* frv-linux-tdep.c (frv_linux_pc_in_sigtramp)
	(frv_linux_sigcontext_reg_addr, frv_linux_sigtramp_frame_cache):
	Likewise.
	* frv-tdep.c (frv_pseudo_register_write, frv_analyze_prologue): Likewise.
	* hppa-hpux-tdep.c (hppa32_hpux_find_global_pointer)
	(hppa32_hpux_search_dummy_call_sequence)
	(hppa_hpux_supply_save_state): Likewise.
	* hppa-linux-tdep.c (insns_match_pattern)
	(hppa_linux_find_global_pointer): Likewise.
	* hppa-tdep.c (hppa_in_function_epilogue_p)
	(skip_prologue_hard_way, hppa_frame_cache): Likewise.
	* i386-nto-tdep.c (i386nto_sigcontext_addr): Likewise.
	* i386fbsd-tdep.c (i386fbsd_supply_uthread)
	(i386fbsd_collect_uthread): Likewise.
	* ia64-hpux-tdep.c (ia64_hpux_push_dummy_code): Likewise.
	* ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Likewise.
	* ia64-tdep.c (examine_prologue, ia64_frame_cache)
	(ia64_frame_prev_register, ia64_sigtramp_frame_cache)
	(ia64_sigtramp_frame_prev_register, ia64_access_reg)
	(ia64_access_rse_reg, ia64_libunwind_frame_this_id)
	(ia64_libunwind_frame_prev_register)
	(ia64_libunwind_sigtramp_frame_this_id)
	(ia64_find_global_pointer_from_dynamic_section)
	(find_extant_func_descr, find_func_descr, ia64_dummy_id)
	(ia64_unwind_pc): Likewise.
	* iq2000-tdep.c (iq2000_store_return_value): Likewise.
	* m68hc11-tdep.c (m68hc11_push_dummy_call)
	(m68hc11_extract_return_value): Likewise.
	* m68klinux-nat.c (fetch_register, store_register): Likewise.
	* mep-tdep.c (mep_pseudo_cr32_read, mep_pseudo_cr32_write)
	(mep_get_insn, mep_push_dummy_call): Likewise.
	* mips-linux-tdep.c (mips_linux_get_longjmp_target)
	(mips_linux_in_dynsym_stub): Likewise.
	* mn10300-tdep.c (mep_pseudo_cr32_write): Likewise.
	* ppc-linux-nat.c (fetch_register, store_register): Likewise.
	* regcache.c (dump_endian_bytes): Change type of parameter 'buf'
	to gdb_byte.
	* remote-mips.c (mips_set_register): Likewise.
	* remote-sim.c (gdbsim_fetch_register): Likewise.
	* score-tdep.c (score7_fetch_inst): Change type of parameter
	'memblock' and local 'buf' to gdb_byte.
	(score7_malloc_and_get_memblock): Change return type to gdb_byte.
	Change type of local 'buf' to gdb_byte.  Adjust.
	(score7_adjust_memblock_ptr): Change type of parameter 'memblock'
	to gdb_byte**.
	(score7_analyze_prologue): Change type of 'memblock' and
	'memblock_ptr' locals to gdb_byte*.
	* sh64-tdep.c (sh64_extract_return_value)
	(sh64_store_return_value): Change type of local 'buf' to gdb_byte.
	* solib-darwin.c (darwin_current_sos, darwin_read_exec_load_addr):
	* solib-pa64.c (pa64_solib_create_inferior_hook)
	(pa64_open_symbol_file_object): Remove local 'buf'.
	* solib-som.c (som_solib_create_inferior_hook, link_map_start)
	(som_open_symbol_file_object): Likewise.
	* solib-spu.c (spu_current_sos): Likewise.
	* spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
	* spu-multiarch.c (parse_spufs_run, spu_fetch_registers)
	(spu_store_registers): Likewise.
	* target.c (debug_print_register): Likewise.
	* tic6x-tdep.c (tic6x_get_longjmp_target): Likewise.
	* xstormy16-tdep.c (xstormy16_store_return_value)
	(xstormy16_push_dummy_call, xstormy16_resolve_jmp_table_entry)
	(xstormy16_find_jmp_table_entry): Likewise.
2013-03-01 15:38:27 +00:00
Joel Brobecker 28e7fd6234 Update years in copyright notice for the GDB files.
Two modifications:
  1. The addition of 2013 to the copyright year range for every file;
  2. The use of a single year range, instead of potentially multiple
     year ranges, as approved by the FSF.
2013-01-01 06:33:28 +00:00
Pierre Muller 8c042590f9 ARI fixes: sprintf rule.
Replace sprintf function calls for char arrays by
	calls to xsnprintf calls.
	* arm-tdep.c (arm_push_dummy_call): Replace sprintf by xsnprintf.
	(arm_dwarf_reg_to_regnum, arm_return_value): Ditto.
	(arm_neon_quad_read, arm_pseudo_read): Ditto.
	(arm_neon_quad_write, arm_pseudo_write): Ditto.
	* breakpoint.c (condition_completer): Ditto.
	(create_tracepoint_from_upload): Ditto.
	* dwarf2read.c (file_full_name): Ditto.
	* gcore.c (gcore_command): Ditto.
	* gnu-nat.c (proc_string, gnu_pid_to_str): Ditto.
	* go32-nat.c (go32_sysinfo): Ditto.
	* interps.c (interp_set): Ditto.
	* m32c-tdep.c (make_types): Ditto.
	* ppc-linux-nat.c (fetch_register, store_register): Ditto.
	* remote-m32r-sdi.c (m32r_open): Ditto.
	* sol-thread.c (td_err_string): Ditto.
	(td_state_string, solaris_pid_to_str): Ditto.
	* symtab.c (gdb_mangle_name): Ditto.
	* cli/cli-script.c (execute_control_command): Ditto.
	(define_command, document_command): Ditto.
	* tui/tui-io.c (tui_rl_display_match_list): Ditto.
	* tui/tui-stack.c (tui_make_status_line): Ditto.
	* tui/tui-win.c (tui_update_gdb_sizes): Ditto.
2012-11-20 22:51:05 +00:00
Tom Tromey f5656eadf4 * gdbarch.sh (target_gdbarch): Remove macro.
(get_target_gdbarch): Rename to target_gdbarch.
	* gdbarch.c, gdbarch.h: Rebuild.
	* ada-tasks.c, aix-thread.c, amd64-linux-nat.c, arch-utils.c,
	arm-tdep.c, auxv.c, breakpoint.c, bsd-uthread.c, corefile.c,
	darwin-nat-info.c, dcache.c, dsrec.c, exec.c, fbsd-nat.c,
	filesystem.c, gcore.c, gnu-nat.c, i386-darwin-nat.c, i386-nat.c,
	ia64-vms-tdep.c, inf-ptrace.c, infcmd.c, jit.c, linux-nat.c,
	linux-tdep.c, linux-thread-db.c, m32r-rom.c, memattr.c,
	mep-tdep.c, microblaze-tdep.c, mips-linux-nat.c,
	mips-linux-tdep.c, mips-tdep.c, monitor.c, moxie-tdep.c,
	nto-procfs.c, nto-tdep.c, ppc-linux-nat.c, proc-service.c,
	procfs.c, progspace.c, ravenscar-thread.c, record.c,
	remote-m32r-sdi.c, remote-mips.c, remote-sim.c, remote.c,
	rl78-tdep.c, rs6000-nat.c, rx-tdep.c, s390-nat.c, sol-thread.c,
	solib-darwin.c, solib-dsbt.c, solib-frv.c, solib-ia64-hpux.c,
	solib-irix.c, solib-pa64.c, solib-som.c, solib-spu.c,
	solib-sunos.c, solib-svr4.c, solib.c, spu-linux-nat.c,
	spu-multiarch.c, spu-tdep.c, symfile-mem.c, symfile.c, symtab.c,
	target-descriptions.c, target.c, target.h, tracepoint.c,
	windows-nat.c, windows-tdep.c, xcoffsolib.c, cli/cli-dump.c,
	common/agent.c, mi/mi-interp.c, python/py-finishbreakpoint.c,
	python/py-inferior.c, python/python.c: Update.
2012-11-09 19:58:03 +00:00
Jan Kratochvil f865ee35b7 gdb/
Code cleanup for the next patch.
	* arm-linux-nat.c (arm_linux_stopped_data_address): Change variable
	siginfo_p to siginfo, update its users incl. the linux_nat_get_siginfo
	call for it.
	* ia64-linux-nat.c (ia64_linux_stopped_data_address): Likewise.
	(ia64_linux_stopped_data_address):
	* linux-nat.c (linux_nat_get_siginfo): Add parameter siginfo, change
	the return value.
	* linux-nat.h (linux_nat_get_siginfo): Likewise.
	* ppc-linux-nat.c (ppc_linux_stopped_data_address): Change variable
	siginfo_p to siginfo, update its users incl. the linux_nat_get_siginfo
	call for it.
2012-07-06 16:49:43 +00:00
Edjunior Barbosa Machado 0c56f59b40 * ppc-linux-nat.c (have_ptrace_booke_interface): Disable ptrace
BookE interface for PowerPC server processors if not available
in the Linux Kernel.
2012-05-31 22:07:31 +00:00
Edjunior Barbosa Machado bb08bdbd81 * ppc-linux-nat.c (ppc_linux_can_use_hw_breakpoint): fix
accounting of hw watchpoints on ppc.
2012-05-30 13:37:17 +00:00
Thomas Schwinge a5362b9aa4 struct siginfo vs. siginfo_t
gdb/
	* amd64-linux-nat.c (amd64_linux_siginfo_fixup): Use siginfo_t instead
	of struct siginfo.
	* arm-linux-nat.c (arm_linux_stopped_data_address): Likewise.
	* ia64-linux-nat.c (ia64_linux_stopped_data_address): Likewise.
	* linux-nat.c (linux_nat_siginfo_fixup, siginfo_fixup)
	(linux_xfer_siginfo, linux_nat_set_siginfo_fixup)
	(linux_nat_get_siginfo): Likewise.
	* linux-nat.h (struct lwp_info, linux_nat_set_siginfo_fixup)
	(linux_nat_get_siginfo): Likewise.
	* linux-tdep.c (linux_get_siginfo_type): Likewise.
	* ppc-linux-nat.c (ppc_linux_stopped_data_address): Likewise.
	* procfs.c (gdb_siginfo_t): Likewise.

gdbserver/
	* linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
	struct siginfo.
	* linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
	* linux-x86-low.c (x86_siginfo_fixup): Likewise.
	* linux-low.h: Include <signal.h>.
	(struct siginfo): Remove forward declaration.
	(struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
	struct siginfo.
2012-03-21 13:43:55 +00:00
Ulrich Weigand b261e0c536 Fix -Wmissing-prototypes build.
* ppc-linux-nat.c (ppc_linux_get_hwcap): Make static.
	* remote-sim.c (gdbsim_has_all_memory): Likewise.
	(gdbsim_has_memory): Likewise.
2012-03-02 13:38:39 +00:00
Jan Kratochvil 11fde611c4 gdb/
* ppc-linux-nat.c (fetch_register, store_register): Fix GCC aliasing
	compilation warning.
2012-02-12 19:25:29 +00:00