Commit Graph

34339 Commits

Author SHA1 Message Date
Tom Tromey 9249843f19 convert to_get_min_fast_tracepoint_insn_len
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_get_min_fast_tracepoint_insn_len.
	(return_minus_one): Remove.
	* target.h (struct target_ops)
	<to_get_min_fast_tracepoint_insn_len>: Use TARGET_DEFAULT_RETURN.
2014-02-19 07:47:55 -07:00
Tom Tromey ace92e7d14 convert to_get_raw_trace_data
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_get_raw_trace_data.
	* target.h (struct target_ops) <to_get_raw_trace_data>: Use
	TARGET_DEFAULT_NORETURN.
2014-02-19 07:47:55 -07:00
Tom Tromey 081204679d convert to_upload_trace_state_variables
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_upload_trace_state_variables.
	* target.h (struct target_ops) <to_upload_trace_state_variables>:
	Use TARGET_DEFAULT_RETURN.
2014-02-19 07:47:54 -07:00
Tom Tromey 1e949b005f convert to_upload_tracepoints
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_upload_tracepoints.
	* target.h (struct target_ops) <to_upload_tracepoints>: Use
	TARGET_DEFAULT_RETURN.
2014-02-19 07:47:53 -07:00
Tom Tromey a2e6c147fc convert to_save_trace_data
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_save_trace_data.
	* target.h (struct target_ops) <to_save_trace_data>: Use
	TARGET_DEFAULT_NORETURN.
2014-02-19 07:47:52 -07:00
Tom Tromey 959bcd0b39 convert to_get_trace_state_variable_value
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_get_trace_state_variable_value.
	* target.h (struct target_ops)
	<to_get_trace_state_variable_value>: Use TARGET_DEFAULT_RETURN.
2014-02-19 07:47:52 -07:00
Tom Tromey afc94e66d4 convert to_trace_find
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_trace_find.
	* target.h (struct target_ops): Use TARGET_DEFAULT_RETURN.
2014-02-19 07:47:51 -07:00
Tom Tromey e51c07ea4a convert to_trace_stop
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_trace_stop.
	* target.h (struct target_ops) <to_trace_stop>: Use
	TARGET_DEFAULT_NORETURN.
2014-02-19 07:47:50 -07:00
Tom Tromey 6fea14cd31 convert to_get_tracepoint_status
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_get_tracepoint_status.
	* target.h (struct target_ops) <to_get_tracepoint_status>: Use
	TARGET_DEFAULT_NORETURN.
2014-02-19 07:47:49 -07:00
Tom Tromey 4072d4ff86 convert to_get_trace_status
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_get_trace_status.
	* target.h (struct target_ops) <to_get_trace_status>: Use
	TARGET_DEFAULT_RETURN.
2014-02-19 07:47:48 -07:00
Tom Tromey 25da2e807e convert to_trace_start
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_trace_start.
	* target.h (struct target_ops) <to_trace_start>: Use
	TARGET_DEFAULT_NORETURN.
2014-02-19 07:47:48 -07:00
Tom Tromey 86dd181d45 convert to_trace_set_readonly_regions
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_trace_set_readonly_regions.
	* target.h (struct target_ops) <to_trace_set_readonly_regions>:
	Use TARGET_DEFAULT_NORETURN.
2014-02-19 07:47:47 -07:00
Tom Tromey 05c41993a6 convert to_disable_tracepoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_disable_tracepoint.
	* target.h (struct target_ops) <to_disable_tracepoint>: Use
	TARGET_DEFAULT_NORETURN.
2014-02-19 07:47:46 -07:00
Tom Tromey 151f70f10e convert to_enable_tracepoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_enable_tracepoint.
	* target.h (struct target_ops) <to_enable_tracepoint>: Use
	TARGET_DEFAULT_NORETURN.
2014-02-19 07:47:45 -07:00
Tom Tromey 94eb98b974 convert to_download_trace_state_variable
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_download_trace_state_variable.
	* target.h (struct target_ops) <to_download_trace_state_variable>:
	Use TARGET_DEFAULT_NORETURN.
2014-02-19 07:47:44 -07:00
Tom Tromey 719acc4a29 convert to_can_download_tracepoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_can_download_tracepoint.
	* target.h (struct target_ops) <to_can_download_tracepoint>: Use
	TARGET_DEFAULT_RETURN.
2014-02-19 07:47:44 -07:00
Tom Tromey 9a980a22ba convert to_download_tracepoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_download_tracepoint.
	* target.h (struct target_ops) <to_download_tracepoint>: Use
	TARGET_DEFAULT_NORETURN.
2014-02-19 07:47:43 -07:00
Tom Tromey 5536135bf4 convert to_trace_init
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_trace_init.
	* target.h (struct target_ops) <to_trace_init>: Use
	TARGET_DEFAULT_RETURN.
2014-02-19 07:47:42 -07:00
Tom Tromey 9409d39e87 convert to_supports_string_tracing
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_supports_string_tracing.
	* target.h (struct target_ops) <to_supports_string_tracing>: Use
	TARGET_DEFAULT_RETURN.
2014-02-19 07:47:41 -07:00
Tom Tromey aab1b22d31 convert to_supports_enable_disable_tracepoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_supports_enable_disable_tracepoint.
	* target.h (struct target_ops)
	<to_supports_enable_disable_tracepoint>: Use
	TARGET_DEFAULT_RETURN.
2014-02-19 07:47:40 -07:00
Tom Tromey a730474877 convert to_supports_multi_process
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_supports_multi_process.
	* target.h (struct target_ops) <to_supports_multi_process>: Use
	TARGET_DEFAULT_RETURN.
2014-02-19 07:47:39 -07:00
Tom Tromey 4229b31de2 convert to_get_ada_task_ptid
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_get_ada_task_ptid.
	* target.h (struct target_ops) <to_get_ada_task_ptid>: Use
	TARGET_DEFAULT_FUNC.
2014-02-19 07:47:38 -07:00
Tom Tromey 43eba18084 convert to_thread_architecture
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_thread_architecture.
	* target.h (struct target_ops) <to_thread_architecture>: Use
	TARGET_DEFAULT_FUNC.
2014-02-19 07:47:37 -07:00
Tom Tromey fe31bf5b9e convert to_execution_direction
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_execution_direction.
	* target.h (struct target_ops) <to_execution_direction>: Use
	TARGET_DEFAULT_FUNC.
2014-02-19 07:47:36 -07:00
Tom Tromey 53e1cfc77f convert to_can_execute_reverse
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_can_execute_reverse.
	* target.h (struct target_ops) <to_can_execute_reverse>: Use
	TARGET_DEFAULT_RETURN.
	(target_can_execute_reverse): Unconditionally delegate.
2014-02-19 07:47:35 -07:00
Tom Tromey 9bb9d61d2f convert to_goto_bookmark
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_goto_bookmark.
	(dummy_goto_bookmark): Remove.
	(init_dummy_target): Don't inherit or default to_goto_bookmark.
	* target.h (struct target_ops) <to_goto_bookmark>: Use
	TARGET_DEFAULT_NORETURN.
2014-02-19 07:47:34 -07:00
Tom Tromey 3dbafbbb27 convert to_get_bookmark
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_get_bookmark.
	(dummy_get_bookmark): Remove.
	(init_dummy_target): Don't inherit or default to_get_bookmark.
	* target.h (struct target_ops) <to_get_bookmark>: Use
	TARGET_DEFAULT_NORETURN
2014-02-19 07:47:33 -07:00
Tom Tromey 16f796b16a convert to_make_corefile_notes
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_make_corefile_notes.
	(init_dummy_target): Don't initialize to_make_corefile_notes.
	* target.h (struct target_ops) <to_make_corefile_notes>: Use
	TARGET_DEFAULT_FUNC.
2014-02-19 07:47:32 -07:00
Tom Tromey 0b5a271985 convert to_find_memory_regions
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_find_memory_regions.
	(init_dummy_target): Don't initialize to_find_memory_regions.
	* target.h (struct target_ops) <to_find_memory_regions>: Use
	TARGET_DEFAULT_FUNC.
2014-02-19 07:47:31 -07:00
Tom Tromey d9cb019581 convert to_log_command
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_log_command.
	* target.h (struct target_ops) <to_log_command>: Use
	TARGET_DEFAULT_IGNORE.
	(target_log_command): Unconditionally delegate.
2014-02-19 07:47:30 -07:00
Tom Tromey 830ca33050 convert to_pid_to_exec_file
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_pid_to_exec_file.
	* target.h (struct target_ops) <to_pid_to_exec_file>: Use
	TARGET_DEFAULT_RETURN.
2014-02-19 07:47:30 -07:00
Tom Tromey 825828fcf3 convert to_thread_name
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_thread_name.
	(target_thread_name): Unconditionally delegate.
	* target.h (struct target_ops) <to_thread_name>: Use
	TARGET_DEFAULT_RETURN.
2014-02-19 07:47:29 -07:00
Tom Tromey 4a7e6dda8a convert to_extra_thread_info
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_extra_thread_info.
	* target.h (struct target_ops) <to_extra_thread_info>: Use
	TARGET_DEFAULT_RETURN.
2014-02-19 07:47:28 -07:00
Tom Tromey 0db88c1ddc convert to_has_exited
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_has_exited.
	* target.h (struct target_ops) <to_has_exited>: Use
	TARGET_DEFAULT_RETURN..
2014-02-19 07:47:27 -07:00
Tom Tromey 6a9fa05147 convert to_set_syscall_catchpoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_set_syscall_catchpoint.
	(return_one): Remove.
	* target.h (struct target_ops) <to_set_syscall_catchpoint>: Use
	TARGET_DEFAULT_RETURN.
2014-02-19 07:47:26 -07:00
Tom Tromey cda0f38c9e convert to_remove_exec_catchpoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_insert_exec_catchpoint.
	* target.h (struct target_ops) <to_insert_exec_catchpoint>: Use
	TARGET_DEFAULT_RETURN.
2014-02-19 07:47:25 -07:00
Tom Tromey 62f64d7a6a convert to_insert_exec_catchpoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_insert_exec_catchpoint.
	* target.h (struct target_ops) <to_insert_exec_catchpoint>: Use
	TARGET_DEFAULT_RETURN.
2014-02-19 07:47:24 -07:00
Tom Tromey 95c3375e47 convert to_remove_vfork_catchpoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_remove_vfork_catchpoint.
	* target.h (struct target_ops) <to_remove_vfork_catchpoint>: Use
	TARGET_DEFAULT_RETURN.
2014-02-19 07:47:23 -07:00
Tom Tromey 7e18a8dc59 convert to_insert_vfork_catchpoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_insert_vfork_catchpoint.
	* target.h (struct target_ops) <to_insert_vfork_catchpoint>: Use
	TARGET_DEFAULT_RETURN.
2014-02-19 07:47:22 -07:00
Tom Tromey e1a21fb7aa convert to_remove_fork_catchpoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_remove_fork_catchpoint.
	* target.h (struct target_ops) <to_remove_fork_catchpoint>: Use
	TARGET_DEFAULT_RETURN.
2014-02-19 07:47:21 -07:00
Tom Tromey 5958ebeb13 convert to_insert_fork_catchpoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_insert_fork_catchpoint.
	* target.h (struct target_ops) <to_insert_fork_catchpoint>: Use
	TARGET_DEFAULT_RETURN.
2014-02-19 07:47:20 -07:00
Tom Tromey 340ba4bf67 convert to_post_startup_inferior
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_post_startup_inferior.
	* target.h (struct target_ops) <to_post_startup_inferior>: Use
	TARGET_DEFAULT_IGNORE.
2014-02-19 07:47:19 -07:00
Tom Tromey 7634da8766 convert to_load
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_load.
	* target.h (struct target_ops) <to_load>: Use
	TARGET_DEFAULT_NORETURN.
2014-02-19 07:47:18 -07:00
Tom Tromey e19e919fea convert to_terminal_info
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_terminal_info.
	* target.h (struct target_ops) <to_terminal_info>: Use
	TARGET_DEFAULT_FUNC.
2014-02-19 07:47:17 -07:00
Tom Tromey c6ea8f7983 convert to_terminal_save_ours
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_terminal_save_ours.
	* target.h (struct target_ops) <to_terminal_save_ours>: Use
	TARGET_DEFAULT_IGNORE.
2014-02-19 07:47:16 -07:00
Tom Tromey e4a733f17e convert to_terminal_ours
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_terminal_ours.
	* target.h (struct target_ops) <to_terminal_ours>: Use
	TARGET_DEFAULT_IGNORE.
2014-02-19 07:47:15 -07:00
Tom Tromey 74fcbef986 convert to_terminal_ours_for_output
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_terminal_ours_for_output.
	* target.h (struct target_ops) <to_terminal_ours_for_output>: Use
	TARGET_DEFAULT_IGNORE.
2014-02-19 07:47:15 -07:00
Tom Tromey ddeaacc9e1 convert to_terminal_inferior
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_terminal_inferior.
	* target.h (struct target_ops) <to_terminal_inferior>: Use
	TARGET_DEFAULT_IGNORE.
2014-02-19 07:47:14 -07:00
Tom Tromey 0343661d23 convert to_terminal_init
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_terminal_init.
	* target.h (struct target_ops) <to_terminal_init>: Use
	TARGET_DEFAULT_IGNORE.
2014-02-19 07:47:13 -07:00
Tom Tromey 77cdffe90e convert to_can_accel_watchpoint_condition
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_can_accel_watchpoint_condition.
	* target.h (struct target_ops)
	<to_can_accel_watchpoint_condition>: Use TARGET_DEFAULT_RETURN.
2014-02-19 07:47:12 -07:00
Tom Tromey d03655e4a5 convert to_region_ok_for_hw_watchpoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_region_ok_for_hw_watchpoint.
	* target.h (struct target_ops) <to_region_ok_for_hw_watchpoint>:
	Use TARGET_DEFAULT_FUNC.
