aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
AgeCommit message (Collapse)AuthorFilesLines
2014-02-19remote.c: Use the ptid.lwp field to store remote thread ids rather than ↵Pedro Alves1-17/+17
ptid.tid. From GDB's perspective, independently of how the target really implements threads, gdb/remote sees all threads as if kernel/system threads. A rationale along theses lines led to gdbserver storing thread ids in ptid.lwp in all ports. Because remote.c is currently using ptid.tid, we can't make gdbserver and gdb share bits of remote-specific code that manipulates ptids (e.g., write_ptid/read_ptid). This patch thus makes remote.c use ptid.lwp instead of ptid.tid. I believe that on the GDB side too, it's best that we standardize on process_stratum targets using the ptid.lwp field to store thread ids anyway. The idea being leave the ptid.tid field free for any thread_stratum target that might want to sit on top. Tested on x86_64 Fedora 17, w/ local gdbserver. gdb/ 2014-02-19 Pedro Alves <palves@redhat.com> * remote.c (remote_thread_alive, write_ptid, read_ptid) (read_ptid, remote_newthread_step, remote_threads_extra_info) (remote_get_ada_task_ptid, append_resumption, remote_stop_ns) (threadalive_test, remote_pid_to_str): Use the ptid.lwp field to store remote thread ids rather than ptid.tid. (_initialize_remote): Adjust.
2014-02-19change delegation for to_read_descriptionTom Tromey1-2/+2
This switches to_read_description to the "new normal" delegation scheme. This one was a bit trickier than the other changes due to the way that target_read_description handled delegation. I examined all the target implementations of to_read_description and changed the ones returning NULL to instead delegate. 2014-02-19 Tom Tromey <tromey@redhat.com> * arm-linux-nat.c (arm_linux_read_description): Delegate when needed. * corelow.c (core_read_description): Delegate when needed. * remote.c (remote_read_description): Delegate when needed. * target-delegates.c: Rebuild. * target.c (target_read_description): Rewrite. * target.h (struct target_ops) <to_read_description>: Update comment. Use TARGET_DEFAULT_RETURN.
2014-02-19Add target_ops argument to to_augmented_libraries_svr4_readTom Tromey1-1/+1
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_augmented_libraries_svr4_read>: Add argument. (target_augmented_libraries_svr4_read): Add argument. * target.c (update_current_target): Update. * remote.c (remote_augmented_libraries_svr4_read): Add 'self' argument.
2014-02-19Add target_ops argument to to_read_btraceTom Tromey1-1/+2
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_read_btrace>: Add argument. * target.c (struct target_ops) <to_read_btrace>: Add argument. * remote.c (struct target_ops) <to_read_btrace>: Add 'self' argument. * amd64-linux-nat.c (amd64_linux_read_btrace): New function. (_initialize_amd64_linux_nat): Use it. * i386-linux-nat.c (i386_linux_read_btrace): New function. (_initialize_i386_linux_nat): Use it.
2014-02-19Add target_ops argument to to_teardown_btraceTom Tromey1-1/+2
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_teardown_btrace>: Add argument. * target.c (target_teardown_btrace): Add argument. * remote.c (remote_teardown_btrace): Add 'self' argument. * i386-linux-nat.c (i386_linux_teardown_btrace): Add 'self' argument. * amd64-linux-nat.c (amd64_linux_teardown_btrace): Add 'self' argument.
2014-02-19Add target_ops argument to to_disable_btraceTom Tromey1-1/+2
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_disable_btrace>: Add argument. * target.c (target_disable_btrace): Add argument. * remote.c (remote_disable_btrace): Add 'self' argument. * i386-linux-nat.c (i386_linux_disable_btrace): Add 'self' argument. * amd64-linux-nat.c (amd64_linux_disable_btrace): Add 'self' argument.
2014-02-19Add target_ops argument to to_enable_btraceTom Tromey1-1/+1
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_enable_btrace>: Add argument. * target.c (target_enable_btrace): Add argument. * remote.c (remote_enable_btrace): Add 'self' argument. * i386-linux-nat.c (i386_linux_enable_btrace): Add 'self' argument. * amd64-linux-nat.c (amd64_linux_enable_btrace): Add 'self' argument.
2014-02-19Add target_ops argument to to_can_use_agentTom Tromey1-1/+1
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_can_use_agent>: Add argument. (target_can_use_agent): Add argument. * target.c (update_current_target): Update. * remote.c (remote_can_use_agent): Add 'self' argument. * inf-child.c (inf_child_can_use_agent): Add 'self' argument.
2014-02-19Add target_ops argument to to_use_agentTom Tromey1-1/+1
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_use_agent>: Add argument. (target_use_agent): Add argument. * target.c (update_current_target): Update. * remote.c (remote_use_agent): Add 'self' argument. * inf-child.c (inf_child_use_agent): Add 'self' argument.
2014-02-19Add target_ops argument to to_traceframe_infoTom Tromey1-1/+1
2014-02-19 Tom Tromey <tromey@redhat.com> * tracepoint.c (tfile_traceframe_info): Add 'self' argument. * target.h (struct target_ops) <to_traceframe_info>: Add argument. (target_traceframe_info): Add argument. * target.c (update_current_target): Update. * remote.c (remote_traceframe_info): Add 'self' argument. * ctf.c (ctf_traceframe_info): Add 'self' argument.
2014-02-19Add target_ops argument to to_static_tracepoint_markers_by_stridTom Tromey1-1/+2
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (target_static_tracepoint_markers_by_strid): Add argument. (struct target_ops) <to_static_tracepoint_markers_by_strid>: Add 'self' argument. * target.c (update_current_target): Update. * remote.c (struct target_ops) <to_static_tracepoint_markers_by_strid>: Add 'self' argument. * linux-nat.c (struct target_ops) <to_static_tracepoint_markers_by_strid>: Add 'self' argument.
2014-02-19Add target_ops argument to to_static_tracepoint_marker_atTom Tromey1-1/+1
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_static_tracepoint_marker_at>: Add argument. (target_static_tracepoint_marker_at): Add argument. * target.c (update_current_target): Update. * remote.c (remote_static_tracepoint_marker_at): Add 'self' argument.
2014-02-19Add target_ops argument to to_set_permissionsTom Tromey1-3/+3
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_set_permissions>: Add argument. (target_set_permissions): Add argument. * target.c (update_current_target): Update. * remote.c (remote_set_permissions): Add 'self' argument. (remote_start_remote): Update.
2014-02-19Add target_ops argument to to_get_tib_addressTom Tromey1-1/+1
2014-02-19 Tom Tromey <tromey@redhat.com> * windows-nat.c (windows_get_tib_address): Add 'self' argument. * target.h (struct target_ops) <to_get_tib_address>: Add argument. (target_get_tib_address): Add argument. * target.c (update_current_target): Update. * remote.c (remote_get_tib_address): Add 'self' argument.
2014-02-19Add target_ops argument to to_set_trace_notesTom Tromey1-1/+2
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_set_trace_notes>: Add argument. (target_set_trace_notes): Add argument. * target.c (update_current_target): Update. * remote.c (remote_set_trace_notes): Add 'self' argument.
2014-02-19Add target_ops argument to to_set_trace_buffer_sizeTom Tromey1-1/+1
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_set_trace_buffer_size>: Add argument. (target_set_trace_buffer_size): Add argument. * target.c (update_current_target): Update. * remote.c (remote_set_trace_buffer_size): Add 'self' argument.
2014-02-19Add target_ops argument to to_set_circular_trace_bufferTom Tromey1-1/+1
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_set_circular_trace_buffer>: Add argument. (target_set_circular_trace_buffer): Add argument. * target.c (update_current_target): Update. * remote.c (remote_set_circular_trace_buffer): Add 'self' argument.
2014-02-19Add target_ops argument to to_set_disconnected_tracingTom Tromey1-1/+1
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_set_disconnected_tracing>: Add argument. (target_set_disconnected_tracing): Add argument. * target.c (update_current_target): Update. * remote.c (remote_set_disconnected_tracing): Add 'self' argument.
2014-02-19Add target_ops argument to to_get_min_fast_tracepoint_insn_lenTom Tromey1-1/+1
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_get_min_fast_tracepoint_insn_len>: Add argument. (target_get_min_fast_tracepoint_insn_len): Add argument. * target.c (update_current_target): Update. * remote.c (remote_get_min_fast_tracepoint_insn_len): Add 'self' argument.
2014-02-19Add target_ops argument to to_get_raw_trace_dataTom Tromey1-1/+2
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_get_raw_trace_data>: Add argument. (target_get_raw_trace_data): Add argument. * target.c (update_current_target): Update. * remote.c (remote_get_raw_trace_data): Add 'self' argument.
2014-02-19Add target_ops argument to to_upload_trace_state_variablesTom Tromey1-3/+5
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_upload_trace_state_variables>: Add argument. (target_upload_trace_state_variables): Add argument. * target.c (update_current_target): Update. * remote.c (remote_upload_trace_state_variables): Add 'self' argument. (remote_start_remote): Update.
2014-02-19Add target_ops argument to to_upload_tracepointsTom Tromey1-3/+4
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_upload_tracepoints>: Add argument. (target_upload_tracepoints): Add argument. * target.c (update_current_target): Update. * remote.c (remote_upload_tracepoints): Add 'self' argument. (remote_start_remote): Update.
2014-02-19Add target_ops argument to to_save_trace_dataTom Tromey1-1/+1
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_save_trace_data>: Add argument. (target_save_trace_data): Add argument. * target.c (update_current_target): Update. * remote.c (remote_save_trace_data): Add 'self' argument.
2014-02-19Add target_ops argument to to_get_trace_state_variable_valueTom Tromey1-1/+2
2014-02-19 Tom Tromey <tromey@redhat.com> * tracepoint.c (tfile_get_trace_state_variable_value): Add 'self' argument. * target.h (struct target_ops) <to_get_trace_state_variable_value>: Add argument. (target_get_trace_state_variable_value): Add argument. * target.c (update_current_target): Update. * remote.c (remote_get_trace_state_variable_value): Add 'self' argument. * ctf.c (ctf_get_trace_state_variable_value): Add 'self' argument.
2014-02-19Add target_ops argument to to_trace_findTom Tromey1-1/+2
2014-02-19 Tom Tromey <tromey@redhat.com> * tracepoint.c (tfile_trace_find): Add 'self' argument. * target.h (struct target_ops) <to_trace_find>: Add argument. (target_trace_find): Add argument. * target.c (update_current_target): Update. * remote.c (remote_trace_find): Add 'self' argument. * ctf.c (ctf_trace_find): Add 'self' argument.
2014-02-19Add target_ops argument to to_trace_stopTom Tromey1-1/+1
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_trace_stop>: Add argument. (target_trace_stop): Add argument. * target.c (update_current_target): Update. * remote.c (remote_trace_stop): Add 'self' argument.
2014-02-19Add target_ops argument to to_get_tracepoint_statusTom Tromey1-1/+1
2014-02-19 Tom Tromey <tromey@redhat.com> * tracepoint.c (tfile_get_tracepoint_status): Add 'self' argument. * target.h (struct target_ops) <to_get_tracepoint_status>: Add argument. (target_get_tracepoint_status): Add argument. * target.c (update_current_target): Update. * remote.c (remote_get_tracepoint_status): Add 'self' argument.
2014-02-19Add target_ops argument to to_get_trace_statusTom Tromey1-5/+6
2014-02-19 Tom Tromey <tromey@redhat.com> * tracepoint.c (tfile_get_trace_status): Add 'self' argument. * target.h (struct target_ops) <to_get_trace_status>: Add argument. (target_get_trace_status): Add argument. * target.c (update_current_target): Update. * remote.c (remote_get_trace_status): Add 'self' argument. (remote_start_remote, remote_can_download_tracepoint): Update. * ctf.c (ctf_get_trace_status): Add 'self' argument.
2014-02-19Add target_ops argument to to_trace_startTom Tromey1-1/+1
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_trace_start>: Add argument. (target_trace_start): Add argument. * target.c (update_current_target): Update. * remote.c (remote_trace_start): Add 'self' argument.
2014-02-19Add target_ops argument to to_trace_set_readonly_regionsTom Tromey1-1/+1
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_trace_set_readonly_regions>: Add argument. (target_trace_set_readonly_regions): Add argument. * target.c (update_current_target): Update. * remote.c (remote_trace_set_readonly_regions): Add 'self' argument.
2014-02-19Add target_ops argument to to_disable_tracepointTom Tromey1-1/+2
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_disable_tracepoint>: Add argument. (target_disable_tracepoint): Add argument. * target.c (update_current_target): Update. * remote.c (remote_disable_tracepoint): Add 'self' argument.
2014-02-19Add target_ops argument to to_enable_tracepointTom Tromey1-1/+2
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_enable_tracepoint>: Add argument. (target_enable_tracepoint): Add argument. * target.c (update_current_target): Update. * remote.c (remote_enable_tracepoint): Add 'self' argument.
2014-02-19Add target_ops argument to to_download_trace_state_variableTom Tromey1-1/+2
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_download_trace_state_variable>: Add argument. (target_download_trace_state_variable): Add argument. * target.c (update_current_target): Update. * remote.c (remote_download_trace_state_variable): Add 'self' argument.
2014-02-19Add target_ops argument to to_can_download_tracepointTom Tromey1-1/+1
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_can_download_tracepoint>: Add argument. (target_can_download_tracepoint): Add argument. * target.c (update_current_target): Update. * remote.c (remote_can_download_tracepoint): Add 'self' argument.
2014-02-19Add target_ops argument to to_download_tracepointTom Tromey1-1/+1
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_download_tracepoint>: Add argument. (target_download_tracepoint): Add argument. * target.c (update_current_target): Update. * remote.c (remote_download_tracepoint): Add 'self' argument.
2014-02-19Add target_ops argument to to_trace_initTom Tromey1-1/+1
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_trace_init>: Add argument. (target_trace_init): Add argument. * target.c (update_current_target): Update. * remote.c (remote_trace_init): Add 'self' argument.
2014-02-19Add target_ops argument to to_fileio_readlinkTom Tromey1-1/+2
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_fileio_readlink>: Add argument. * target.c (target_fileio_readlink): Add argument. * remote.c (remote_hostio_readlink): Add 'self' argument. * inf-child.c (inf_child_fileio_readlink): Add 'self' argument.
2014-02-19Add target_ops argument to to_fileio_unlinkTom Tromey1-2/+4
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_fileio_unlink>: Add argument. * target.c (target_fileio_unlink): Add argument. * remote.c (remote_hostio_unlink): Add 'self' argument. (remote_file_delete): Update. * inf-child.c (inf_child_fileio_unlink): Add 'self' argument.
2014-02-19Add target_ops argument to to_fileio_closeTom Tromey1-5/+5
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_fileio_close>: Add argument. * target.c (target_fileio_close): Add argument. * remote.c (remote_hostio_close): Add 'self' argument. (remote_hostio_close_cleanup): Update. (remote_bfd_iovec_close, remote_file_put, remote_file_get): Update. * inf-child.c (inf_child_fileio_close): Add 'self' argument.
2014-02-19Add target_ops argument to to_fileio_preadTom Tromey1-3/+6
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_fileio_pread>: Add argument. * target.c (target_fileio_pread): Add argument. * remote.c (remote_hostio_pread): Add 'self' argument. (remote_bfd_iovec_pread, remote_file_get): Update. * inf-child.c (inf_child_fileio_pread): Add 'self' argument.
2014-02-19Add target_ops argument to to_fileio_pwriteTom Tromey1-2/+4
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_fileio_pwrite>: Add argument. * target.c (target_fileio_pwrite): Add argument. * remote.c (remote_hostio_pwrite): Add 'self' argument. (remote_file_put): Update. * inf-child.c (inf_child_fileio_pwrite): Add 'self' argument.
2014-02-19Add target_ops argument to to_fileio_openTom Tromey1-4/+8
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_fileio_open>: Add argument. * target.c (target_fileio_open): Add argument. * remote.c (remote_hostio_open): Add 'self' argument. (remote_bfd_iovec_open): Add 'self' argument. (remote_file_put): Add 'self' argument. (remote_file_get): Add 'self' argument. * inf-child.c (inf_child_fileio_open): Add 'self' argument.
2014-02-19Add target_ops argument to to_can_run_breakpoint_commandsTom Tromey1-4/+4
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_can_run_breakpoint_commands>: Add argument. (target_can_run_breakpoint_commands): Add argument. * target.c (update_current_target): Update. * remote.c (remote_can_run_breakpoint_commands): Add 'self' argument. (remote_insert_breakpoint): Add 'self' argument. (remote_insert_hw_breakpoint): Add 'self' argument. (remote_can_run_breakpoint_commands): Add 'self' argument.
2014-02-19Add target_ops argument to to_supports_evaluation_of_breakpoint_conditionsTom Tromey1-4/+4
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_supports_evaluation_of_breakpoint_conditions>: Add argument. (target_supports_evaluation_of_breakpoint_conditions): Add argument. * target.c (update_current_target): Update. * remote.c (remote_supports_cond_breakpoints): Add 'self' argument. (remote_insert_breakpoint): Add 'self' argument. (remote_insert_hw_breakpoint): Add 'self' argument. (remote_supports_cond_breakpoints): Add 'self' argument.
2014-02-19Add target_ops argument to to_supports_string_tracingTom Tromey1-1/+1
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_supports_string_tracing>: Add argument. (target_supports_string_tracing): Add argument. * target.c (update_current_target): Update. * remote.c (remote_supports_string_tracing): Add 'self' argument.
2014-02-19Add target_ops argument to to_supports_disable_randomizationTom Tromey1-3/+3
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_supports_disable_randomization>: Add argument. * target.c (find_default_supports_disable_randomization): Add argument. (target_supports_disable_randomization): Add argument. (find_default_supports_disable_randomization): Add 'self' argument. * remote.c (extended_remote_supports_disable_randomization): Add 'self' argument. (remote_supports_disable_randomization): Add 'self' argument. (extended_remote_create_inferior): Update. * linux-nat.c (linux_nat_supports_disable_randomization): Add 'self' argument.
2014-02-19Add target_ops argument to to_supports_enable_disable_tracepointTom Tromey1-1/+1
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_supports_enable_disable_tracepoint>: Add argument. (target_supports_enable_disable_tracepoint): Add argument. * target.c (update_current_target): Update. * remote.c (remote_supports_enable_disable_tracepoint): Add 'self' argument.
2014-02-19Add target_ops argument to to_supports_multi_processTom Tromey1-1/+1
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_supports_multi_process>: Add argument. (target_supports_multi_process): Add argument. * target.c (update_current_target): Update. * remote.c (remote_supports_multi_process): Add 'self' argument. * linux-nat.c (linux_nat_supports_multi_process): Add 'self' argument. * darwin-nat.c (darwin_supports_multi_process): Add 'self' argument.
2014-02-19Add target_ops argument to to_can_execute_reverseTom Tromey1-1/+1
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_can_execute_reverse>: Add argument. (target_can_execute_reverse): Add argument. * remote.c (remote_can_execute_reverse): Add 'self' argument. * record-full.c (record_full_can_execute_reverse): Add 'self' argument. * record-btrace.c (record_btrace_can_execute_reverse): Add 'self' argument.
2014-02-19Add target_ops argument to to_get_ada_task_ptidTom Tromey1-1/+1
2014-02-19 Tom Tromey <tromey@redhat.com> * windows-nat.c (windows_get_ada_task_ptid): Add 'self' argument. * target.h (struct target_ops) <to_get_ada_task_ptid>: Add argument. (target_get_ada_task_ptid): Add argument. * target.c (update_current_target): Update. (default_get_ada_task_ptid): Add 'self' argument. * sol-thread.c (sol_get_ada_task_ptid): Add 'self' argument. * remote.c (remote_get_ada_task_ptid): Add 'self' argument. * ravenscar-thread.c (ravenscar_get_ada_task_ptid): Add 'self' argument. * linux-thread-db.c (thread_db_get_ada_task_ptid): Add 'self' argument. * inf-ttrace.c (inf_ttrace_get_ada_task_ptid): Add 'self' argument. * dec-thread.c (dec_thread_get_ada_task_ptid): Add 'self' argument. * darwin-nat.c (darwin_get_ada_task_ptid): Add 'self' argument. * aix-thread.c (aix_thread_get_ada_task_ptid): Add 'self' argument.