aboutsummaryrefslogtreecommitdiff
path: root/gdb
AgeCommit message (Collapse)AuthorFilesLines
2014-02-19Add target_ops argument to to_insert_vfork_catchpointTom Tromey4-6/+16
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_insert_vfork_catchpoint>: Add argument. (target_insert_vfork_catchpoint): Add argument. * target.c (debug_to_insert_vfork_catchpoint): Add argument. (update_current_target): Update. * linux-nat.c (linux_child_insert_vfork_catchpoint): Add 'self' argument.
2014-02-19Add target_ops argument to to_remove_fork_catchpointTom Tromey4-6/+16
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_remove_fork_catchpoint>: Add argument. (target_remove_fork_catchpoint): Add argument. * target.c (debug_to_remove_fork_catchpoint): Add argument. (update_current_target): Update. * linux-nat.c (linux_child_remove_fork_catchpoint): Add 'self' argument.
2014-02-19Add target_ops argument to to_insert_fork_catchpointTom Tromey4-6/+16
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_insert_fork_catchpoint>: Add argument. (target_insert_fork_catchpoint): Add argument. * target.c (debug_to_insert_fork_catchpoint): Add argument. (update_current_target): Update. * linux-nat.c (linux_child_insert_fork_catchpoint): Add 'self' argument.
2014-02-19Add target_ops argument to to_post_startup_inferiorTom Tromey10-18/+47
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_post_startup_inferior>: Add argument. (target_post_startup_inferior): Add argument. * target.c (debug_to_post_startup_inferior): Add argument. (update_current_target): Update. * spu-linux-nat.c (spu_child_post_startup_inferior): Add 'self' argument. * linux-nat.c (linux_child_post_startup_inferior): Add 'self' argument. * inf-ptrace.c (inf_ptrace_post_startup_inferior): Add 'self' argument. * inf-child.c (inf_child_post_startup_inferior): Add 'self' argument. * i386-linux-nat.c (i386_linux_child_post_startup_inferior): Add 'self' argument. (super_post_startup_inferior): Likewise. * amd64-linux-nat.c (amd64_linux_child_post_startup_inferior): Add 'self' argument. (super_post_startup_inferior): Likewise. * aarch64-linux-nat.c (aarch64_linux_child_post_startup_inferior): Add 'self' argument. (super_post_startup_inferior): Likewise.
2014-02-19Add target_ops argument to to_loadTom Tromey9-14/+27
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_load>: Add argument. * target.c (target_load): Add argument. (debug_to_load): Add argument. (update_current_target): Update. * remote.c (remote_load): Add 'self' argument. * remote-sim.c (gdbsim_load): Add 'self' argument. * remote-mips.c (mips_load): Add 'self' argument. * remote-m32r-sdi.c (m32r_load): Add 'self' argument. * monitor.c (monitor_load): Add 'self' argument. * m32r-rom.c (m32r_load_gen): Add 'self' argument.
2014-02-19Add target_ops argument to to_terminal_infoTom Tromey6-9/+20
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_terminal_info>: Add argument. (target_terminal_info): Add argument. * target.c (debug_to_terminal_info): Add argument. (default_terminal_info): Likewise. * inflow.c (child_terminal_info): Add 'self' argument. * inferior.h (child_terminal_info): Add 'self' argument. * go32-nat.c (go32_terminal_info): Add 'self' argument.
2014-02-19Add target_ops argument to to_terminal_save_oursTom Tromey5-8/+18
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_terminal_save_ours>: Add argument. (target_terminal_save_ours): Add argument. * target.c (debug_to_terminal_save_ours): Add argument. (update_current_target): Update. * inflow.c (terminal_save_ours): Add 'self' argument. * inferior.h (terminal_save_ours): Add 'self' argument.
2014-02-19Add target_ops argument to to_terminal_oursTom Tromey8-15/+28
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_terminal_ours>: Add argument. (target_terminal_ours): Add argument. * target.c (debug_to_terminal_ours): Add argument. (update_current_target): Update. * remote.c (remote_terminal_ours): Add 'self' argument. (remote_close): Update. * linux-nat.c (linux_nat_terminal_ours): Add 'self' argument. * inflow.c (terminal_ours): Add 'self' argument. * inferior.h (terminal_ours): Add 'self' argument. * go32-nat.c (go32_terminal_ours): Add 'self' argument.
2014-02-19Add target_ops argument to to_terminal_ours_for_outputTom Tromey5-8/+20
2014-02-19 Pedro Alves <palves@redhat.com> Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_terminal_ours_for_output>: Add argument. (target_terminal_ours_for_output): Add argument. * target.c (debug_to_terminal_ours_for_output): Add argument. (update_current_target): Update. * inflow.c (terminal_ours_for_output): Add 'self' argument. * inferior.h (terminal_ours_for_output): Add 'self' argument. * go32-nat.c (go32_terminal_ours): Add 'self' argument.
2014-02-19Add target_ops argument to to_terminal_inferiorTom Tromey8-13/+26
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_terminal_inferior>: Add argument. * target.c (target_terminal_inferior): Add argument. (update_current_target): Update. * remote.c (remote_terminal_inferior): Add 'self' argument. * linux-nat.c (linux_nat_terminal_inferior): Add 'self' argument. * inflow.c (terminal_inferior): Add 'self' argument. * inferior.h (terminal_inferior): Add 'self' argument. * go32-nat.c (go32_terminal_inferior): Add 'self' argument. (go32_terminal_inferior): Add 'self' argument.
2014-02-19Add target_ops argument to to_terminal_initTom Tromey7-10/+21
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_terminal_init>: Add argument. (target_terminal_init): Add argument. * target.c (debug_to_terminal_init): Add argument. (update_current_target): Update. * inflow.c (terminal_init_inferior): Add 'self' argument. * inferior.h (terminal_init_inferior): Add 'self' argument. * go32-nat.c (go32_terminal_init): Add 'self' argument. * gnu-nat.c (gnu_terminal_init_inferior): Add 'self' argument.
2014-02-19Add target_ops argument to to_can_accel_watchpoint_conditionTom Tromey4-7/+25
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-19Add target_ops argument to to_region_ok_for_hw_watchpointTom Tromey13-18/+62
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-19Add target_ops argument to to_insert_watchpointTom Tromey16-20/+68
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-19Add target_ops argument to to_remove_watchpointTom Tromey16-20/+67
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-19Add target_ops argument to to_remove_hw_breakpointTom Tromey8-11/+36
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-19Add target_ops argument to to_insert_hw_breakpointTom Tromey9-12/+38
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-19Add target_ops argument to to_can_use_hw_breakpointTom Tromey18-23/+78
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-19Add target_ops argument to to_post_attachTom Tromey8-10/+22
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_post_attach>: Add argument. (target_post_attach): Add argument. * target.c (debug_to_post_attach): Add argument. (update_current_target): Update. * spu-linux-nat.c (spu_child_post_attach): Add 'self' argument. * nto-procfs.c (procfs_post_attach): Add 'self' argument. * linux-nat.c (linux_child_post_attach): Add 'self' argument. * inf-ptrace.c (inf_ptrace_post_attach): Add 'self' argument. * inf-child.c (inf_child_post_attach): Add 'self' argument.
2014-02-19Add target_ops argument to to_closeTom Tromey21-28/+52
2014-02-19 Tom Tromey <tromey@redhat.com> * windows-nat.c (windows_close): Add 'self' argument. * tracepoint.c (tfile_close): Add 'self' argument. * target.h (struct target_ops) <to_close>: Add argument. * target.c (target_close): Add argument. (update_current_target): Update. * remote.c (remote_close): Add 'self' argument. * remote-sim.c (gdbsim_close): Add 'self' argument. * remote-mips.c (mips_close): Add 'self' argument. * remote-m32r-sdi.c (m32r_close): Add 'self' argument. * record-full.c (record_full_close): Add 'self' argument. * record-btrace.c (record_btrace_close): Add 'self' argument. * monitor.h (monitor_close): Add 'self' argument. * monitor.c (monitor_close): Add 'self' argument. * mips-linux-nat.c (mips_linux_close): Add 'self' argument. * linux-nat.c (linux_nat_close): Add argument. * go32-nat.c (go32_close): Add 'self' argument. * exec.c (exec_close_1): Add 'self' argument. * ctf.c (ctf_close): Add 'self' argument. * corelow.c (core_close): Add 'self' argument. (core_close_cleanup): Update. * bsd-uthread.c (bsd_uthread_close): Add 'self' argument. * bsd-kvm.c (bsd_kvm_close): Add 'self' argument.
2014-02-19introduce remote_loadTom Tromey2-1/+14
I used a refactoring script to add target_ops arguments to all the target methods. In order to make this script work a little better, this patch adds a new "remote_load" function; this eliminates the need to later change the signature of generic_load. 2014-02-19 Tom Tromey <tromey@redhat.com> * remote.c (remote_load): New function. (init_remote_ops): Use it.
2014-02-19convert to_supports_btraceTom Tromey9-23/+46
This adds a "self" argument to to_supports_btrace. Due to how one implementation of this method is shared with gdbserver this required a small change to gdbserver as well. 2014-02-19 Tom Tromey <tromey@redhat.com> * common/linux-btrace.c (linux_supports_btrace): Add "ops" argument. * common/linux-btrace.h (linux_supports_btrace): Update. * remote.c (remote_supports_btrace): Add "self" argument. * target-delegates.c: Rebuild. * target.c (target_supports_btrace): Remove. * target.h (struct target_ops) <to_supports_btrace>: Add target_ops argument. (target_supports_btrace): New define. 2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <supports_btrace>: Add target_ops argument. (target_supports_btrace): Update.
2014-02-19add target method delegationTom Tromey6-370/+309
This patch replaces some code in the record targets with target method delegation. record-full.c stores pointers to many target methods when the record target is pushed. Then it later delegates some calls via these. This is wrong because it violates the target stack contract. In particular it is ok to unpush a target at any stratum, but record-full does not keep track of this, so it could potentially call into an unpushed target. This patch fixes the problem by using the newly-introduced generic approach to target delegation for the methods in question. 2014-02-19 Tom Tromey <tromey@redhat.com> * record-full.c (record_full_beneath_to_resume_ops) (record_full_beneath_to_resume, record_full_beneath_to_wait_ops) (record_full_beneath_to_wait) (record_full_beneath_to_store_registers_ops) (record_full_beneath_to_store_registers) (record_full_beneath_to_xfer_partial_ops) (record_full_beneath_to_xfer_partial) (record_full_beneath_to_insert_breakpoint_ops) (record_full_beneath_to_insert_breakpoint) (record_full_beneath_to_remove_breakpoint_ops) (record_full_beneath_to_remove_breakpoint) (record_full_beneath_to_stopped_by_watchpoint) (record_full_beneath_to_stopped_data_address) (record_full_beneath_to_async, tmp_to_resume_ops, tmp_to_resume) (tmp_to_wait_ops, tmp_to_wait, tmp_to_store_registers_ops) (tmp_to_store_registers, tmp_to_xfer_partial_ops) (tmp_to_xfer_partial, tmp_to_instmp_to_insert_breakpoint_ops) (tmp_to_insert_breakpoint, tmp_to_remove_breakpoint_ops) (tmp_to_remove_breakpoint, tmp_to_stopped_by_watchpoint) (tmp_to_stopped_data_address, tmp_to_async): Remove. (record_full_open_1, record_full_open): Update. Use RECORD_IS_USED. (record_full_resume, record_full_wait_1) (record_full_stopped_by_watchpoint, record_full_stopped_data_address) (record_full_store_registers, record_full_xfer_partial) (record_full_insert_breakpoint, record_full_remove_breakpoint) (record_full_async, record_full_core_xfer_partial): Use target delegation. * target-delegates.c: Rebuild. * target.c (current_xfer_partial): Remove. (update_current_target): Do not INHERIT or de_fault to_insert_breakpoint, to_remove_breakpoint, to_stopped_data_address, to_stopped_by_watchpoint, to_can_async_p, to_is_async_p, to_async. Do not set to_xfer_partial field. (default_xfer_partial): Simplify. (current_xfer_partial): Remove. (target_wait, target_resume): Simplify. (find_default_can_async_p, find_default_is_async_p): Update. (init_dummy_target): Don't set to_can_async_p, to_is_async_p, to_xfer_partial, to_stopped_by_watchpoint, to_stopped_data_address. (target_store_registers): Simplify. (forward_target_remove_breakpoint) (forward_target_insert_breakpoint): Remove. (target_remove_breakpoint, target_insert_breakpoint) (debug_to_insert_breakpoint, debug_to_remove_breakpoint): Update. * target.h (struct target_ops) <to_resume, to_wait, to_store_registers, to_insert_breakpoint, to_remove_breakpoint, to_stopped_by_watchpoint, to_stopped_data_address, to_can_async_p, to_is_async_p, to_async, to_xfer_partial>: Add TARGET_DEFAULT markup. (forward_target_remove_breakpoint) (forward_target_insert_breakpoint): Remove. * record-btrace.c (record_btrace_remove_breakpoint): Delegate directly. (record_btrace_insert_breakpoint): Delegate directly.
2014-02-19add make-target-delegatesTom Tromey5-0/+311
This patch adds a new script, call make-target-delegates, which auto-generates some target delegation code based on annotations in target.h. This adds the new delegation macros, the new generated file, and adds the necessary calls to the new generated functions to target.c. It doesn't, however, add any actual annotations to the target methods, leaving these for separate patches. 2014-02-19 Tom Tromey <tromey@redhat.com> PR build/7701: * target-delegates.c: New file. * target.c: Include target-delegates.c. (init_dummy_target): Call install_dummy_methods. (complete_target_initialization): Call install_delegators. * target.h (TARGET_DEFAULT_IGNORE, TARGET_DEFAULT_NORETURN) (TARGET_DEFAULT_RETURN, TARGET_DEFAULT_FUNC): New defines. * make-target-delegates: New file.
2014-02-19introduce and use find_target_atTom Tromey4-7/+26
This patch adds find_target_at to determine whether a target appears at a given stratum. This new function lets us clean up find_record_target a bit, and is generally useful. 2014-02-19 Tom Tromey <tromey@redhat.com> * record.c (find_record_target): Use find_target_at. * target.c (find_target_at): New function. * target.h (find_target_at): Declare.
2014-02-19add "this" pointers to more target APIsTom Tromey18-71/+123
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-19Fix PR16220Yao Qi4-237/+7
This patch removes startup_gdbarch because it is not used anymore. After this patch, [PATCH] Multi-process + multi-arch: GDB https://sourceware.org/ml/gdb-patches/2012-11/msg00228.html global variable target_gdbarch is removed and gdbarch becomes per-inferior. Then, we don't have to keep global variable startup_gdbarch. Rebuild GDB with all targets. Is it OK? gdb: 2014-02-18 Yao Qi <yao@codesourcery.com> PR gdb/16220 * gdbarch.sh: Remove startup_gdbarch. * gdbarch.c: Regenerated. * gdbarch.h: Likewise.
2014-02-18New TESTS variable to run a subset of tests in parallel.Doug Evans3-1/+60
* Makefile.in (TESTS): New variable. (expanded_tests, expanded_tests_or_none): New variables (check-single): Pass $(expanded_tests_or_none) to runtest. (check-parallel): Only run tests in $(TESTS) if non-empty. (check/no-matching-tests-found): New rule. * README: Document TESTS makefile variable.
2014-02-18* Makefile.in (check-parallel): rm -rf outputs temp.Doug Evans2-1/+5
2014-02-17Add g10 support to rl78-tdep.c.Kevin Buettner2-3/+157
The g10 is an rl78 variant which has fewer registers. Aside from the obvious addition of a new register_name() function which omits registers which the g10 lacks, this change also updates the return_value() function with the conventions specified by the ABI for finding and setting return values. * rl78-tdep.c (rl78_g10_register_name): New function. (rl78_return_value): Add g10 support. (rl78_gdbarch_init): Register rl78_g10_register_name for the g10.
2014-02-17Split python docs into separate file.Doug Evans4-4432/+4453
* Makefile.in (GDB_DOC_FILES): Add python.texi. * gdb.texinfo (Python): Moved to ... * python.texi: ... here. New file.
2014-02-17Remove doc/ in recent entries.Doug Evans1-2/+2
2014-02-17Move entry from ChangeLog to doc/ChangeLog.Doug Evans2-9/+9
* doc/guile.texi (Writing a Guile Pretty-Printer) <example>: [...]
2014-02-17guile: Fix typos in the manual.Ludovic Courtès2-8/+14
gdb/ 2014-02-17 Ludovic Courtès <ludo@gnu.org> * doc/guile.texi (Writing a Guile Pretty-Printer) <example>: Remove 'string-begins-with' procedure. Add 'pretty-printer' parameter to 'str-lookup-function' procedure. Look for the "std::string<" prefix. (Frames In Guile): Add 'frame' parameter to 'frame-read-var'. Adjust description.
2014-02-16Fix date in previous entry.Doug Evans1-1/+1
2014-02-16Resort scm-gsmob.c entry in Makefile.inDoug Evans2-6/+12
* Makefile.in (SUBDIR_GUILE_OBS): Resort alphabetically. (SUBDIR_GUILE_SRCS): Ditto. (scm-gsmob.o): Ditto.
2014-02-17Fix missing-prototypes warnings in gnu-nat.cYao Qi2-0/+5
A recent change (commit 3398af6aa352b0611bc9d66aed72080a876e42d4) in gnu-nat.c causes the some missing-prototypes warnings, ../../../git/gdb/gnu-nat.c:1864:1: error: no previous prototype for 'S_proc_pid2task_reply' [-Werror=missing-prototypes] ../../../git/gdb/gnu-nat.c:1866:1: error: no previous prototype for 'S_proc_task2pid_reply' [-Werror=missing-prototypes] ../../../git/gdb/gnu-nat.c:1868:1: error: no previous prototype for 'S_proc_task2proc_reply' [-Werror=missing-prototypes] A new macro ILL_RPC was added recently, which defines some external functions. However, they are not declared and GCC complains about this. This patch is to add the declarations of these external function in macro ILL_RPC. gdb: 2014-02-17 Yao Qi <yao@codesourcery.com> * gnu-nat.c (ILL_RPC): Declare defined function.
2014-02-17Fix -Werror=pointer-sign warningsYao Qi2-2/+8
../../../git/gdb/gnu-nat.c: In function 'gnu_read_inferior': ../../../git/gdb/gnu-nat.c:2282:3: error: pointer targets in passing argument 5 of 'vm_read' differ in signedness [-Werror=pointer-sign] In file included from /home/yao/Software/hurd-toolchain/bin/../i686-pc-gnu/libc/usr/include/mach.h:38:0, from ./nm.h:23, from ../../../git/gdb/defs.h:500, from ../../../git/gdb/gnu-nat.c:23: /home/yao/Software/hurd-toolchain/bin/../i686-pc-gnu/libc/usr/include/mach/mach_interface.h:843:15: note: expected 'mach_msg_type_number_t *' but argument is of type 'int *' ../../../git/gdb/gnu-nat.c: In function 'gnu_write_inferior': ../../../git/gdb/gnu-nat.c:2339:4: error: pointer targets in passing argument 5 of 'vm_read' differ in signedness [-Werror=pointer-sign] In file included from /home/yao/Software/hurd-toolchain/bin/../i686-pc-gnu/libc/usr/include/mach.h:38:0, from ./nm.h:23, from ../../../git/gdb/defs.h:500, from ../../../git/gdb/gnu-nat.c:23: /home/yao/Software/hurd-toolchain/bin/../i686-pc-gnu/libc/usr/include/mach/mach_interface.h:843:15: note: expected 'mach_msg_type_number_t *' but argument is of type 'int *' This patch fixes these warnings. gdb: 2014-02-17 Yao Qi <yao@codesourcery.com> * gnu-nat.c (gnu_read_inferior): Change 'copy_count' type to mach_msg_type_number_t. (gnu_write_inferior): Likewise.
2014-02-17Fix -Wformat warnings in gnu-nat.cYao Qi2-15/+29
I've seen some -Wformat warnings when build native gdb for hurd. ../../../git/gdb/gnu-nat.c:2384:8: error: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'vm_address_t' [-Werror=format] ../../../git/gdb/gnu-nat.c:2394:8: error: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'vm_address_t' [-Werror=format] ../../../git/gdb/gnu-nat.c: In function 'steal_exc_port': ../../../git/gdb/gnu-nat.c:2898:5: error: format '%d' expects argument of type 'int', but argument 2 has type 'mach_port_t' [-Werror=format] in usr/include/mach/port.h, we have: typedef vm_offset_t mach_port_t; and in usr/include/mach/machine/vm_types.h, we have: typedef unsigned long vm_offset_t; so this patch changes '%d' to '%lu' in format string for mach_port_t variables. Similarly, in usr/include/mach/std_types.h, we have, typedef vm_offset_t vm_address_t; this patch also changes '%x' to '%lx' in gnu_write_inferior. gdb: 2014-02-17 Yao Qi <yao@codesourcery.com> * gnu-nat.c (proc_get_exception_port): Use 'lu' insetad of 'd' in format string. (proc_steal_exc_port, make_proc, inf_set_pid): Likewise. (inf_validate_procs, inf_signal): Likewise. (S_exception_raise_request): Likewise. (do_mach_notify_dead_name): Likewise. (steal_exc_port): Likewise. (gnu_read_inferior): Change 'copy_count''s type to mach_msg_type_number_t. (gnu_write_inferior): Likewise. Use 'lx' instead of 'x' in format string.
2014-02-16Fix "ERROR: no fileid for" in the testsuite.Jan Kratochvil2-1/+7
If GDB has crashed then gdb_spawn_id still exists (although it does not work). So my patch does not change anything. And also currently it will leave the stale gdbserver running anyway. In general if gdb_spawn_id does not exist then send_gdb + gdb_expect just do not make sense anyway. So this patch just prevents the error in such case. The killing of stale gdbserver could be improved multiple ways (also as suggested by Pedro in the original thread) but that is IMO outside of the scope of this patch. Apparently if there is no good response from GDB then gdb_finish() should try to call gdb_start just to kill that gdbserver, IIUC. gdb/testsuite/ 2014-02-16 Jan Kratochvil <jan.kratochvil@redhat.com> Fix "ERROR: no fileid for" in the testsuite. * lib/gdb.exp (gdb_finish): Check gdb_spawn_id. Message-ID: <20140206205814.GA18495@host2.jankratochvil.net>
2014-02-16Hurd: Adjust to startup-with-shell changes.Thomas Schwinge2-18/+14
In commit 98882a26513e25b2161b41dfd4bed97b59b2c01a, STARTUP_WITH_SHELL was made a runtime toggle, startup-with-shell. The Hurd code was missed to be adjusted; it had a value hard-coded instead of using START_INFERIOR_TRAPS_EXPECTED. Fix that, and also simplify gnu-nat's pending_execs handling from counting to just a flag. gdb/ * gnu-nat.c (struct inf): Change pending_execs member to a 1-bit flag. Adjust all users; in particular... (gnu_wait): ..., don't decrement its value in here... (gnu_create_inferior): ..., and instead set the flag in here, around the startup_inferior call, and call that one with START_INFERIOR_TRAPS_EXPECTED.
2014-02-16Hurd: New RPC reply stub functions.Thomas Schwinge2-55/+98
gdb/ * gnu-nat.c (ill_rpc): Remove function; replaced with this... (ILL_RPC): ... new macro. (do_mach_notify_no_senders, do_mach_notify_port_deleted) (do_mach_notify_msg_accepted, do_mach_notify_port_destroyed) (do_mach_notify_send_once, S_proc_setmsgport_reply) (S_proc_getmsgport_reply, S_msg_sig_post_reply): Generate stub functions with ILL_RPC macro. (S_proc_pid2task_reply, S_proc_task2pid_reply) (S_proc_task2proc_reply, S_proc_proc2task_reply) (S_proc_pid2proc_reply, S_proc_getprocinfo_reply) (S_proc_getprocargs_reply, S_proc_getprocenv_reply) (S_proc_getloginid_reply, S_proc_getloginpids_reply) (S_proc_getlogin_reply, S_proc_getsid_reply) (S_proc_getsessionpgids_reply, S_proc_getsessionpids_reply) (S_proc_getsidport_reply, S_proc_getpgrp_reply) (S_proc_getpgrppids_reply, S_proc_get_tty_reply) (S_proc_getnports_reply, S_proc_is_important_reply) (S_proc_get_code_reply): New stub functions, generated with ILL_RPC macro. Based on a patch by David Michael <fedora.dm0@gmail.com>.
2014-02-16Hurd: Make MIG output parsing more robust.Thomas Schwinge2-0/+9
gdb/ * reply_mig_hack.awk: In phase 5, keep going if we have not yet collected the type check structures. Based on a patch by David Michael <fedora.dm0@gmail.com>.
2014-02-16Hurd: Adapt to changed MIG output.Thomas Schwinge2-2/+6
gdb/ * reply_mig_hack.awk: Don't expect to see the auto keyword. Based on a patch by David Michael <fedora.dm0@gmail.com>.
2014-02-14* target.c (target_write_partial): Fix result type.Doug Evans2-1/+5
2014-02-14Fix offsets to access fpregset_t in sparc64-linux targets.Jose E. Marchesi2-0/+7
The %fsr register is not being properly accessed from gdb in sparc64. This is because sparc64_supply_fpregset and sparc64_collect_fpregset are using the offsets from the sparc32_bsd_fpregset constant instead of sparc64_bsd_fpregset. This patch fixes this by registering the proper offsets for sparc64-linux targets. 2014-02-14 Jose E. Marchesi <jose.marchesi@oracle.com> * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Register the proper offsets to access fpregset_t.
2014-02-14Compile rsp-low.c for IPAYao Qi2-1/+9
gdb/gdbserver: 2014-02-14 Yao Qi <yao@codesourcery.com> * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o. (rsp-low-ipa.o): New target.
2014-02-13cleanup: remove declared variables without any referencesSanimir Agovic7-24/+15
2014-02-13 Sanimir Agovic <sanimir.agovic@intel.com> * cris-tdep.c (cris_supply_gregset): Remove zerobuf. (_initialize_cris_tdep): Remove cris_set_cmdlist, cris_show_cmdlist. * h8300-tdep.c (setmachinelist): Remove global. * hppa-tdep.c (hppa_sigtramp): Remove global. * mipsnbsd-tdep.c (sigtramp_retcode_mipsel, sigtramp_retcode_mipseb RETCODE_NWORDS, RETCODE_SIZE): Wrap code with #if 0. * ravenscar-thread.c (update_target_observer): Remove global. * rs6000-tdep.c (rs6000_gdbarch_init): Remove segment_regs.
2014-02-12Test for binary,dwp symlinks into different directories.Doug Evans3-1/+55
* gdb.dwarf2/Makefile.in (EXECUTABLES): Add dwp-symlink. (MISCELLANEOUS): New variable. (clean): rm -rf $(MISCELLANEOUS). * gdb.dwarf2/dwp-symlink.exp: Test the case where the executable and dwp live in the same directory as symlinks, with each symlink pointed to a differently named file in a different directory.
2014-02-12update rsp-low commentsTom Tromey3-1/+43
This updates all the comments in rsp-low.[ch], now that the unification has been completed. 2014-02-12 Tom Tromey <tromey@redhat.com> * common/rsp-low.c: Update comments. * common/rsp-low.h: Update comments.