2014-02-19 07:47:11 -07:00
Tom Tromey 65f160a9b3 convert to_watchpoint_addr_within_range
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_watchpoint_addr_within_range.
	* target.h (struct target_ops) <to_watchpoint_addr_within_range>:
	Use TARGET_DEFAULT_FUNC.
2014-02-19 07:47:10 -07:00
Tom Tromey 61dd109f60 convert to_remove_watchpoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_remove_watchpoint.
	* target.h (struct target_ops) <to_remove_watchpoint>: Use
	TARGET_DEFAULT_NORETURN.
2014-02-19 07:47:09 -07:00
Tom Tromey 016facd45b convert to_insert_watchpoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_insert_watchpoint.
	* target.h (struct target_ops) <to_insert_watchpoint>: Use
	TARGET_DEFAULT_RETURN.
2014-02-19 07:47:08 -07:00
Tom Tromey 418dabacd2 convert to_remove_hw_breakpoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_remove_hw_breakpoint.
	* target.h (struct target_ops) <to_remove_hw_breakpoint>: Use
	TARGET_DEFAULT_RETURN.
2014-02-19 07:47:07 -07:00
Tom Tromey 61b371f944 convert to_insert_hw_breakpoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_insert_hw_breakpoint.
	* target.h (struct target_ops) <to_insert_hw_breakpoint>: Use
	TARGET_DEFAULT_RETURN.
2014-02-19 07:47:06 -07:00
Tom Tromey 52b51d06f8 convert to_can_use_hw_breakpoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_can_use_hw_breakpoint.
	* target.h (struct target_ops) <to_can_use_hw_breakpoint>: Use
	TARGET_DEFAULT_RETURN.
2014-02-19 07:47:05 -07:00
Tom Tromey f86e59b2d1 convert to_files_info
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_files_info.
	* target.h (struct target_ops) <to_files_info>: Use
	TARGET_DEFAULT_IGNORE.
2014-02-19 07:47:04 -07:00
Tom Tromey 6c62816386 convert to_prepare_to_store
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_store.
	* target.h (struct target_ops) <to_store>: Use
	TARGET_DEFAULT_NORETURN.
2014-02-19 07:47:03 -07:00
Tom Tromey bebd3233bf convert to_post_attach
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_post_attach.
	* target.h (struct target_ops) <to_post_attach>: Use
	TARGET_DEFAULT_IGNORE.
2014-02-19 07:47:02 -07:00
Tom Tromey a53f36250e convert to_rcmd
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_rcmd.
	(default_rcmd): New function.
	(do_monitor_command): Unconditionally delegate.
	* target.h (struct target_ops) <to_rmcd>: Use
	TARGET_DEFAULT_FUNC.
2014-02-19 07:47:01 -07:00
Tom Tromey e9a2920092 convert to_attach
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (init_dummy_target): Don't initialize to_attach.
	(target_attach): Unconditionally delegate.
	* target.h (struct target_ops) <to_attach>: Use
	TARGET_DEFAULT_FUNC.
2014-02-19 07:47:01 -07:00
Tom Tromey 09da0d0ae7 convert to_detach
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (target_detach): Unconditionally delegate.
	(init_dummy_target): Don't initialize to_detach.
	* target.h (struct target_ops) <to_detach>: Use
	TARGET_DEFAULT_IGNORE.
2014-02-19 07:47:00 -07:00
Tom Tromey 5436ff0304 Add target_ops argument to to_augmented_libraries_svr4_read
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-19 07:46:59 -07:00
Tom Tromey f0d960ea2f Add target_ops argument to to_call_history_range
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_call_history_range>: Add
	argument.
	* target.c (target_call_history_range): Add argument.
	* record-btrace.c (record_btrace_call_history_range): Add 'self'
	argument.
	(record_btrace_call_history_from): Update.
2014-02-19 07:46:58 -07:00
Tom Tromey ec0aea0490 Add target_ops argument to to_call_history_from
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_call_history_from>: Add
	argument.
	* target.c (target_call_history_from): Add argument.
	* record-btrace.c (record_btrace_call_history_from): Add 'self'
	argument.
2014-02-19 07:46:57 -07:00
Tom Tromey 5df2fcba0d Add target_ops argument to to_call_history
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_call_history>: Add argument.
	* target.c (target_call_history): Add argument.
	* record-btrace.c (record_btrace_call_history): Add 'self'
	argument.
2014-02-19 07:46:56 -07:00
Tom Tromey 4e99c6b708 Add target_ops argument to to_insn_history_range
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_insn_history_range>: Add
	argument.
	* target.c (target_insn_history_range): Add argument.
	* record-btrace.c (record_btrace_insn_history_range): Add 'self'
	argument.
	(record_btrace_insn_history_from): Update.
2014-02-19 07:46:55 -07:00
Tom Tromey 9abc3ff39e Add target_ops argument to to_insn_history_from
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_insn_history_from>: Add
	argument.
	* target.c (target_insn_history_from): Add argument.
	* record-btrace.c (record_btrace_insn_history_from): Add 'self'
	argument.
2014-02-19 07:46:54 -07:00
Tom Tromey 7a6c5609f7 Add target_ops argument to to_insn_history
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_insn_history>: Add argument.
	* target.c (target_insn_history): Add argument.
	* record-btrace.c (record_btrace_insn_history): Add 'self'
	argument.
2014-02-19 07:46:53 -07:00
Tom Tromey 606183ac2c Add target_ops argument to to_goto_record
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_goto_record>: Add argument.
	* target.c (target_goto_record): Add argument.
	* record-full.c (record_full_goto): Add 'self' argument.
	* record-btrace.c (record_btrace_goto): Add 'self' argument.
2014-02-19 07:46:52 -07:00
Tom Tromey 307a1b91cc Add target_ops argument to to_goto_record_end
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_goto_record_end>: Add argument.
	* target.c (target_goto_record_end): Add argument.
	* record-full.c (record_full_goto_end): Add 'self' argument.
	* record-btrace.c (record_btrace_goto_end): Add 'self' argument.
2014-02-19 07:46:51 -07:00
Tom Tromey 084758178f Add target_ops argument to to_goto_record_begin
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_goto_record_begin>: Add
	argument.
	* target.c (target_goto_record_begin): Add argument.
	* record-full.c (record_full_goto_begin): Add 'self' argument.
	* record-btrace.c (record_btrace_goto_begin): Add 'self'
	argument.
2014-02-19 07:46:51 -07:00
Tom Tromey 1c63c99491 Add target_ops argument to to_record_is_replaying
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_record_is_replaying>: Add
	argument.
	* target.c (target_record_is_replaying): Add argument.
	* record-full.c (record_full_is_replaying): Add 'self' argument.
	* record-btrace.c (record_btrace_is_replaying): Add 'self'
	argument.
	(record_btrace_xfer_partial, record_btrace_store_registers)
	(record_btrace_prepare_to_store, record_btrace_resume)
	(record_btrace_wait, record_btrace_decr_pc_after_break)
	(record_btrace_find_new_threads, record_btrace_thread_alive):
	Update.
2014-02-19 07:46:50 -07:00
Tom Tromey d1b55219eb Add target_ops argument to to_delete_record
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_delete_record>: Add argument.
	* target.c (target_delete_record): Add argument.
	* record-full.c (record_full_delete): Add 'self' argument.
2014-02-19 07:46:49 -07:00
Tom Tromey 1390f5296f Add target_ops argument to to_save_record
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_save_record>: Add argument.
	* target.c (target_save_record): Add argument.
	* record-full.c (record_full_save): Add 'self' argument.
	(record_full_save): Add 'self' argument.
2014-02-19 07:46:48 -07:00
Tom Tromey 630d6a4ad3 Add target_ops argument to to_info_record
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_info_record>: Add argument.
	* target.c (target_info_record): Add argument.
	* record.c (info_record_command): Add argument.
	* record-full.c (record_full_info): Add 'self' argument.
	* record-btrace.c (record_btrace_info): Add 'self' argument.
2014-02-19 07:46:47 -07:00
Tom Tromey c6cd7c02d1 Add target_ops argument to to_stop_recording
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_stop_recording>: Add argument.
	* target.c (target_stop_recording): Add argument.
	* record.c (record_stop): Add argument.
	* record-btrace.c (record_btrace_stop_recording): Add 'self'
	argument.
2014-02-19 07:46:46 -07:00
Tom Tromey 39c49f83b6 Add target_ops argument to to_read_btrace
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-19 07:46:45 -07:00
Tom Tromey 1777056d68 Add target_ops argument to to_teardown_btrace
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-19 07:46:44 -07:00
Tom Tromey 25e95349d8 Add target_ops argument to to_disable_btrace
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-19 07:46:43 -07:00
Tom Tromey e3c49f88a2 Add target_ops argument to to_enable_btrace
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-19 07:46:42 -07:00
Tom Tromey fe38f8971f Add target_ops argument to to_can_use_agent
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-19 07:46:41 -07:00
Tom Tromey 2c152180b3 Add target_ops argument to to_use_agent
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-19 07:46:40 -07:00
Tom Tromey a893e81f18 Add target_ops argument to to_traceframe_info
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-19 07:46:39 -07:00
Tom Tromey c686c57f02 Add target_ops argument to to_static_tracepoint_markers_by_strid
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-19 07:46:38 -07:00
Tom Tromey 61fc905df3 Add target_ops argument to to_static_tracepoint_marker_at
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-19 07:46:37 -07:00
Tom Tromey c378d69dff Add target_ops argument to to_set_permissions
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-19 07:46:36 -07:00
Tom Tromey bd7ae0f5ac Add target_ops argument to to_get_tib_address
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-19 07:46:35 -07:00
Tom Tromey d9e68a2c60 Add target_ops argument to to_set_trace_notes
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-19 07:46:35 -07:00
Tom Tromey 4da384beed Add target_ops argument to to_set_trace_buffer_size
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-19 07:46:34 -07:00
Tom Tromey 736d5b1fc4 Add target_ops argument to to_set_circular_trace_buffer
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-19 07:46:33 -07:00
Tom Tromey 37b2573848 Add target_ops argument to to_set_disconnected_tracing
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-19 07:46:32 -07:00
Tom Tromey 0e67620a27 Add target_ops argument to to_get_min_fast_tracepoint_insn_len
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-19 07:46:31 -07:00
Tom Tromey 88ee6f45bb Add target_ops argument to to_get_raw_trace_data
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-19 07:46:30 -07:00
Tom Tromey 181e3713eb Add target_ops argument to to_upload_trace_state_variables
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-19 07:46:29 -07:00
Tom Tromey ab6617cc1b Add target_ops argument to to_upload_tracepoints
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-19 07:46:28 -07:00
Tom Tromey dc3decafdd Add target_ops argument to to_save_trace_data
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-19 07:46:27 -07:00
Tom Tromey 4011015ba2 Add target_ops argument to to_get_trace_state_variable_value
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-19 07:46:26 -07:00
Tom Tromey bd4c67938f Add target_ops argument to to_trace_find
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-19 07:46:25 -07:00
Tom Tromey 74499f1bf2 Add target_ops argument to to_trace_stop
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-19 07:46:24 -07:00
Tom Tromey db90e85c81 Add target_ops argument to to_get_tracepoint_status
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-19 07:46:23 -07:00
Tom Tromey 8bd200f160 Add target_ops argument to to_get_trace_status
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-19 07:46:22 -07:00
Tom Tromey e2d1aae372 Add target_ops argument to to_trace_start
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-19 07:46:21 -07:00
Tom Tromey 583f9a86a4 Add target_ops argument to to_trace_set_readonly_regions
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-19 07:46:20 -07:00
Tom Tromey 780b049caa Add target_ops argument to to_disable_tracepoint
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-19 07:46:19 -07:00
Tom Tromey 46670d57e3 Add target_ops argument to to_enable_tracepoint
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-19 07:46:18 -07:00
Tom Tromey 559d2b81f0 Add target_ops argument to to_download_trace_state_variable
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-19 07:46:18 -07:00
Tom Tromey a52a8357cf Add target_ops argument to to_can_download_tracepoint
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-19 07:46:17 -07:00
Tom Tromey 548f7808ad Add target_ops argument to to_download_tracepoint
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-19 07:46:16 -07:00
Tom Tromey ecae04e1df Add target_ops argument to to_trace_init
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-19 07:46:15 -07:00
Tom Tromey fab5aa7c3f Add target_ops argument to to_fileio_readlink
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-19 07:46:14 -07:00
Tom Tromey dbbca37d38 Add target_ops argument to to_fileio_unlink
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-19 07:46:13 -07:00
Tom Tromey df39ea259c Add target_ops argument to to_fileio_close
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-19 07:46:13 -07:00
Tom Tromey a3be983cee Add target_ops argument to to_fileio_pread
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-19 07:46:12 -07:00
Tom Tromey 0d866f62e8 Add target_ops argument to to_fileio_pwrite
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-19 07:46:11 -07:00
Tom Tromey cd89758676 Add target_ops argument to to_fileio_open
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-19 07:46:10 -07:00
Tom Tromey 78eff0ec9d Add target_ops argument to to_can_run_breakpoint_commands
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-19 07:46:09 -07:00
Tom Tromey efcc2da70e Add target_ops argument to to_supports_evaluation_of_breakpoint_conditions
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-19 07:46:08 -07:00
Tom Tromey 6de37a3aae Add target_ops argument to to_supports_string_tracing
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-19 07:46:07 -07:00
Tom Tromey 2bfc0540a2 Add target_ops argument to to_supports_disable_randomization
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-19 07:46:07 -07:00
Tom Tromey 7d178d6aa5 Add target_ops argument to to_supports_enable_disable_tracepoint
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-19 07:46:06 -07:00
Tom Tromey 86ce266821 Add target_ops argument to to_supports_multi_process
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-19 07:46:05 -07:00
Tom Tromey 4c6127599b Add target_ops argument to to_execution_direction
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_execution_direction>: Add
	argument.
	(target_execution_direction): Add argument.
	* target.c (default_execution_direction): Add 'self' argument.
	* record-full.c (record_full_execution_direction): Add 'self'
	argument.
