X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Ftarget-delegates.c;h=934f3021eac6cefeaf95ea80085ba8ef64f509bd;hb=cd4ae029569aa0c38230f042b39f505ac5b8f732;hp=6fb242a939da04cdc3ca8739c5d6d733de2be4a3;hpb=8d5269391fc7dbbd00aa56dcac77bd5a277d2177;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c index 6fb242a939..934f3021ea 100644 --- a/gdb/target-delegates.c +++ b/gdb/target-delegates.c @@ -60,6 +60,18 @@ tdefault_wait (struct target_ops *self, ptid_t arg1, struct target_waitstatus *a noprocess (); } +static void +delegate_fetch_registers (struct target_ops *self, struct regcache *arg1, int arg2) +{ + self = self->beneath; + self->to_fetch_registers (self, arg1, arg2); +} + +static void +tdefault_fetch_registers (struct target_ops *self, struct regcache *arg1, int arg2) +{ +} + static void delegate_store_registers (struct target_ops *self, struct regcache *arg1, int arg2) { @@ -125,6 +137,19 @@ tdefault_can_use_hw_breakpoint (struct target_ops *self, int arg1, int arg2, int return 0; } +static int +delegate_ranged_break_num_registers (struct target_ops *self) +{ + self = self->beneath; + return self->to_ranged_break_num_registers (self); +} + +static int +tdefault_ranged_break_num_registers (struct target_ops *self) +{ + return -1; +} + static int delegate_insert_hw_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct bp_target_info *arg2) { @@ -177,6 +202,19 @@ tdefault_insert_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, i return -1; } +static int +delegate_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3) +{ + self = self->beneath; + return self->to_insert_mask_watchpoint (self, arg1, arg2, arg3); +} + +static int +tdefault_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3) +{ + return 1; +} + static int delegate_stopped_by_watchpoint (struct target_ops *self) { @@ -452,6 +490,18 @@ tdefault_thread_name (struct target_ops *self, struct thread_info *arg1) return 0; } +static void +delegate_stop (struct target_ops *self, ptid_t arg1) +{ + self = self->beneath; + self->to_stop (self, arg1); +} + +static void +tdefault_stop (struct target_ops *self, ptid_t arg1) +{ +} + static void delegate_rcmd (struct target_ops *self, char *arg1, struct ui_file *arg2) { @@ -630,6 +680,32 @@ tdefault_supports_string_tracing (struct target_ops *self) return 0; } +static int +delegate_supports_evaluation_of_breakpoint_conditions (struct target_ops *self) +{ + self = self->beneath; + return self->to_supports_evaluation_of_breakpoint_conditions (self); +} + +static int +tdefault_supports_evaluation_of_breakpoint_conditions (struct target_ops *self) +{ + return 0; +} + +static int +delegate_can_run_breakpoint_commands (struct target_ops *self) +{ + self = self->beneath; + return self->to_can_run_breakpoint_commands (self); +} + +static int +tdefault_can_run_breakpoint_commands (struct target_ops *self) +{ + return 0; +} + static struct gdbarch * delegate_thread_architecture (struct target_ops *self, ptid_t arg1) { @@ -895,6 +971,121 @@ tdefault_set_circular_trace_buffer (struct target_ops *self, int arg1) { } +static void +delegate_set_trace_buffer_size (struct target_ops *self, LONGEST arg1) +{ + self = self->beneath; + self->to_set_trace_buffer_size (self, arg1); +} + +static void +tdefault_set_trace_buffer_size (struct target_ops *self, LONGEST arg1) +{ +} + +static int +delegate_set_trace_notes (struct target_ops *self, const char *arg1, const char *arg2, const char *arg3) +{ + self = self->beneath; + return self->to_set_trace_notes (self, arg1, arg2, arg3); +} + +static int +tdefault_set_trace_notes (struct target_ops *self, const char *arg1, const char *arg2, const char *arg3) +{ + return 0; +} + +static int +delegate_get_tib_address (struct target_ops *self, ptid_t arg1, CORE_ADDR *arg2) +{ + self = self->beneath; + return self->to_get_tib_address (self, arg1, arg2); +} + +static int +tdefault_get_tib_address (struct target_ops *self, ptid_t arg1, CORE_ADDR *arg2) +{ + tcomplain (); +} + +static void +delegate_set_permissions (struct target_ops *self) +{ + self = self->beneath; + self->to_set_permissions (self); +} + +static void +tdefault_set_permissions (struct target_ops *self) +{ +} + +static int +delegate_static_tracepoint_marker_at (struct target_ops *self, CORE_ADDR arg1, struct static_tracepoint_marker *arg2) +{ + self = self->beneath; + return self->to_static_tracepoint_marker_at (self, arg1, arg2); +} + +static int +tdefault_static_tracepoint_marker_at (struct target_ops *self, CORE_ADDR arg1, struct static_tracepoint_marker *arg2) +{ + return 0; +} + +static VEC(static_tracepoint_marker_p) * +delegate_static_tracepoint_markers_by_strid (struct target_ops *self, const char *arg1) +{ + self = self->beneath; + return self->to_static_tracepoint_markers_by_strid (self, arg1); +} + +static VEC(static_tracepoint_marker_p) * +tdefault_static_tracepoint_markers_by_strid (struct target_ops *self, const char *arg1) +{ + tcomplain (); +} + +static struct traceframe_info * +delegate_traceframe_info (struct target_ops *self) +{ + self = self->beneath; + return self->to_traceframe_info (self); +} + +static struct traceframe_info * +tdefault_traceframe_info (struct target_ops *self) +{ + return 0; +} + +static int +delegate_use_agent (struct target_ops *self, int arg1) +{ + self = self->beneath; + return self->to_use_agent (self, arg1); +} + +static int +tdefault_use_agent (struct target_ops *self, int arg1) +{ + tcomplain (); +} + +static int +delegate_can_use_agent (struct target_ops *self) +{ + self = self->beneath; + return self->to_can_use_agent (self); +} + +static int +tdefault_can_use_agent (struct target_ops *self) +{ + return 0; +} + static int delegate_supports_btrace (struct target_ops *self) { @@ -908,6 +1099,19 @@ tdefault_supports_btrace (struct target_ops *self) return 0; } +static int +delegate_augmented_libraries_svr4_read (struct target_ops *self) +{ + self = self->beneath; + return self->to_augmented_libraries_svr4_read (self); +} + +static int +tdefault_augmented_libraries_svr4_read (struct target_ops *self) +{ + return 0; +} + static void install_delegators (struct target_ops *ops) { @@ -921,6 +1125,8 @@ install_delegators (struct target_ops *ops) ops->to_resume = delegate_resume; if (ops->to_wait == NULL) ops->to_wait = delegate_wait; + if (ops->to_fetch_registers == NULL) + ops->to_fetch_registers = delegate_fetch_registers; if (ops->to_store_registers == NULL) ops->to_store_registers = delegate_store_registers; if (ops->to_prepare_to_store == NULL) @@ -933,6 +1139,8 @@ install_delegators (struct target_ops *ops) ops->to_remove_breakpoint = delegate_remove_breakpoint; if (ops->to_can_use_hw_breakpoint == NULL) ops->to_can_use_hw_breakpoint = delegate_can_use_hw_breakpoint; + if (ops->to_ranged_break_num_registers == NULL) + ops->to_ranged_break_num_registers = delegate_ranged_break_num_registers; if (ops->to_insert_hw_breakpoint == NULL) ops->to_insert_hw_breakpoint = delegate_insert_hw_breakpoint; if (ops->to_remove_hw_breakpoint == NULL) @@ -941,6 +1149,8 @@ install_delegators (struct target_ops *ops) ops->to_remove_watchpoint = delegate_remove_watchpoint; if (ops->to_insert_watchpoint == NULL) ops->to_insert_watchpoint = delegate_insert_watchpoint; + if (ops->to_insert_mask_watchpoint == NULL) + ops->to_insert_mask_watchpoint = delegate_insert_mask_watchpoint; if (ops->to_stopped_by_watchpoint == NULL) ops->to_stopped_by_watchpoint = delegate_stopped_by_watchpoint; if (ops->to_stopped_data_address == NULL) @@ -987,6 +1197,8 @@ install_delegators (struct target_ops *ops) ops->to_extra_thread_info = delegate_extra_thread_info; if (ops->to_thread_name == NULL) ops->to_thread_name = delegate_thread_name; + if (ops->to_stop == NULL) + ops->to_stop = delegate_stop; if (ops->to_rcmd == NULL) ops->to_rcmd = delegate_rcmd; if (ops->to_pid_to_exec_file == NULL) @@ -1021,6 +1233,10 @@ install_delegators (struct target_ops *ops) ops->to_supports_enable_disable_tracepoint = delegate_supports_enable_disable_tracepoint; if (ops->to_supports_string_tracing == NULL) ops->to_supports_string_tracing = delegate_supports_string_tracing; + if (ops->to_supports_evaluation_of_breakpoint_conditions == NULL) + ops->to_supports_evaluation_of_breakpoint_conditions = delegate_supports_evaluation_of_breakpoint_conditions; + if (ops->to_can_run_breakpoint_commands == NULL) + ops->to_can_run_breakpoint_commands = delegate_can_run_breakpoint_commands; if (ops->to_thread_architecture == NULL) ops->to_thread_architecture = delegate_thread_architecture; if (ops->to_trace_init == NULL) @@ -1063,8 +1279,28 @@ install_delegators (struct target_ops *ops) ops->to_set_disconnected_tracing = delegate_set_disconnected_tracing; if (ops->to_set_circular_trace_buffer == NULL) ops->to_set_circular_trace_buffer = delegate_set_circular_trace_buffer; + if (ops->to_set_trace_buffer_size == NULL) + ops->to_set_trace_buffer_size = delegate_set_trace_buffer_size; + if (ops->to_set_trace_notes == NULL) + ops->to_set_trace_notes = delegate_set_trace_notes; + if (ops->to_get_tib_address == NULL) + ops->to_get_tib_address = delegate_get_tib_address; + if (ops->to_set_permissions == NULL) + ops->to_set_permissions = delegate_set_permissions; + if (ops->to_static_tracepoint_marker_at == NULL) + ops->to_static_tracepoint_marker_at = delegate_static_tracepoint_marker_at; + if (ops->to_static_tracepoint_markers_by_strid == NULL) + ops->to_static_tracepoint_markers_by_strid = delegate_static_tracepoint_markers_by_strid; + if (ops->to_traceframe_info == NULL) + ops->to_traceframe_info = delegate_traceframe_info; + if (ops->to_use_agent == NULL) + ops->to_use_agent = delegate_use_agent; + if (ops->to_can_use_agent == NULL) + ops->to_can_use_agent = delegate_can_use_agent; if (ops->to_supports_btrace == NULL) ops->to_supports_btrace = delegate_supports_btrace; + if (ops->to_augmented_libraries_svr4_read == NULL) + ops->to_augmented_libraries_svr4_read = delegate_augmented_libraries_svr4_read; } static void @@ -1075,16 +1311,19 @@ install_dummy_methods (struct target_ops *ops) ops->to_detach = tdefault_detach; ops->to_resume = tdefault_resume; ops->to_wait = tdefault_wait; + ops->to_fetch_registers = tdefault_fetch_registers; ops->to_store_registers = tdefault_store_registers; ops->to_prepare_to_store = tdefault_prepare_to_store; ops->to_files_info = tdefault_files_info; ops->to_insert_breakpoint = memory_insert_breakpoint; ops->to_remove_breakpoint = memory_remove_breakpoint; ops->to_can_use_hw_breakpoint = tdefault_can_use_hw_breakpoint; + ops->to_ranged_break_num_registers = tdefault_ranged_break_num_registers; ops->to_insert_hw_breakpoint = tdefault_insert_hw_breakpoint; ops->to_remove_hw_breakpoint = tdefault_remove_hw_breakpoint; ops->to_remove_watchpoint = tdefault_remove_watchpoint; ops->to_insert_watchpoint = tdefault_insert_watchpoint; + ops->to_insert_mask_watchpoint = tdefault_insert_mask_watchpoint; ops->to_stopped_by_watchpoint = tdefault_stopped_by_watchpoint; ops->to_stopped_data_address = tdefault_stopped_data_address; ops->to_watchpoint_addr_within_range = default_watchpoint_addr_within_range; @@ -1108,6 +1347,7 @@ install_dummy_methods (struct target_ops *ops) ops->to_has_exited = tdefault_has_exited; ops->to_extra_thread_info = tdefault_extra_thread_info; ops->to_thread_name = tdefault_thread_name; + ops->to_stop = tdefault_stop; ops->to_rcmd = default_rcmd; ops->to_pid_to_exec_file = tdefault_pid_to_exec_file; ops->to_log_command = tdefault_log_command; @@ -1125,6 +1365,8 @@ install_dummy_methods (struct target_ops *ops) ops->to_supports_multi_process = tdefault_supports_multi_process; ops->to_supports_enable_disable_tracepoint = tdefault_supports_enable_disable_tracepoint; ops->to_supports_string_tracing = tdefault_supports_string_tracing; + ops->to_supports_evaluation_of_breakpoint_conditions = tdefault_supports_evaluation_of_breakpoint_conditions; + ops->to_can_run_breakpoint_commands = tdefault_can_run_breakpoint_commands; ops->to_thread_architecture = default_thread_architecture; ops->to_trace_init = tdefault_trace_init; ops->to_download_tracepoint = tdefault_download_tracepoint; @@ -1146,5 +1388,15 @@ install_dummy_methods (struct target_ops *ops) ops->to_get_min_fast_tracepoint_insn_len = tdefault_get_min_fast_tracepoint_insn_len; ops->to_set_disconnected_tracing = tdefault_set_disconnected_tracing; ops->to_set_circular_trace_buffer = tdefault_set_circular_trace_buffer; + ops->to_set_trace_buffer_size = tdefault_set_trace_buffer_size; + ops->to_set_trace_notes = tdefault_set_trace_notes; + ops->to_get_tib_address = tdefault_get_tib_address; + ops->to_set_permissions = tdefault_set_permissions; + ops->to_static_tracepoint_marker_at = tdefault_static_tracepoint_marker_at; + ops->to_static_tracepoint_markers_by_strid = tdefault_static_tracepoint_markers_by_strid; + ops->to_traceframe_info = tdefault_traceframe_info; + ops->to_use_agent = tdefault_use_agent; + ops->to_can_use_agent = tdefault_can_use_agent; ops->to_supports_btrace = tdefault_supports_btrace; + ops->to_augmented_libraries_svr4_read = tdefault_augmented_libraries_svr4_read; }