2014-02-19 07:46:04 -07:00
Tom Tromey 19db3e69f3 Add target_ops argument to to_can_execute_reverse
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-19 07:46:03 -07:00
Tom Tromey 1e6b91a4bf Add target_ops argument to to_get_ada_task_ptid
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.
2014-02-19 07:46:02 -07:00
Tom Tromey 3c80fb48ec Add target_ops argument to to_goto_bookmark
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_goto_bookmark>: Add argument.
	(target_goto_bookmark): Add argument.
	* target.c (dummy_goto_bookmark): Add 'self' argument.
	* record-full.c (record_full_goto_bookmark): Add 'self' argument.
2014-02-19 07:46:01 -07:00
Tom Tromey dd0e2830ee Add target_ops argument to to_get_bookmark
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_get_bookmark>: Add argument.
	(target_get_bookmark): Add argument.
	* target.c (dummy_get_bookmark): Add 'self' argument.
	* record-full.c (record_full_get_bookmark): Add 'self' argument.
2014-02-19 07:46:01 -07:00
Tom Tromey fc6691b259 Add target_ops argument to to_make_corefile_notes
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_make_corefile_notes>: Add
	argument.
	(target_make_corefile_notes): Add argument.
	* target.c (dummy_make_corefile_notes): Add 'self' argument.
	* procfs.c (procfs_make_note_section): Add 'self' argument.
	(procfs_make_note_section): Add 'self' argument.
	(procfs_make_note_section): Add 'self' argument.
	* linux-nat.c (linux_nat_make_corefile_notes): Add 'self'
	argument.
	* fbsd-nat.h (fbsd_make_corefile_notes): Add 'self' argument.
	* fbsd-nat.c (fbsd_make_corefile_notes): Add 'self' argument.
	* exec.c (exec_make_note_section): Add 'self' argument.
	(exec_make_note_section): Add 'self' argument.
2014-02-19 07:46:00 -07:00
Tom Tromey 2e73927ca5 Add target_ops argument to to_find_memory_regions
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_find_memory_regions>: Add
	argument.
	(target_find_memory_regions): Add argument.
	* target.c (dummy_find_memory_regions): Add 'self' argument.
	* procfs.c (proc_find_memory_regions): Add 'self' argument.
	* gnu-nat.c (gnu_find_memory_regions): Add 'self' argument.
	* fbsd-nat.h (fbsd_find_memory_regions): Add 'self' argument.
	* fbsd-nat.c (fbsd_find_memory_regions): Add 'self' argument.
	* exec. (exec_do_find_memory_regions): New global.
	(exec_set_find_memory_regions): Rewrite.
	(exec_find_memory_regions): New function.
	(init_exec_ops): Use exec_find_memory_regions.
2014-02-19 07:45:59 -07:00
Tom Tromey 2a9a2795ff Add target_ops argument to to_supports_non_stop
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_supports_non_stop>: Add
	argument.
	* target.c (find_default_supports_non_stop): Add argument.
	(target_supports_non_stop): Add argument.
	(find_default_supports_non_stop): Add 'self' argument.
	* remote.c (remote_supports_non_stop): Add 'self' argument.
	* linux-nat.c (linux_nat_supports_non_stop): Add 'self' argument.
2014-02-19 07:45:58 -07:00
Tom Tromey 4ab76ea3fb Add target_ops argument to to_log_command
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_log_command>: Add argument.
	(target_log_command): Add argument.
	* serial.h (serial_log_command): Add 'self' argument.
	* serial.c (serial_log_command): Add 'self' argument.
2014-02-19 07:45:57 -07:00
Tom Tromey 8dd27370eb Add target_ops argument to to_pid_to_exec_file
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* windows-nat.c (windows_pid_to_exec_file): Add 'self' argument.
	* target.h (struct target_ops) <to_pid_to_exec_file>: Add
	argument.
	(target_pid_to_exec_file): Add argument.
	* target.c (debug_to_pid_to_exec_file): Add argument.
	(update_current_target): Update.
	* nbsd-nat.h (nbsd_pid_to_exec_file): Add 'self' argument.
	* nbsd-nat.c (nbsd_pid_to_exec_file): Add 'self' argument.
	* linux-nat.c (linux_child_pid_to_exec_file): Add 'self' argument.
	(linux_handle_extended_wait): Update.
	* inf-child.c (inf_child_pid_to_exec_file): Add 'self' argument.
	* fbsd-nat.h (fbsd_pid_to_exec_file): Add 'self' argument.
	* fbsd-nat.c (fbsd_pid_to_exec_file): Add 'self' argument.
	* darwin-nat.c (darwin_pid_to_exec_file): Add 'self' argument.
2014-02-19 07:45:56 -07:00
Tom Tromey 1aac633be6 Add target_ops argument to to_rcmd
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_rcmd>: Add argument.
	(target_rcmd): Add argument.
	* target.c (debug_to_rcmd): Add argument.
	(update_current_target, do_monitor_command): Update.
	* remote.c (remote_rcmd): Add 'self' argument.
	* monitor.c (monitor_rcmd): Add 'self' argument.
2014-02-19 07:45:56 -07:00
Tom Tromey 1eab8a48bf Add target_ops argument to to_stop
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* windows-nat.c (windows_stop): Add 'self' argument.
	* target.h (struct target_ops) <to_stop>: Add argument.
	* target.c (target_stop): Add argument.
	(debug_to_stop): Add argument.
	(update_current_target): Update.
	* remote.c (remote_stop): Add 'self' argument.
	* remote-sim.c (gdbsim_stop): Add 'self' argument.
	(gdbsim_cntrl_c): Update.
	* remote-m32r-sdi.c (m32r_stop): Add 'self' argument.
	* procfs.c (procfs_stop): Add 'self' argument.
	* nto-procfs.c (procfs_stop): Add 'self' argument.
	* monitor.c (monitor_stop): Add 'self' argument.
	(monitor_open): Update.
	* linux-nat.c (linux_nat_stop): Add argument.
	* inf-ptrace.c (inf_ptrace_stop): Add 'self' argument.
	* gnu-nat.c (gnu_stop): Add 'self' argument.
	* darwin-nat.c (darwin_stop): Add 'self' argument.
2014-02-19 07:45:55 -07:00
Tom Tromey 503a628d9b Add target_ops argument to to_thread_name
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_thread_name>: Add argument.
	* target.c (target_thread_name): Add argument.
	(update_current_target): Update.
	* linux-nat.c (linux_nat_thread_name): Add 'self' argument.
2014-02-19 07:45:54 -07:00
Tom Tromey c15906d8e6 Add target_ops argument to to_extra_thread_info
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_extra_thread_info>: Add
	argument.
	(target_extra_thread_info): Add argument.
	* target.c (update_current_target): Update.
	* remote.c (remote_threads_extra_info): Add 'self' argument.
	* ravenscar-thread.c (ravenscar_extra_thread_info): Add 'self'
	argument.
	* nto-tdep.h (nto_extra_thread_info): Add 'self' argument.
	* nto-tdep.c (nto_extra_thread_info): Add 'self' argument.
	* linux-thread-db.c (thread_db_extra_thread_info): Add 'self'
	argument.
	* inf-ttrace.c (inf_ttrace_extra_thread_info): Add 'self'
	argument.
	* bsd-uthread.c (bsd_uthread_extra_thread_info): Add 'self'
	argument.
	* aix-thread.c (aix_thread_extra_thread_info): Add 'self'
	argument.
2014-02-19 07:45:53 -07:00
Tom Tromey daf5e9b64c Add target_ops argument to to_program_signals
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_program_signals>: Add argument.
	* target.c (target_program_signals): Add argument.
	* remote.c (remote_program_signals): Add 'self' argument.
2014-02-19 07:45:52 -07:00
Tom Tromey 94bedb42a7 Add target_ops argument to to_pass_signals
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_pass_signals>: Add argument.
	* target.c (target_pass_signals): Add argument.
	* remote.c (remote_pass_signals): Add 'self' argument.
	(remote_start_remote): Update.
	* procfs.c (procfs_pass_signals): Add 'self' argument.
	* nto-procfs.c (procfs_pass_signals): Add 'self' argument.
	* linux-nat.c (linux_nat_pass_signals): Add 'self' argument.
	(linux_nat_create_inferior, linux_nat_attach): Update.
2014-02-19 07:45:51 -07:00
Tom Tromey da82bd6b65 Add target_ops argument to to_can_run
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* windows-nat.c (windows_can_run): Add 'self' argument.
	* target.h (struct target_ops) <to_can_run>: Add argument.
	(target_can_run): Add argument.
	* target.c (debug_to_can_run): Add argument.
	(update_current_target): Update.
	* nto-procfs.c (procfs_can_run): Add 'self' argument.
	* inf-child.c (inf_child_can_run): Add 'self' argument.
	* go32-nat.c (go32_can_run): Add 'self' argument.
2014-02-19 07:45:50 -07:00
Tom Tromey d796e1d62f Add target_ops argument to to_has_exited
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_has_exited>: Add argument.
	(target_has_exited): Add argument.
	* target.c (debug_to_has_exited): Add argument.
	(update_current_target): Update.
2014-02-19 07:45:49 -07:00
Tom Tromey ff214e679c Add target_ops argument to to_set_syscall_catchpoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_set_syscall_catchpoint>: Add
	argument.
	(target_set_syscall_catchpoint): Add argument.
	* linux-nat.c (linux_child_set_syscall_catchpoint): Add 'self'
	argument.
	* target.c (update_current_target): Update.
2014-02-19 07:45:48 -07:00
Tom Tromey 758e29d2cd Add target_ops argument to to_remove_exec_catchpoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_remove_exec_catchpoint>: Add
	argument.
	(target_remove_exec_catchpoint): Add argument.
	* target.c (debug_to_remove_exec_catchpoint): Add argument.
	(update_current_target): Update.
	* linux-nat.c (linux_child_remove_exec_catchpoint): Add 'self'
	argument.
2014-02-19 07:45:48 -07:00
Tom Tromey ba025e51ae Add target_ops argument to to_insert_exec_catchpoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_insert_exec_catchpoint>: Add
	argument.
	(target_insert_exec_catchpoint): Add argument.
	* target.c (debug_to_insert_exec_catchpoint): Add argument.
	(update_current_target): Update.
	* linux-nat.c (linux_child_insert_exec_catchpoint): Add 'self'
	argument.
2014-02-19 07:45:47 -07:00
Tom Tromey e98cf0cd4f Add target_ops argument to to_remove_vfork_catchpoint
2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_remove_vfork_catchpoint>: Add
	argument.
	(target_remove_vfork_catchpoint): Add argument.
	* target.c (debug_to_remove_vfork_catchpoint): Add argument.
	(update_current_target): Update.
	* linux-nat.c (linux_child_remove_vfork_catchpoint): Add 'self'
	argument.
2014-02-19 07:45:46 -07:00
Tom Tromey 3ecc7da0cb Add target_ops argument to to_insert_vfork_catchpoint
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-19 07:45:45 -07:00
Tom Tromey 973fc22752 Add target_ops argument to to_remove_fork_catchpoint
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-19 07:45:44 -07:00
Tom Tromey a863b201d7 Add target_ops argument to to_insert_fork_catchpoint
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-19 07:45:44 -07:00
Tom Tromey 2e97a79e22 Add target_ops argument to to_post_startup_inferior
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-19 07:45:43 -07:00
Tom Tromey 71a9f134da Add target_ops argument to to_load
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-19 07:45:42 -07:00
Tom Tromey 0a4f40a208 Add target_ops argument to to_terminal_info
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-19 07:45:41 -07:00
Tom Tromey ae3bd4315d Add target_ops argument to to_terminal_save_ours
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-19 07:45:40 -07:00
Tom Tromey e3594fd196 Add target_ops argument to to_terminal_ours
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-19 07:45:39 -07:00
Tom Tromey 2e1e1a193c Add target_ops argument to to_terminal_ours_for_output
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-19 07:45:38 -07:00
Tom Tromey d2f640d43a Add target_ops argument to to_terminal_inferior
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-19 07:45:38 -07:00
Tom Tromey c42bf2866f Add target_ops argument to to_terminal_init
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-19 07:45:37 -07: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 f045800c90 Add target_ops argument to to_post_attach
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-19 07:45:29 -07:00
Tom Tromey de90e03d4c Add target_ops argument to to_close
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-19 07:45:28 -07:00
Tom Tromey 9dd130a0f0 introduce remote_load
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-19 07:45:27 -07:00
Tom Tromey 46917d26c8 convert to_supports_btrace
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-19 07:45:26 -07:00
Tom Tromey 6b84065d0e add target method delegation
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-19 07:45:25 -07:00
Tom Tromey 1101cb7b3b add make-target-delegates
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-19 07:45:24 -07:00
Tom Tromey 8b06beed0f introduce and use find_target_at
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-19 07:45:22 -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
Yao Qi e095146be2 Fix PR16220
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-19 10:48:21 +08:00
Doug Evans c17ef0d5d2 New TESTS variable to run a subset of tests in parallel.
* 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 16:11:02 -08:00
Doug Evans 5dd3176fb7 * Makefile.in (check-parallel): rm -rf outputs temp. 2014-02-18 16:01:34 -08:00
Kevin Buettner bc3c6b3642 Add g10 support to rl78-tdep.c.
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-17 12:03:23 -07:00
Doug Evans 329baa9572 Split python docs into separate file.
* Makefile.in (GDB_DOC_FILES): Add python.texi.
	* gdb.texinfo (Python): Moved to ...
	* python.texi: ... here.  New file.
2014-02-17 10:35:03 -08:00
Doug Evans d25f38ee87 Remove doc/ in recent entries. 2014-02-17 10:25:48 -08:00
Doug Evans 687894f54d Move entry from ChangeLog to doc/ChangeLog.
* doc/guile.texi (Writing a Guile Pretty-Printer) <example>:
	[...]
2014-02-17 10:23:48 -08:00
Ludovic Courtès 6e7a66c1b4 guile: Fix typos in the manual.
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-17 14:19:40 +01:00
Doug Evans 98dc0167d6 Fix date in previous entry. 2014-02-16 23:57:43 -05:00
Doug Evans f01c19407c Resort scm-gsmob.c entry in Makefile.in
* Makefile.in (SUBDIR_GUILE_OBS): Resort alphabetically.
	(SUBDIR_GUILE_SRCS): Ditto.
	(scm-gsmob.o): Ditto.
2014-02-16 23:41:29 -05:00
Yao Qi 842c05cd1a Fix missing-prototypes warnings in gnu-nat.c
A recent change (commit 3398af6aa3)
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-17 11:26:12 +08:00
Yao Qi 25c0bd040b Fix -Werror=pointer-sign warnings
../../../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-17 11:25:42 +08:00
Yao Qi a9a758e3ee Fix -Wformat warnings in gnu-nat.c
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-17 11:25:37 +08:00
Jan Kratochvil 0b10be4faf Fix "ERROR: no fileid for" in the testsuite.
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-16 21:49:40 +01:00
Thomas Schwinge c82f56d9d7 Hurd: Adjust to startup-with-shell changes.
In commit 98882a2651, 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-16 08:30:09 +01:00
Thomas Schwinge 3398af6aa3 Hurd: New RPC reply stub functions.
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-16 08:27:44 +01:00
Thomas Schwinge d47642c93d Hurd: Make MIG output parsing more robust.
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-16 08:26:53 +01:00
Thomas Schwinge bae8023e39 Hurd: Adapt to changed MIG output.
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-16 08:26:08 +01:00
Doug Evans 8a55ffb082 * target.c (target_write_partial): Fix result type. 2014-02-14 14:57:37 -08:00
Jose E. Marchesi c2853f3d99 Fix offsets to access fpregset_t in sparc64-linux targets.
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-14 02:29:11 -08:00
Yao Qi 0759a81e85 Compile rsp-low.c for IPA
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-14 09:53:51 +08:00
Sanimir Agovic ac61d2dbf7 cleanup: remove declared variables without any references
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-13 13:35:38 +00:00
Doug Evans 85f224e7e0 Test for binary,dwp symlinks into different directories.
* 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-12 11:38:48 -08:00
Tom Tromey 9d2d0b8b04 update rsp-low comments
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.
2014-02-12 09:59:20 -07:00
Tom Tromey a7191e8bd7 replace convert_ascii_to_int with hex2bin
convert_ascii_to_int is identical to hex2bin.
This removes the former.

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

	* common/rsp-low.c (convert_ascii_to_int): Remove.
	* common/rsp-low.h (convert_ascii_to_int): Don't declare.

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

	* ax.c (gdb_parse_agent_expr): Use hex2bin, not
	convert_ascii_to_int.
	* regcache.c (registers_to_string): Likewise.
	* remote-utils.c (decode_M_packet): Likewise.
	* server.c (process_serial_event): Likewise.
2014-02-12 09:59:20 -07:00
Tom Tromey ff0e980e6f replace unhexify with hex2bin
unhexify and hex2bin are identical, so this removes unhexify.  The
particular choice of which to keep was made on the basis of
parallelism with the earlier patch that removed hexify.

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

	* common/rsp-low.h (unhexify): Don't declare.
	* common/rsp-low.c (unhexify): Remove.

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

	* server.c (handle_query, handle_v_run): Use hex2bin, not
	unhexify.
	* tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2014-02-12 09:59:19 -07:00
Tom Tromey e9371aff2d replace convert_int_to_ascii with bin2hex
convert_int_to_ascii is identical to bin2hex.  This removes the
former.  In this case I made the choice of which to keep on the basis
that I consider the name bin2hex to be superior to
convert_int_to_ascii.

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

	* common/rsp-low.h (convert_int_to_ascii): Don't declare.
	* common/rsp-low.c (convert_int_to_ascii): Remove.

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

	* ax.c (gdb_unparse_agent_expr): Use bin2hex, not
	convert_int_to_ascii.
	* regcache.c (registers_to_string, collect_register_as_string):
	Likewise.
	* remote-utils.c (look_up_one_symbol, relocate_instruction):
	Likewise.
	* server.c (process_serial_event): Likewise.
	* tracepoint.c (cmd_qtstatus, response_source, response_tsv)
	(cmd_qtbuffer, cstr_to_hexstr): Likewise.
2014-02-12 09:59:18 -07:00
Tom Tromey 971dc0b89d replace hexify with bin2hex
This removes hexify in favor of bin2hex.
The choice of which to keep was arbitrary.

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

	* common/rsp-low.h (hexify): Don't declare.
	* common/rsp-low.c (hexify): Remove.

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

	* remote-utils.c (look_up_one_symbol, monitor_output): Use
	bin2hex, not hexify.
	* tracepoint.c (cmd_qtstatus): Likewise.
2014-02-12 09:59:17 -07:00
Tom Tromey 0a822afbcd don't let hexify call strlen
hexify had the same issue as bin2hex; and the fix is the same.

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

	* common/rsp-low.c (hexify): Never take strlen of argument.

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

	* remote-utils.c (monitor_output): Pass explicit length to
	hexify.
2014-02-12 09:59:16 -07:00
Tom Tromey 9f1b45b0da don't let bin2hex call strlen
Currently bin2hex may call strlen if the length argument is zero.
This prevents some function unification; and also it seems cleaner to
me not to have a special meaning for a zero length.

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

	* common/rsp-low.c (bin2hex): Never take strlen of argument.
	* remote.c (extended_remote_run, remote_rcmd)
	(remote_download_trace_state_variable, remote_save_trace_data)
	(remote_set_trace_notes): Update.
	* tracepoint.c (encode_source_string, tfile_write_status)
	(tfile_write_uploaded_tsv): Update.
2014-02-12 09:59:15 -07:00
Tom Tromey 9c3d65319a move some rsp bits into rsp-low.h
This moves various low-level remote serial protocol bits into
common/rsp-low.[ch].

This is as close to a pure move as possible.  There are some
redundancies remaining but those will be dealt with in a subsequent
patch.

Note that the two variants of remote_escape_output disagreed on the
treatment of "*".  On the theory that quoting cannot hurt but the
absence possibly can, I chose the gdbserver variant to be the
canonical one.

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

	* tracepoint.c: Include rsp-low.h.
	* remote.h (hex2bin, bin2hex, unpack_varlen_hex): Don't declare.
	* remote.c: Include rsp-low.h.
	(hexchars, ishex, unpack_varlen_hex, pack_nibble, pack_hex_byte)
	(fromhex, hex2bin, tohex, bin2hex, remote_escape_output)
	(remote_unescape_input): Move to common/rsp-low.c.
	* common/rsp-low.h: New file.
	* common/rsp-low.c: New file.
	* Makefile.in (SFILES): Add common/rsp-low.c.
	(HFILES_NO_SRCDIR): Add common/rsp-low.h.
	(COMMON_OBS): Add rsp-low.o.
	(rsp-low.o): New target.

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

	* tracepoint.c: Include rsp-low.h.
	* server.c: Include rsp-low.h.
	* remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
	(unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
	declare.
	* remote-utils.c: Include rsp-low.h.
	(fromhex, hexchars, ishex, unhexify, tohex, hexify)
	(remote_escape_output, remote_unescape_input, unpack_varlen_hex)
	(convert_int_to_ascii, convert_ascii_to_int): Move to
	common/rsp-low.c.
	* regcache.c: Include rsp-low.h.
	* ax.c: Include rsp-low.h.
	* Makefile.in (SFILES): Add common/rsp-low.c.
	(OBS): Add rsp-low.o.
	(rsp-low.o): New target.
2014-02-12 09:59:14 -07:00
Tom Tromey 01fd3ea573 share "cell" code
The "cell"-based printing code, like phex, was duplicated in both gdb
and gdbserver.  This patch merges the two implementations into a new
file in common/.

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

	* utils.h: Include print-utils.h.
	(host_address_to_string, plongest, pulongest, phex, phex_nz)
	(int_string, core_addr_to_string, core_addr_to_string_nz)
	(hex_string, hex_string_custom): Don't declare.
	* utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
	(plongest, thirty_two, phex, phex_nz, octal2str, hex_string)
	(hex_string_custom, int_string, core_addr_to_string)
	(core_addr_to_string_nz, host_address_to_string): Move to
	common/print-utils.c.
	* common/print-utils.h: New file.
	* common/print-utils.c: New file
	* Makefile.in (SFILES): Add common/print-utils.c.
	(HFILES_NO_SRCDIR): Add common/print-utils.h.
	(COMMON_OBS): Add print-utils.o.
	(print-utils.o): New target.

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

	* utils.h (pulongest, plongest, phex_nz): Don't declare.
	Include print-utils.h.
	* utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
	(plongest, thirty_two, phex_nz): Remove.
	* Makefile.in (SFILES): Add common/print-utils.c.
	(OBS): Add print-utils.o.
	(print-utils-ipa.o): New target.
	(print-utils.o): New target.
	(IPA_OBJS): Add print-utils-ipa.o.
2014-02-12 09:59:13 -07:00
Tom Tromey 9fb5010805 fix error in nios2-tdep.c
Since this change:

2014-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>

	* nios2-tdep.c (nios2_stub_frame_base): Remove global.

nios2-tdep hasn't built:

../../binutils-gdb/gdb/nios2-tdep.c:1337:1: error: ‘nios2_stub_frame_base_address’ defined but not used [-Werror=unused-function]

This patch removes the offending function.

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

	* nios2-tdep.c (nios2_stub_frame_base_address): Remove.
2014-02-12 09:20:02 -07:00
Mark Kettenis 0548b5db30 Call obsd_init_abi for OpenBSD/sparc64.
gdb/CHangeLog:

        * sparc64obsd-tdep.c (sparc64obsd_init_abi): Call obsd_init_abi.
2014-02-12 14:59:48 +01:00
Mark Kettenis 493443a47f FIX EOF detection in PT_IO-based to_xfer_partial implementation.
At least on OpenBSD PT_IO/PIOD_READ_AUXV can return sucessfully without
transferring any bytes.  Arguably a kernel bug, but interpreting this as EOF
seems sensible.

gdb/ChangeLog:

        * inf-ptrace.c (inf_ptrace_xfer_partial): Return TARGET_XFER_EOF
        if a PT_IO ptrace request returns sucessfully but indicates that 0
        bytes were transferred.
2014-02-12 14:51:19 +01:00
Pedro Alves 706d088346 Explicitly mark vtables as code space
Ports for Hardvard architectures will typically have in their
pointer_to_address hook a check for TYPE_CODE_SPACE in their
"pointer_to_address" gdbarch method.  E.g., rl78's:

  /* Is it a code address?  */
  if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_FUNC
      || TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_METHOD
      || TYPE_CODE_SPACE (TYPE_TARGET_TYPE (type))
      || TYPE_LENGTH (type) == 4)
    return rl78_make_instruction_address (addr);
  else
    return rl78_make_data_address (addr);

The avr port is similar.

The vtable type is a struct type gdb itself bakes.  Being neither a
function, nor a method, and absent explicit flagging as residing in
code space, ends up being considered data.

This patch marks the type as code when it is created, on the theory
that this is needed for all Hardvard architectures.  I believe this
should make no difference on archs with flat address space.  Testing
on x86-64 GNU/Linux shows no changes.

gdb/
2014-02-12  Pedro Alves  <palves@redhat.com>
	    Kevin Buettner <kevinb@redhat.com>

	* gnu-v3-abi.c (build_gdb_vtable_type): Return a type marked with
	TYPE_INSTANCE_FLAG_CODE_SPACE.

Kevin Buettner, at
<https://sourceware.org/ml/gdb-patches/2014-02/msg00338.html>, writes,
re. rl78:

This patch, for rl78 using the default multilib, fixes 5 failures in
gdb.cp/casts.exp, 2 failures in gdb.cp/class2.exp, 115 failures in
gdb.mi/mi-var-rtti.exp, and 2 failures in gdb.python/py-value.exp.

It introduces 9 failures (regressions) in gdb.mi/mi-var-rtti.exp.

One of the regressions is:

 FAIL: gdb.mi/mi-var-rtti.exp: list children of s.public in type_update_when_use_rtti

The relevant lines from the log file from a pre-patch test run are as
follows:

 -var-list-children  S.public
 ^done,numchild="1",children=[child={name="S.public.ptr",exp="ptr",numchild="1",type="Base *",thread-id="1"}],has_more="0"
 (gdb)
 PASS: gdb.mi/mi-var-rtti.exp: list children of s.public in type_update_when_use_rtti
 Expecting: \^done,numchild=".*",children=\[child={name="S.public.ptr.public",exp="public",numchild="1"(,thread-id="[0-9]+")?}.*\],has_more="0"
 Expecting: ^(-var-list-children  S\.public\.ptr  [
 ]+)?(\^done,numchild=".*",children=\[child={name="S.public.ptr.public",exp="public",numchild="1"(,thread-id="[0-9]+")?}.*\],has_more="0"[
 ]+[(]gdb[)]
 [ ]*)

The same set of lines for the failing (post-patch) run are instead:

 -var-list-children  S.public
 &"warning: can't find linker symbol for virtual table for `Base' value\n"
 &"warning:   found `typeinfo for __cxxabiv1::__vmi_class_type_info' instead\n"
 &"warning: can't find linker symbol for virtual table for `Base' value\n"
 &"warning:   found `typeinfo for __cxxabiv1::__vmi_class_type_info' instead\n"
 &"warning: can't find linker symbol for virtual table for `Base' value\n"
 &"warning:   found `typeinfo for __cxxabiv1::__vmi_class_type_info' instead\n"
 ^done,numchild="1",children=[child={name="S.public.ptr",exp="ptr",numchild="1",type="Base *",thread-id="1"}],has_more="0"
 (gdb)
 FAIL: gdb.mi/mi-var-rtti.exp: list children of s.public in type_update_when_use_rtti
 Expecting: \^done,numchild=".*",children=\[child={name="S.public.ptr.public",exp="public",numchild="1"(,thread-id="[0-9]+")?}.*\],has_more="0"
 Expecting: ^(-var-list-children  S\.public\.ptr  [
 ]+)?(\^done,numchild=".*",children=\[child={name="S.public.ptr.public",exp="public",numchild="1"(,thread-id="[0-9]+")?}.*\],has_more="0"[
 ]+[(]gdb[)]
 [ ]*)

Note that the difference between these are the warnings regarding
linker symbols.  Aside from the warnings, the result is the same.
I.e.  gdb produces the correct answer despite the warnings.  The
reason for the other 8 failures is the same: the test harness is not
expecting these warnings.

I spent some time (a while ago) looking at the reason for these
warnings.  As I recall, we are now getting further along in the type
resolution process than we were without my patch.  I.e.  for the
example above, the code in question never got to the point where it
was looking for the specified linker symbol.  So it seems to me that,
at worst, my patch exposes some other problem, but is not directly the
cause of the problem.
2014-02-12 13:30:21 +00:00
Pedro Alves 5caa2f0b27 H8/300: Fix pseudo registers reads/writes.
'info registers ccr' corrupts memory.

Debugging gdb under Valgrind, we see:

 (gdb) info registers ccr
 ==23225== Invalid write of size 1
 ==23225==    at 0x4A0A308: memcpy@@GLIBC_2.14 (mc_replace_strmem.c:881)
 ==23225==    by 0x52D334: regcache_raw_read (regcache.c:625)
 ==23225==    by 0x45E4D8: h8300_pseudo_register_read (h8300-tdep.c:1171)
 ==23225==    by 0x5B694B: gdbarch_pseudo_register_read (gdbarch.c:1926)
 ==23225==    by 0x52DADB: regcache_cooked_read (regcache.c:740)
 ==23225==    by 0x52DC10: regcache_cooked_read_value (regcache.c:765)
 ==23225==    by 0x68CA41: sentinel_frame_prev_register (sentinel-frame.c:52)
 ==23225==    by 0x6B80CB: frame_unwind_register_value (frame.c:1105)
 ==23225==    by 0x6B7C97: frame_register_unwind (frame.c:1010)
 ==23225==    by 0x6B7F73: frame_unwind_register (frame.c:1064)
 ==23225==    by 0x6B8359: frame_unwind_register_signed (frame.c:1162)
 ==23225==    by 0x6B8396: get_frame_register_signed (frame.c:1169)
 ==23225==  Address 0x4f7b031 is 0 bytes after a block of size 1 alloc'd
 ==23225==    at 0x4A06B0F: calloc (vg_replace_malloc.c:593)
 ==23225==    by 0x6EB754: xcalloc (common-utils.c:91)
 ==23225==    by 0x6EB793: xzalloc (common-utils.c:101)
 ==23225==    by 0x53A782: allocate_value_contents (value.c:854)
 ==23225==    by 0x53A7B4: allocate_value (value.c:864)
 ==23225==    by 0x52DBC8: regcache_cooked_read_value (regcache.c:757)
 ==23225==    by 0x68CA41: sentinel_frame_prev_register (sentinel-frame.c:52)
 ==23225==    by 0x6B80CB: frame_unwind_register_value (frame.c:1105)
 ==23225==    by 0x6B7C97: frame_register_unwind (frame.c:1010)
 ==23225==    by 0x6B7F73: frame_unwind_register (frame.c:1064)
 ==23225==    by 0x6B8359: frame_unwind_register_signed (frame.c:1162)
 ==23225==    by 0x6B8396: get_frame_register_signed (frame.c:1169)
 ==23225==
 ccr            0x00        0    I-0 UI-0 H-0 U-0 N-0 Z-0 V-0 C-0 u> u>= != >= >
 (gdb)

This bit:

 ==23225== Invalid write of size 1
 ==23225==    at 0x4A0A308: memcpy@@GLIBC_2.14 (mc_replace_strmem.c:881)
 ==23225==    by 0x52D334: regcache_raw_read (regcache.c:625)
 ==23225==    by 0x45E4D8: h8300_pseudo_register_read (h8300-tdep.c:1171)

shows the problem.  The CCR pseudo register has type length of 1,
while the corresponding CCR raw register has a length of 2 or 4
(depending on mode).  In
sim/h8300/compile.c:sim_{fetch|store}_register we see that the sim
also treats those raw registers (CCR/EXR) as 2 or 4 bytes length.

gdb/
2014-02-12  Pedro Alves  <palves@redhat.com>

	* h8300-tdep.c (pseudo_from_raw_register)
	(raw_from_pseudo_register): New functions.
	(h8300_pseudo_register_read, h8300_pseudo_register_write): Use
	them.
2014-02-12 12:28:25 +00:00
Pedro Alves 76fd5f745a H8/300: Fix gdb<->sim register mapping.
Currently, printing the H8/300 ccr register when debugging with the
sim is broken:

 (gdb) target sim
 ...
 (gdb) load
 ...
 (gdb) start
 ...
 Breakpoint 1, foo (i=0x0 <foo>) at main.c:4
 4       {
 (gdb) info registers ccr
 Register 13 is not available

'13' is the ccr pseudo-register.  This pseudo-register provides an
8-bit view into the raw ccr register (regno=8).

The problem is that the H8/300 port does not define a
register_sim_regno gdbarch hook, and thus when fetching the raw
register off of the sim, we end up in legacy_register_sim_regno trying
to figure out the sim register number for the raw CCR register:

 int
 legacy_register_sim_regno (struct gdbarch *gdbarch, int regnum)
 {
   /* Only makes sense to supply raw registers.  */
   gdb_assert (regnum >= 0 && regnum < gdbarch_num_regs (gdbarch));
   /* NOTE: cagney/2002-05-13: The old code did it this way and it is
      suspected that some GDB/SIM combinations may rely on this
      behavour.  The default should be one2one_register_sim_regno
      (below).  */
   if (gdbarch_register_name (gdbarch, regnum) != NULL
       && gdbarch_register_name (gdbarch, regnum)[0] != '\0')
     return regnum;
   else
     return LEGACY_SIM_REGNO_IGNORE;
 }

Because the raw ccr register does not have a name (so that it is
hidden from the user), that returns LEGACY_SIM_REGNO_IGNORE.  That
means that we never actually read the value of the raw ccr register.

Before the <unavailable> support, this must have meant that ccr was
_always_ read as 0...  At least, I'm not seeing how this ever worked.

The fix for that is adding a gdbarch_register_sim_regno hook that maps
all raw registers.  Looking at sim/h8300/sim-main.h, I believe the
sim's register numbers are compatible with gdb's, so no actual
convertion is necessary.

gdb/
2014-02-12  Pedro Alves  <palves@redhat.com>

	* h8300-tdep.c (h8300_register_sim_regno): New function.
	(h8300_gdbarch_init): Install h8300_register_sim_regno as
	gdbarch_register_sim_regno hook.
2014-02-12 12:27:49 +00:00
Sanimir Agovic 8f0084065d nios2-tdep: remove unreferenced global nios2_stub_frame_base
2014-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>

	* nios2-tdep.c (nios2_stub_frame_base): Remove global.
2014-02-12 12:09:45 +00:00
Sanimir Agovic 195abc10c0 tic6x-tdep: set default frame base
2014-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>

	* tic6x-tdep.c (tic6x_gdbarch_init): Call frame_base_set_default.
2014-02-12 12:08:50 +00:00
Mark Kettenis 93ffa5b939 Add signal number conversions for OpenBSD.
gdb/ChangeLog:

        * obsd-tdep.h (obsd_init_abi): New prototype.
        * obsd-tdep.c: Define enum with OpenBSD signal numbers.
        (obsd_gdb_signal_from_target, obsd_gdb_signal_to_target)
        (obsd_init_abi): New functions.
        * i386obsd-tdep.c: Include "obsd-tdep.h".
        (i386obsd_init_abi): Call obsd_init_abi.
        * amd64obsd-tdep.c: Include "obsd-tdep.h".
        (amd64obsd_init_abi): Call obsd_init_abi.
        * configure.tgt (i[34567]86-*-openbsd*, x86_64-*-openbsd*): Add
        obsd-tdep.c to gdb_target_obs.
2014-02-12 12:08:28 +01:00
Doug Evans 6fb526eee4 Remove stray parantheses for deffn. 2014-02-11 23:19:22 -08:00
Doug Evans 149b30ffe4 * gdb.dwarf2/dwp-symlink.exp: Rewrite to use remote_* commands instead
of Tcl file commands.
2014-02-11 15:48:44 -08:00
Jose E. Marchesi 49caec94ae Fix passing double float complex arguments in sparc64.
Double float complex objects are not 16-byte aligned in either
gcc or solaris studio.  This patch makes gdb to not align double
float complex arguments in the dummy frame when calling a
function.

2014-02-11  Jose E. Marchesi  <jose.marchesi@oracle.com>

        * sparc64-tdep.c (sparc64_store_arguments): Do not align complex
        double float arguments to 16-byte in the argument slots.
2014-02-11 04:27:20 -08:00
Doug Evans e1402065ee Don't crash if pkg-config is not found and guile wasn't explicitly requested.
* configure.ac: Don't crash if pkg-config is not found and guile
	wasn't explicitly requested.  Use AC_MSG_ERROR instead of AC_ERROR
	in guile checks.
	* configure: Regenerate.
2014-02-10 23:04:38 -08:00
Yao Qi edcc890fce Update comments to to_xfer_partial implementations.
Some comments to to_xfer_partial implementations are out of date.
This patch updates them using the "Implement the to_xfer_partial
target_ops method" pattern.

gdb:

2014-02-11  Yao Qi  <yao@codesourcery.com>

	* aix-thread.c (aix_thread_xfer_partial): Update comments.
	* auxv.c (procfs_xfer_auxv, memory_xfer_auxv): Likewise.
	* bsd-uthread.c (bsd_uthread_xfer_partial): Likewise.
	* gnu-nat.c (gnu_xfer_memory): Likewise.
	* inf-ptrace.c (inf_ptrace_xfer_partial):  Likewise.
	* rs6000-nat.c (rs6000_xfer_partial): Likewise.
	* sparc-nat.c (sparc_xfer_wcookie): Likewise.
	* spu-linux-nat.c (spu_proc_xfer_spu): Likewise.
2014-02-11 14:20:39 +08:00
Yao Qi 9b409511d0 Return target_xfer_status in to_xfer_partial
This patch does the conversion of to_xfer_partial from

    LONGEST (*to_xfer_partial) (struct target_ops *ops,
				enum target_object object, const char *annex,
				gdb_byte *readbuf, const gdb_byte *writebuf,
				ULONGEST offset, ULONGEST len);

to

    enum target_xfer_status (*to_xfer_partial) (struct target_ops *ops,
				enum target_object object, const char *annex,
				gdb_byte *readbuf, const gdb_byte *writebuf,
				ULONGEST offset, ULONGEST len, ULONGEST *xfered_len);

It changes to_xfer_partial return the transfer status and the transfered
length by *XFERED_LEN.  Generally, the return status has three stats,

 - TARGET_XFER_OK,
 - TARGET_XFER_EOF,
 - TARGET_XFER_E_XXXX,

See the comments to them in 'enum target_xfer_status'.  Note that
Pedro suggested not name TARGET_XFER_DONE, as it is confusing,
compared with "TARGET_XFER_OK".  We finally name it TARGET_XFER_EOF.

With this change, GDB core can handle unavailable data in a convenient
way.

The rationale behind this change was mentioned here
https://sourceware.org/ml/gdb-patches/2013-10/msg00761.html

Consider an object/value like this:

  0          100      150        200           512
  DDDDDDDDDDDxxxxxxxxxDDDDDD...DDIIIIIIIIIIII..III

where D is valid data, and xxx is unavailable data, and I is beyond
the end of the object (Invalid).  Currently, if we start the
xfer at 0, requesting, say 512 bytes, we'll first get back 100 bytes.
The xfer machinery then retries fetching [100,512), and gets back
TARGET_XFER_E_UNAVAILABLE.  That's sufficient when you're either
interested in either having the whole of the 512 bytes available,
or erroring out.  But, in this scenario, we're interested in
the data at [150,512).  The problem is that the last
TARGET_XFER_E_UNAVAILABLE gives us no indication where to
start the read next.  We'd need something like:

get me [0,512) >>>
     <<< here's [0,100), *xfered_len is 100, returns TARGET_XFER_OK

get me [100,512)  >>> (**1)
     <<< [100,150) is unavailable, *xfered_len is 50, return TARGET_XFER_E_UNAVAILABLE.

get me [150,512) >>>
     <<< here's [150,200), *xfered_len is 50, return TARGET_XFER_OK.

get me [200,512) >>>
     <<< no more data, return TARGET_XFER_EOF.

This naturally implies pushing down the decision of whether
to return TARGET_XFER_E_UNAVAILABLE or something else
down to the target.  (Which kinds of leads back to tfile
itself reading from RO memory from file (though we could
export a function in exec.c for that that tfile delegates to,
instead of re-adding the old code).

Beside this change, we also add a macro TARGET_XFER_STATUS_ERROR_P to
check whether a status is an error or not, to stop using "status < 0".
This patch also eliminates the comparison between status and 0.

No target implementations to to_xfer_partial adapts this new
interface.  The interface still behaves as before.

gdb:

2014-02-11  Yao Qi  <yao@codesourcery.com>

	* target.h (enum target_xfer_error): Rename to ...
	(enum target_xfer_status): ... it.  New.  All users updated.
	(enum target_xfer_status) <TARGET_XFER_OK>, <TARGET_XFER_EOF>:
	New.
	(TARGET_XFER_STATUS_ERROR_P): New macro.
	(target_xfer_error_to_string): Remove declaration.
	(target_xfer_status_to_string): Declare.
	(target_xfer_partial_ftype): Adjust it.
	(struct target_ops) <to_xfer_partial>: Return
	target_xfer_status.  Add argument xfered_len.  Update
	comments.
	* target.c (target_xfer_error_to_string): Rename to ...
	(target_xfer_status_to_string): ... it.  New.  All callers
	updated.
	(target_read_live_memory): Likewise.  Call target_xfer_partial
	instead of target_read.
	(memory_xfer_live_readonly_partial): Return
	target_xfer_status.  Add argument xfered_len.
	(raw_memory_xfer_partial): Likewise.
	(memory_xfer_partial_1): Likewise.
	(memory_xfer_partial): Likewise.
	(target_xfer_partial): Likewise.  Check *XFERED_LEN is set
	properly.  Update debug message.
	(default_xfer_partial, current_xfer_partial): Likewise.
	(target_write_partial): Likewise.
	(target_read_partial): Likewise.  All callers updated.
	(read_whatever_is_readable): Likewise.
	(target_write_with_progress): Likewise.
	(target_read_alloc_1): Likewise.

	* aix-thread.c (aix_thread_xfer_partial): Likewise.
	* auxv.c (procfs_xfer_auxv): Likewise.
	(ld_so_xfer_auxv, memory_xfer_auxv): Likewise.
	* bfd-target.c (target_bfd_xfer_partial): Likewise.
	* bsd-kvm.c (bsd_kvm_xfer_partial): Likewise.
	* bsd-uthread.c (bsd_uthread_xfer_partia): Likewise.
	* corefile.c (read_memory): Adjust.
	* corelow.c (core_xfer_partial): Likewise.
	* ctf.c (ctf_xfer_partial): Likewise.
	* darwin-nat.c (darwin_read_dyld_info): Likewise.  All callers
	updated.
	(darwin_xfer_partial): Likewise.
	* exec.c (section_table_xfer_memory_partial): Likewise.  All
	callers updated.
	(exec_xfer_partial): Likewise.
	* exec.h (section_table_xfer_memory_partial): Update
	declaration.
	* gnu-nat.c (gnu_xfer_memory): Likewise.  Assert 'res' is not
	negative.
	(gnu_xfer_partial): Likewise.
	* ia64-hpux-nat.c (ia64_hpux_xfer_memory_no_bs): Likewise.
	(ia64_hpux_xfer_memory, ia64_hpux_xfer_uregs): Likewise.
	(ia64_hpux_xfer_solib_got): Likewise.
	* inf-ptrace.c (inf_ptrace_xfer_partial): Likewise.  Change
	type of 'partial_len' to ULONGEST.
	* inf-ttrace.c (inf_ttrace_xfer_partial): Likewise.
	* linux-nat.c (linux_xfer_siginfo ): Likewise.
	(linux_nat_xfer_partial): Likewise.
	(linux_proc_xfer_partial, linux_xfer_partial): Likewise.
	(linux_proc_xfer_spu, linux_nat_xfer_osdata): Likewise.
	* monitor.c (monitor_xfer_memory): Likewise.
	(monitor_xfer_partial): Likewise.
	* procfs.c (procfs_xfer_partial): Likewise.
	* record-btrace.c (record_btrace_xfer_partial): Likewise.
	* record-full.c (record_full_xfer_partial): Likewise.
	(record_full_core_xfer_partial): Likewise.
	* remote-sim.c (gdbsim_xfer_memory): Likewise.
	(gdbsim_xfer_partial): Likewise.
	* remote.c (remote_write_bytes_aux): Likewise.  All callers
	updated.
	(remote_write_bytes, remote_read_bytes): Likewise.  All
	callers updated.
	(remote_flash_erase): Likewise.  All callers updated.
	(remote_write_qxfer): Likewise.  All callers updated.
	(remote_read_qxfer): Likewise.  All callers updated.
	(remote_xfer_partial): Likewise.
	* rs6000-nat.c (rs6000_xfer_partial): Likewise.
	(rs6000_xfer_shared_libraries): Likewise.
	* sol-thread.c (sol_thread_xfer_partial): Likewise.
	(sol_thread_xfer_partial): Likewise.
	* sparc-nat.c (sparc_xfer_wcookie): Likewise.
	(sparc_xfer_partial): Likewise.
	* spu-linux-nat.c (spu_proc_xfer_spu): Likewise.  All callers
	updated.
	(spu_xfer_partial): Likewise.
	* spu-multiarch.c (spu_xfer_partial): Likewise.
	* tracepoint.c (tfile_xfer_partial): Likewise.
	* windows-nat.c (windows_xfer_memory): Likewise.
	(windows_xfer_shared_libraries): Likewise.
	(windows_xfer_partial): Likewise.
	* valprint.c: Replace 'target_xfer_error' with
	'target_xfer_status' in comments.
2014-02-11 14:20:33 +08:00
Joel Brobecker a8e6308380 Fix thinko in mi/mi-main.c::mi_cmd_data_write_memory_bytes comment.
gdb/ChangeLog:
2014-02-11  Simon Marchi  <simon.marchi@ericsson.com>  (tiny patch)

	Checked in by Joel Brobecker <brobecker@adacore.com>.
	* mi/mi-main.c (mi_cmd_data_write_memory_bytes): Fix comment.
2014-02-11 07:59:14 +04:00
Joel Brobecker e86b67d3a1 Reformat symfile-debug.c::debug_qf_expand_symtabs_matching parameters.
gdb/ChangeLog:

	* symfile-debug.c (debug_qf_expand_symtabs_matching): Reformat
	function parameters.
2014-02-11 07:31:26 +04:00
Stan Shebs 1e0a51780b Add Doxygen support to GDB 2014-02-10 19:10:34 -08:00
Mark Kettenis 1dfdac3275 Avoid killing all processes.
gdb/ChangeLog:

        * gdb.threads/step-after-sr-lock.exp: Avoid executing
        "kill -SIGUSR1 -1".
2014-02-10 18:07:12 +01:00
Will Newton 4b7d1f7fb4 gdb/elfread.c: Enable ifunc support on ARM.
There are two failures in the gnu-ifunc.exp test on ARM. These are
due to the failure to resolve the correct target function when
attempting to breakpoint a GNU ifunc resolved function:

(gdb) break gnu_ifunc
Breakpoint 4 at gnu-indirect-function resolver at 0x2aacb5a2

when gnu_ifunc has been resolved this should actually be:

(gdb) break gnu_ifunc
Breakpoint 4 at 0x868c

There are two reasons for this. The first is that ARM does not have a
separate .got.plt section so looking this up will always fail. The second
is that the Thumb bit needs to be stripped from the address to allow
it to be reliably compared when inserting into the ifunc cache.

Tested with no regressions on arm-linux-gnueabihf and
x86_64-unknown-linux-gnu.

gdb/ChangeLog:

2014-02-10  Will Newton  <will.newton@linaro.org>

	* elfread.c (elf_rel_plt_read): Look for a .got section if
	looking up .got.plt fails.
	(elf_gnu_ifunc_resolve_by_got): Call gdbarch_addr_bits_remove
	on address passed to elf_gnu_ifunc_record_cache.
	(elf_gnu_ifunc_resolve_addr): Likewise.
	(elf_gnu_ifunc_resolver_return_stop): Likewise.
2014-02-10 16:45:47 +00:00
Jose E. Marchesi 961842b289 Add gdbarch_in_function_epilogue_p hook for sparc64.
watchpoint_update and watchpoint_cond avoid checking for
watchpoints when we are located at a function epilogue in the
current frame.  This is done in order to avoid using corrupted
local registers and unwinding a corrupted/destroyed stack.

The code determining whether we are in a function epilogue is
provided by the backends via the gdbarch_in_function_epilogue_p
hook.  This commit adds such a hook for sparc64 targets.

2014-02-10  Jose E. Marchesi  <jose.marchesi@oracle.com>

	* sparc-tdep.c (sparc_in_function_epilogue_p): New function.
	(X_RETTURN): New macro.
	* sparc-tdep.h: sparc_in_function_epilogue_p prototype.

	* sparc64-tdep.c (sparc64_init_abi): Hook
	sparc_in_function_epilogue_p.
2014-02-10 07:11:03 -08:00
Gary Benson 3f03e7b140 Fix compile error
This commit fixes a compile error introduced by my previous commit.

Checked in as obvious.

2014-02-10  Gary Benson  <gbenson@redhat.com>

	* symfile-debug.c (debug_qf_expand_symtabs_matching):
	Rename name_matcher to symbol_matcher.
2014-02-10 14:24:32 +00:00
Gary Benson 96f861efe0 Update debug_qf_expand_symtabs_matching to use typedefs.
Commit 206f2a5777 added two new
typedefs, but did not update debug_qf_expand_symtabs_matching
to use them.  This patch fixes this.

Checked in as obvious.

2014-02-10  Gary Benson  <gbenson@redhat.com>

	* symfile-debug.c (debug_qf_expand_symtabs_matching):
	Use expand_symtabs_file_matcher_ftype and
	expand_symtabs_symbol_matcher_ftype.
2014-02-10 14:07:44 +00:00
Joel Brobecker ee01b6652a [Ada] Make the symbol cache per-program-space.
This patch moves the Ada symbol cache to per-program-space data.

gdb/ChangeLog:

        * ada-lang.c (struct cache_entry, HASH_SIZE): Move definition up.
        (struct ada_symbol_cache): New.
        (ada_free_symbol_cache): Forward declare.
        (struct ada_pspace_data): New.
        (ada_pspace_data_handle): New static global.
        (get_ada_pspace_data, ada_pspace_data_cleanup)
        (ada_init_symbol_cache, ada_free_symbol_cache): New functions.
        (cache_space, cache): Delete, now folded inside struct
        ada_pspace_data.
        (ada_get_symbol_cache): New function.
        (ada_clear_symbol_cache, find_entry, cache_symbol): Adjust
        implementation.
        (_initialize_ada_language): Remove initialization of cache_space.
        Move call to observer_attach_inferior_exit up, grouping it
        with the other observer registrations inside this function.
        Rename command to be more general.  Add call to
        register_program_space_data_with_cleanup.
2014-02-10 18:04:26 +04:00
Joel Brobecker 143adbbfa3 [Ada] Rename some observer callbacks in ada-tasks.c
This patch is mostly cosmetic, avoiding us to use the same callback
names as in ada-lang.c.

gdb/ChangeLog:

        * ada-tasks.c (ada_tasks_new_objfile_observer): Renames
        ada_new_objfile_observer.
        (ada_tasks_normal_stop_observer): Renames ada_normal_stop_observer.
        (_initialize_tasks): Update uses of ada_new_objfile_observer
        and ada_tasks_normal_stop_observer.
2014-02-10 13:44:01 +04:00
Joel Brobecker aa4fb036e9 Wrong type for 'Length result.
Consider the following code:

   type Color is (Black, Red, Green, Blue, White);
   type Primary_Table is array (Color range Red .. Blue) of Boolean;
   Prim : Primary_Table := (True, False, False);

GDB prints the length of arrays in a fairly odd way:

   (gdb) p prim'length
   $2 = blue

The length returned should be an integer, not the array index type,
and this patch fixes this.

gdb/ChangeLog:

	* ada-lang.c (ada_evaluate_subexp): Set the type of the value
	returned by the 'Length attribute to integer.

testsuite/ChangeLog:

	* gdb.ada/tick_length_array_enum_idx: New testcase.
2014-02-10 13:15:43 +04:00
Joel Brobecker 9dee8cc6aa Add missing call to obstack_init for ada-lang.c::cache_space
This bit was meant to be merged with the following patch:

    commit 3d9434b5dd
    Subject: [Ada] Add a symbol lookup cache

... but I forgot :-(. This causes the cache to be undefined, and
with a bit of (bad) luck:

    % gdb
    (gdb) set lang ada
    (gdb) set $xxx := 1
    [SEGV]

gdb/ChangeLog:

        * ada-lang.c (_initialize_ada_language): Initialize
        cache_space obstack.
2014-02-10 12:57:13 +04:00
Joel Brobecker 3d9434b5dd [Ada] Add a symbol lookup cache
This patch implements the caching mechanism alluded to in a comment
next to some stubbed functions.

gdb/ChangeLog:

        * ada-lang.c (HASH_SIZE): New macro.
        (struct cache_entry): New type.
        (cache_space, cache): New static globals.
        (ada_clear_symbol_cache, find_entry): New functions.
        (lookup_cached_symbol, cache_symbol): Implement.
        (ada_new_objfile_observer, ada_free_objfile_observer): New.
        (_initialize_ada_language): Attach ada_new_objfile_observer
        and ada_free_objfile_observer.
2014-02-10 11:48:53 +04:00
Joel Brobecker f0c5f9b2b8 struct block parameter constification in ada-lang.c
This patch series constifies a number of struct block * parameters.

gdb/ChangeLog:

        * ada-lang.c (ada_add_block_symbols, add_defn_to_vec)
        (lookup_cached_symbol, ada_add_local_symbols): Add "const" to
        struct block * parameter.
        (ada_lookup_symbol_list_worker): Constify local variable "block".
        Remove cast which is no longer necessary.
2014-02-10 11:45:55 +04:00
Doug Evans ed3ef33944 Add Guile as an extension language.
* NEWS: Mention Guile scripting.
	* Makefile.in (SUBDIR_GUILE_OBS): New variable.
	(SUBDIR_GUILE_SRCS, SUBDIR_GUILE_DEPS): New variables
	(SUBDIR_GUILE_LDFLAGS, SUBDIR_GUILE_CFLAGS): New variables.
	(INTERNAL_CPPFLAGS): Add GUILE_CPPFLAGS.
	(CLIBS): Add GUILE_LIBS.
	(install-guile): New rule.
	(guile.o): New rule.
	(scm-arch.o, scm-auto-load.o, scm-block.o): New rules.
	(scm-breakpoint.o, scm-disasm.o, scm-exception.o): New rules.
	(scm-frame.o, scm-iterator.o, scm-lazy-string.o): New rules.
	(scm-math.o, scm-objfile.o, scm-ports.o): New rules.
	(scm-pretty-print.o, scm-safe-call.o, scm-gsmob.o): New rules.
	(scm-string.o, scm-symbol.o, scm-symtab.o): New rules.
	(scm-type.o, scm-utils.o, scm-value.o): New rules.
	* configure.ac: New option --with-guile.
	* configure: Regenerate.
	* config.in: Regenerate.
	* auto-load.c: Remove #include "python/python.h".  Add #include
	"gdb/section-scripts.h".
	(source_section_scripts): Handle Guile scripts.
	(_initialize_auto_load): Add name of Guile objfile script to
	scripts-directory help text.
	* breakpoint.c (condition_command): Tweak comment to include Scheme.
	* breakpoint.h (gdbscm_breakpoint_object): Add forward decl.
	(struct breakpoint): New member scm_bp_object.
	* defs.h (enum command_control_type): New value guile_control.
	* cli/cli-cmds.c: Remove #include "python/python.h".  Add #include
	"extension.h".
	(show_user): Update comment.
	(_initialize_cli_cmds): Update help text for "show user".  Update help
	text for max-user-call-depth.
	* cli/cli-script.c: Remove #include "python/python.h".  Add #include
	"extension.h".
	(multi_line_command_p): Add guile_control.
	(print_command_lines): Handle guile_control.
	(execute_control_command, recurse_read_control_structure): Ditto.
	(process_next_line): Recognize "guile" commands.
	* disasm.c (gdb_disassemble_info): Make non-static.
	* disasm.h: #include "dis-asm.h".
	(struct gdbarch): Add forward decl.
	(gdb_disassemble_info): Declare.
	* extension.c: #include "guile/guile.h".
	(extension_languages): Add guile.
	(get_ext_lang_defn): Handle EXT_LANG_GDB.
	* extension.h (enum extension_language): New value EXT_LANG_GUILE.
	* gdbtypes.c (get_unsigned_type_max): New function.
	(get_signed_type_minmax): New function.
	* gdbtypes.h (get_unsigned_type_max): Declare.
	(get_signed_type_minmax): Declare.
	* guile/README: New file.
	* guile/guile-internal.h: New file.
	* guile/guile.c: New file.
	* guile/guile.h: New file.
	* guile/scm-arch.c: New file.
	* guile/scm-auto-load.c: New file.
	* guile/scm-block.c: New file.
	* guile/scm-breakpoint.c: New file.
	* guile/scm-disasm.c: New file.
	* guile/scm-exception.c: New file.
	* guile/scm-frame.c: New file.
	* guile/scm-gsmob.c: New file.
	* guile/scm-iterator.c: New file.
	* guile/scm-lazy-string.c: New file.
	* guile/scm-math.c: New file.
	* guile/scm-objfile.c: New file.
	* guile/scm-ports.c: New file.
	* guile/scm-pretty-print.c: New file.
	* guile/scm-safe-call.c: New file.
	* guile/scm-string.c: New file.
	* guile/scm-symbol.c: New file.
	* guile/scm-symtab.c: New file.
	* guile/scm-type.c: New file.
	* guile/scm-utils.c: New file.
	* guile/scm-value.c: New file.
	* guile/lib/gdb.scm: New file.
	* guile/lib/gdb/boot.scm: New file.
	* guile/lib/gdb/experimental.scm: New file.
	* guile/lib/gdb/init.scm: New file.
	* guile/lib/gdb/iterator.scm: New file.
	* guile/lib/gdb/printing.scm: New file.
	* guile/lib/gdb/types.scm: New file.
	* data-directory/Makefile.in (GUILE_SRCDIR): New variable.
	(VPATH): Add $(GUILE_SRCDIR).
	(GUILE_DIR): New variable.
	(GUILE_INSTALL_DIR, GUILE_FILES): New variables.
	(all): Add stamp-guile dependency.
	(stamp-guile): New rule.
	(clean-guile, install-guile, uninstall-guile): New rules.
	(install-only): Add install-guile dependency.
	(uninstall): Add uninstall-guile dependency.
	(clean): Add clean-guile dependency.

	doc/
	* Makefile.in (GDB_DOC_FILES): Add guile.texi.
	* gdb.texinfo (Auto-loading): Add set/show auto-load guile-scripts.
	(Extending GDB): New menu entries Guile, Multiple Extension Languages.
	(Guile docs): Include guile.texi.
	(objfile-gdbdotext file): Add objfile-gdb.scm.
	(dotdebug_gdb_scripts section): Mention Guile scripts.
	(Multiple Extension Languages): New node.
	* guile.texi: New file.

	testsuite/
	* configure.ac (AC_OUTPUT): Add gdb.guile.
	* configure: Regenerate.
	* lib/gdb-guile.exp: New file.
	* lib/gdb.exp (get_target_charset): New function.
	* gdb.base/help.exp: Update expected output from "apropos apropos".
	* gdb.guile/Makefile.in: New file.
	* gdb.guile/guile.exp: New file.
	* gdb.guile/scm-arch.c: New file.
	* gdb.guile/scm-arch.exp: New file.
	* gdb.guile/scm-block.c: New file.
	* gdb.guile/scm-block.exp: New file.
	* gdb.guile/scm-breakpoint.c: New file.
	* gdb.guile/scm-breakpoint.exp: New file.
	* gdb.guile/scm-disasm.c: New file.
	* gdb.guile/scm-disasm.exp: New file.
	* gdb.guile/scm-equal.c: New file.
	* gdb.guile/scm-equal.exp: New file.
	* gdb.guile/scm-error.exp: New file.
	* gdb.guile/scm-error.scm: New file.
	* gdb.guile/scm-frame-args.c: New file.
	* gdb.guile/scm-frame-args.exp: New file.
	* gdb.guile/scm-frame-args.scm: New file.
	* gdb.guile/scm-frame-inline.c: New file.
	* gdb.guile/scm-frame-inline.exp: New file.
	* gdb.guile/scm-frame.c: New file.
	* gdb.guile/scm-frame.exp: New file.
	* gdb.guile/scm-generics.exp: New file.
	* gdb.guile/scm-gsmob.exp: New file.
	* gdb.guile/scm-iterator.c: New file.
	* gdb.guile/scm-iterator.exp: New file.
	* gdb.guile/scm-math.c: New file.
	* gdb.guile/scm-math.exp: New file.
	* gdb.guile/scm-objfile-script-gdb.in: New file.
	* gdb.guile/scm-objfile-script.c: New file.
	* gdb.guile/scm-objfile-script.exp: New file.
	* gdb.guile/scm-objfile.c: New file.
	* gdb.guile/scm-objfile.exp: New file.
	* gdb.guile/scm-ports.exp: New file.
	* gdb.guile/scm-pretty-print.c: New file.
	* gdb.guile/scm-pretty-print.exp: New file.
	* gdb.guile/scm-pretty-print.scm: New file.
	* gdb.guile/scm-section-script.c: New file.
	* gdb.guile/scm-section-script.exp: New file.
	* gdb.guile/scm-section-script.scm: New file.
	* gdb.guile/scm-symbol.c: New file.
	* gdb.guile/scm-symbol.exp: New file.
	* gdb.guile/scm-symtab-2.c: New file.
	* gdb.guile/scm-symtab.c: New file.
	* gdb.guile/scm-symtab.exp: New file.
	* gdb.guile/scm-type.c: New file.
	* gdb.guile/scm-type.exp: New file.
	* gdb.guile/scm-value-cc.cc: New file.
	* gdb.guile/scm-value-cc.exp: New file.
	* gdb.guile/scm-value.c: New file.
	* gdb.guile/scm-value.exp: New file.
	* gdb.guile/source2.scm: New file.
	* gdb.guile/types-module.cc: New file.
	* gdb.guile/types-module.exp: New file.
2014-02-09 19:40:01 -08:00
Yao Qi 7026a7c16e Fix PR16543
Tests in gdb.gdb fail because directory gdb/testsuite/gdb.gdb doesn't
exist in build tree.  This patch appends gdb.gdb/Makefile in AC_OUTPUT,
and adds new Makefile.in in gdb.gdb, so that directory gdb.gdb can be
created during configure.

With this patch applied, tests under gdb.gdb can be run,

$ make check RUNTESTFLAGS='--directory=gdb.gdb'

Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using ../../../../git/gdb/testsuite/config/unix.exp as tool-and-target-specific interface file.
Running ../../../../git/gdb/testsuite/gdb.gdb/complaints.exp ...
Running ../../../../git/gdb/testsuite/gdb.gdb/observer.exp ...
Running ../../../../git/gdb/testsuite/gdb.gdb/python-interrupts.exp ...
FAIL: gdb.gdb/python-interrupts.exp: signal SIGINT
Running ../../../../git/gdb/testsuite/gdb.gdb/python-selftest.exp ...
FAIL: gdb.gdb/python-selftest.exp: call catch_command_errors(execute_command, "python print 5", 0, RETURN_MASK_ALL)
Running ../../../../git/gdb/testsuite/gdb.gdb/selftest.exp ...
Running ../../../../git/gdb/testsuite/gdb.gdb/xfullpath.exp ...

                === gdb Summary ===

gdb/testsuite:

2014-02-10  Yao Qi  <yao@codesourcery.com>

	PR testsuite/16543
	* configure.ac: Append gdb.gdb/Makefile in AC_OUTPUT.
	* configure: Regenerated.
	* Makefile.in: New file.
2014-02-10 09:51:10 +08:00
Doug Evans ac020ec5ae Revert Makefile.in patch to remove all-lib.
Revert this patch (which I approved, mea culpa).

	2014-02-08  Mark Kettenis  <kettenis@gnu.org>

	* Makefile.in (all-lib): Remove.
	($(LIBGNU) $(GNULIB_H)): Replace with gits of remove all-lib target.
2014-02-09 17:39:08 -08:00
Jan Kratochvil 2a081c592c Fix Python stack corruption
The fix is obvious.

gdb/
2014-02-09  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Fix Python stack corruption.
	* python/py-linetable.c (ltpy_get_pcs_for_line, ltpy_has_line): Use
	gdb_py_longest.

Message-ID: <20140207171701.GA25187@host2.jankratochvil.net>
2014-02-09 18:47:40 +01:00
Mark Kettenis 0a6bd22df7 A phony target should not be a prerequisite of a real target file
gdb/ChangeLog:

	* Makefile.in (all-lib): Remove.
	($(LIBGNU) $(GNULIB_H)): Replace with gits of remove all-lib target.
2014-02-08 12:36:17 +01:00
Andreas Schwab 6c46644734 Fix typo in test name
* gdb.python/py-framefilter.exp: Fix typo.
2014-02-08 10:44:11 +01:00
Yao Qi 6e85473513 Test no =breakpoint-modified is emitted for modifications from MI commands
As design, =breakpoint-modified isn't emitted when breakpoints are modified
by MI commands.  This patch is to add tests for this.

gdb/testsuite:

2014-02-08  Yao Qi  <yao@codesourcery.com>

	* gdb.mi/mi-breakpoint-changed.exp (test_insert_delete_modify): Test
	that no =breakpoint-modified is emitted when breakpoints are
	modified through MI commands.
2014-02-08 09:41:01 +08:00
Doug Evans caf5a49149 add forgotten entry in previous checkin
(active_ext_lang_state): Fix typo in comment.
2014-02-07 11:56:58 -08:00
Doug Evans 1a86040918 * extension-priv.h (extension_language_script_ops): Add comment.
(extension_language_ops): Add comment.
2014-02-07 11:44:46 -08:00
Pedro Alves d137e6dc79 Make sure we don't resume the stepped thread by accident.
Say:

<stopped at a breakpoint in thread 2>
(gdb) thread 3
(gdb) step

The above triggers the prepare_to_proceed/deferred_step_ptid process,
which switches back to thread 2, to step over its breakpoint before
getting back to thread 3 and "step" it.

If while stepping over the breakpoint in thread 2, a signal arrives,
and it is set to pass/nostop, we'll set a step-resume breakpoint at
the supposed signal-handler resume address, and call keep_going.  The
problem is that we were supposedly stepping thread 3, and that
keep_going delivers a signal to thread 2, and due to scheduler-locking
off, resumes everything else, _including_ thread 3, the thread we want
stepping.  This means that we lose control of thread 3 until the next
event, when we stop everything.  The end result for the user, is that
GDB lost control of the "step".

Here's the current infrun debug output of the above, with the testcase
in the patch below:

infrun: clear_proceed_status_thread (Thread 0x2aaaab8f5700 (LWP 11663))
infrun: clear_proceed_status_thread (Thread 0x2aaaab6f4700 (LWP 11662))
infrun: clear_proceed_status_thread (Thread 0x2aaaab4f2b20 (LWP 11659))
infrun: proceed (addr=0xffffffffffffffff, signal=144, step=1)
infrun: prepare_to_proceed (step=1), switched to [Thread 0x2aaaab6f4700 (LWP 11662)]
infrun: resume (step=1, signal=0), trap_expected=1, current thread [Thread 0x2aaaab6f4700 (LWP 11662)] at 0x40098f
infrun: wait_for_inferior ()
infrun: target_wait (-1, status) =
infrun:   11659 [Thread 0x2aaaab6f4700 (LWP 11662)],
infrun:   status->kind = stopped, signal = SIGUSR1
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x40098f
infrun: random signal 30

Program received signal SIGUSR1, User defined signal 1.
infrun: signal arrived while stepping over breakpoint
infrun: inserting step-resume breakpoint at 0x40098f
infrun: resume (step=0, signal=30), trap_expected=0, current thread [Thread 0x2aaaab6f4700 (LWP 11662)] at 0x40098f

^^^ this is a wildcard resume.

infrun: prepare_to_wait
infrun: target_wait (-1, status) =
infrun:   11659 [Thread 0x2aaaab6f4700 (LWP 11662)],
infrun:   status->kind = stopped, signal = SIGTRAP
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x40098f
infrun: BPSTAT_WHAT_STEP_RESUME
infrun: resume (step=1, signal=0), trap_expected=1, current thread [Thread 0x2aaaab6f4700 (LWP 11662)] at 0x40098f

^^^ step-resume hit, meaning the handler returned, so we go back to stepping thread 3.

infrun: prepare_to_wait
infrun: target_wait (-1, status) =
infrun:   11659 [Thread 0x2aaaab6f4700 (LWP 11662)],
infrun:   status->kind = stopped, signal = SIGTRAP
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED

infrun: stop_pc = 0x40088b
infrun: switching back to stepped thread
infrun: Switching context from Thread 0x2aaaab6f4700 (LWP 11662) to Thread 0x2aaaab8f5700 (LWP 11663)
infrun: resume (step=1, signal=0), trap_expected=0, current thread [Thread 0x2aaaab8f5700 (LWP 11663)] at 0x400938
infrun: prepare_to_wait
infrun: target_wait (-1, status) =
infrun:   11659 [Thread 0x2aaaab8f5700 (LWP 11663)],
infrun:   status->kind = stopped, signal = SIGTRAP
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x40093a
infrun: keep going
infrun: resume (step=1, signal=0), trap_expected=0, current thread [Thread 0x2aaaab8f5700 (LWP 11663)] at 0x40093a
infrun: prepare_to_wait
infrun: target_wait (-1, status) =
infrun:   11659 [Thread 0x2aaaab8f5700 (LWP 11663)],
infrun:   status->kind = stopped, signal = SIGTRAP
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x40091e
infrun: stepped to a different line
infrun: stop_stepping
[Switching to Thread 0x2aaaab8f5700 (LWP 11663)]
69            (*myp) ++; /* set breakpoint child_two here */

^^^ we stopped at the wrong line.  We still stepped a bit because the
test is running in a loop, and when we got back to stepping thread 3,
it happened to be in the stepping range.  (The loop increments a
counter, and the test makes sure it increments exactly once.  Without
the fix, the counter increments a bunch, since the user-stepped thread
runs free without GDB noticing.)

The fix is to switch to the stepping thread before continuing for the
step-resume breakpoint.

gdb/
2014-02-07  Pedro Alves  <palves@redhat.com>

	* infrun.c (handle_signal_stop) <signal arrives while stepping
	over a breakpoint>: Switch back to the stepping thread.

gdb/testsuite/
2014-02-07  Pedro Alves  <pedro@codesourcery.com>
	    Pedro Alves  <palves@redhat.com>

	* gdb.threads/step-after-sr-lock.c: New file.
	* gdb.threads/step-after-sr-lock.exp: New file.
2014-02-07 19:35:30 +00:00
Pedro Alves b5ee5a50d4 Fix gdb.threads/stepi-random-signal.exp on software single-step targets.
Currently on software single-step Linux targets we get:

 (gdb) PASS: gdb.threads/stepi-random-signal.exp: before stepi: get hexadecimal valueof "$pc"
 stepi
 infrun: clear_proceed_status_thread (Thread 0x7ffff7fca700 (LWP 7073))
 infrun: clear_proceed_status_thread (Thread 0x7ffff7fcb740 (LWP 7069))
 infrun: proceed (addr=0xffffffffffffffff, signal=GDB_SIGNAL_DEFAULT, step=1)
 infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff7fcb740 (LWP 7069)] at 0x400700
 infrun: wait_for_inferior ()
 infrun: target_wait (-1, status) =
 infrun:   7069 [Thread 0x7ffff7fcb740 (LWP 7069)],
 infrun:   status->kind = stopped, signal = GDB_SIGNAL_TRAP
 infrun: infwait_normal_state
 infrun: TARGET_WAITKIND_STOPPED
 infrun: stop_pc = 0x400704
 infrun: software single step trap for Thread 0x7ffff7fcb740 (LWP 7069)
 infrun: stepi/nexti
 infrun: stop_stepping
 44        while (counter != 0)
 (gdb) FAIL: gdb.threads/stepi-random-signal.exp: stepi (no random signal)

Vs hardware-step targets:

 (gdb) PASS: gdb.threads/stepi-random-signal.exp: before stepi: get hexadecimal valueof "$pc"
 stepi
 infrun: clear_proceed_status_thread (Thread 0x7ffff7fca700 (LWP 9565))
 infrun: clear_proceed_status_thread (Thread 0x7ffff7fcb740 (LWP 9561))
 infrun: proceed (addr=0xffffffffffffffff, signal=GDB_SIGNAL_DEFAULT, step=1)
 infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff7fcb740 (LWP 9561)] at 0x400700
 infrun: wait_for_inferior ()
 infrun: target_wait (-1, status) =
 infrun:   9561 [Thread 0x7ffff7fcb740 (LWP 9561)],
 infrun:   status->kind = stopped, signal = GDB_SIGNAL_CHLD
 infrun: infwait_normal_state
 infrun: TARGET_WAITKIND_STOPPED
 infrun: stop_pc = 0x400700
 infrun: random signal (GDB_SIGNAL_CHLD)
 infrun: random signal, keep going
 infrun: resume (step=1, signal=GDB_SIGNAL_CHLD), trap_expected=0, current thread [Thread 0x7ffff7fcb740 (LWP 9561)] at 0x400700
 infrun: prepare_to_wait
 infrun: target_wait (-1, status) =
 infrun:   9561 [Thread 0x7ffff7fcb740 (LWP 9561)],
 infrun:   status->kind = stopped, signal = GDB_SIGNAL_TRAP
 infrun: infwait_normal_state
 infrun: TARGET_WAITKIND_STOPPED
 infrun: stop_pc = 0x400704
 infrun: stepi/nexti
 infrun: stop_stepping
 44        while (counter != 0)
 (gdb) PASS: gdb.threads/stepi-random-signal.exp: stepi

The test turns on infrun debug, does a stepi while a SIGCHLD is
pending, and checks whether the "random signal" paths in infrun.c are
taken.

On the software single-step variant above, those paths were not taken.

This is a test bug.

The Linux backend short-circuits reporting signals that are set to
pass/nostop/noprint.  But _only_ if the thread is _not_
single-stepping.  So on hardware-step targets, even though the signal
is set to pass/nostop/noprint by default, the thread is indeed told to
single-step, and so the core sees the signal.  On the other hand, on
software single-step architectures, the backend never actually gets a
single-step request (steps are emulated by setting a breakpoint at the
next pc, and then the target told to continue, not step).  So the
short-circuiting code triggers and the core doesn't see the signal.

The fix is to make the test be sure the target doesn't bypass
reporting the signal to the core.

Tested on x86_64 Fedora 17, both with and without a series that
implements software single-step for x86_64.

gdb/testsuite/
2014-02-07  Pedro Alves  <palves@redhat.com>

	* gdb.threads/stepi-random-signal.exp: Set SIGCHLD to print.
2014-02-07 19:04:10 +00:00
Yao Qi ce6d08922f Return early in target_xfer_partial when LEN is zero.
Nowadays, argument LEN of to_xfer_partial can be zero in some cases,
and each implementation may do nothing and return zero, indicating
transfer is done.  That is fine.  However, when we change
to_xfer_partial to return target_xfer_status, we have to check every
return value of most of to_xfer_partial implementations, return
TARGET_XFER_DONE if return value is zero.

This patch simplifies this by checking LEN in target_xfer_partial, and
return 0 if LEN is zero.  Regression tested on x86_84-linux.  Is it
OK?

gdb:

2014-02-07  Yao Qi  <yao@codesourcery.com>

	* target.c (target_xfer_partial): Return zero if LEN is zero.
2014-02-07 11:19:58 +08:00
Yao Qi 2ed4b5488f Replace -1 with TARGET_XFER_E_IO
Hi,
This patch replaces -1 with TARGET_XFER_E_IO in the implementations of
to_xfer_partial and their callees.  This change is quite mechanical,
and makes the next patch shorter.

gdb:

2014-02-07  Yao Qi  <yao@codesourcery.com>

	* auxv.c (procfs_xfer_auxv): Replace -1 with TARGET_XFER_E_IO.
	(ld_so_xfer_auxv): Likewise.
	* bfd-target.c (target_bfd_xfer_partial): Likewise.
	* bsd-kvm.c (bsd_kvm_xfer_partial): Likewise.
	* corelow.c (core_xfer_partial): Likewise.
	* ctf.c (ctf_xfer_partial): Likewise.
	* darwin-nat.c (darwin_read_dyld_info): Likewise.
	(darwin_xfer_partial): Likewise.
	* exec.c (exec_xfer_partial): Likewise.
	* gnu-nat.c (gnu_xfer_partial): Likewise.
	* ia64-hpux-nat.c (ia64_hpux_xfer_uregs): Likewise.
	* inf-ptrace.c (inf_ptrace_xfer_partial): Likewise.
	* inf-ttrace.c (inf_ttrace_xfer_partial): Likewise.
	* linux-nat.c (linux_xfer_siginfo): Likewise.
	(linux_proc_xfer_spu): Likewise.
	* procfs.c (procfs_xfer_partial): Likewise.
	* record-full.c (record_full_xfer_partial): Likewise.
	(record_full_core_xfer_partial): Likewise.
	* remote-sim.c (gdbsim_xfer_partial): Likewise.
	* remote.c (remote_write_qxfer): Likewise.
	(remote_write_qxfer, remote_read_qxfer): Likewise.
	(remote_xfer_partial): Likewise.
	* rs6000-nat.c (rs6000_xfer_partial): Likewise.
	(rs6000_xfer_shared_libraries): Likewise.
	* sparc-nat.c (sparc_xfer_wcookie): Likewise.
	* spu-linux-nat.c (spu_proc_xfer_spu): Likewise.
	(spu_xfer_partial): Likewise.
	* target.c (memory_xfer_partial_1): Likewise.
	* tracepoint.c (tfile_xfer_partial): Likewise.
	* windows-nat.c (windows_xfer_shared_libraries): Likewise.
	(windows_xfer_partial): Likewise.
2014-02-07 11:19:58 +08:00
Yao Qi c09f20e469 core_xfer_shared_libraries and core_xfer_shared_libraries_aix returns ULONGEST
This patch documents the return value of core_xfer_shared_libraries_aix
and core_xfer_shared_libraries gdbarch methods, and changes return
type to ULONGEST from LONGEST.

In a following patch, core_xfer_partial. is changed to check their
return values and return an appropriate target_xfer_status.

gdb:

2014-02-07  Yao Qi  <yao@codesourcery.com>

	* gdbarch.sh (core_xfer_shared_libraries): Returns ULONGEST.  Add
	comments.
	(core_xfer_shared_libraries_aix): Likewise.
	* gdbarch.c, gdbarch.h: Regenerated.
	* i386-cygwin-tdep.c (windows_core_xfer_shared_libraries): Return
	ULONGEST.  Change 'len_avail' type to ULONGEST.
	* rs6000-aix-tdep.c (rs6000_aix_ld_info_to_xml): Likewise.
	* rs6000-aix-tdep.h (rs6000_aix_ld_info_to_xml): Update
	declaration.
	(rs6000_aix_core_xfer_shared_libraries_aix): Return ULONGEST.
2014-02-07 11:19:57 +08:00
Yao Qi 8635b3bf59 Tweak in memory_error
This patch adds a local variable exception of type 'enum errors' and
pass it to throw_error, because 'err' is of type
'enum target_xfer_error', and we're abusing it to store an 'enum errors'.

gdb:

2014-02-07  Yao Qi  <yao@codesourcery.com>

	* corefile.c (memory_error): Get 'exception' from ERR and pass
	'exception' to throw_error.
2014-02-07 11:19:57 +08:00
Jan Kratochvil 3c77faf33d Fix i386-sse-stack-align.exp regression since GDB_PARALLEL.
gdb/testsuite/
2014-02-06  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Fix i386-sse-stack-align.exp regression since GDB_PARALLEL.
	* gdb.arch/i386-sse-stack-align.exp: Use standard_output_file.
2014-02-06 23:14:20 +01:00
Tom Tromey e99dc82053 indentation fixlet in gdbserver/Makefile.in.
This fixes a minor indentation issue in gdbserver/Makefile.in.

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

	* Makefile.in (SFILES): Fix indentation.
2014-02-06 12:04:50 -07:00
Doug Evans 4f8fcb74d3 fix copyright year in new files in previous checkin 2014-02-05 20:17:30 -08:00