summaryrefslogtreecommitdiff
path: root/gdb/target.c
diff options
context:
space:
mode:
authorStan Shebs <shebs@apple.com>2010-01-07 19:17:45 +0000
committerStan Shebs <shebs@apple.com>2010-01-07 19:17:45 +0000
commitd50030786f21bfb5039440588286e529ed80c1c6 (patch)
tree216ec25d94558616e906954f4892d29d29f0c259 /gdb/target.c
parentd7cb419d08fb93c4f3f37db2e6277e1d233d7dc1 (diff)
downloadgdb-d50030786f21bfb5039440588286e529ed80c1c6.tar.gz
Make tracepoint operations go through target vector.
* target.h (enum trace_find_type): New enum. (struct target_ops): New fields to_trace_init, to_download_tracepoint, to_download_trace_state_variable, to_trace_set_readonly_regions, to_trace_start, to_get_trace_status, to_trace_stop, to_trace_find, to_get_trace_state_variable_value, to_set_disconnected_tracing. (target_trace_init): New macro. (target_download_tracepoint): New macro. (target_download_trace_state_variable): New macro. (target_trace_start): New macro. (target_trace_set_readonly_regions): New macro. (target_get_trace_status): New macro. (target_trace_stop): New macro. (target_trace_find): New macro. (target_get_trace_state_variable_value): New macro. (target_set_disconnected_tracing): New macro. * target.c (update_current_target): Inherit and set defaults for tracepoint operations. * tracepoint.c (default_collect): Make globally visible. (target_is_remote): Remove, along with all calls. (tvariables_info): Call target_get_trace_state_variable_value. (remote_set_transparent_ranges): Remove. (trace_start_command): Call target_trace_init, target_download_tracepoint, etc. (download_tracepoint): Remove. (trace_stop_command): Simplify. (stop_tracing): Call target_trace_stop. (get_trace_status): Call target_get_trace_status. (trace_status_command): Add case for targets that cannot trace. (finish_tfind_command): Change to take numerical arguments, call target_trace_find. (trace_find_command): Update call to finish_tfind_command. (trace_find_pc_command): Ditto. (trace_find_tracepoint_command): Ditto. (trace_find_line_command): Ditto. (trace_find_range_command): Ditto. (trace_find_outside_command): Ditto. (set_disconnected_tracing_value): Call target_set_disconnected_tracing. * remote.c: Add protocol encoding bits from tracepoint.c. (trace_error): Move from tracepoint.c. (remote_get_noisy_reply): Ditto. (free_actions_list_cleanup_wrapper): Ditto. (free_actions_list): Ditto. (remote_trace_init): New function. (remote_download_tracepoint): New function. (remote_download_trace_state_variable): New function. (remote_trace_set_readonly_regions): New function. (remote_trace_start): New function. (remote_get_trace_status): New function. (remote_trace_stop): New function. (remote_trace_find): New function. (remote_download_trace_state_variable): New function. (remote_set_disconnected_tracing): New function. (init_remote_ops): Add tracepoint operations.
Diffstat (limited to 'gdb/target.c')
-rw-r--r--gdb/target.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/gdb/target.c b/gdb/target.c
index 38cd508e902..25a2cd736d6 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -685,6 +685,16 @@ update_current_target (void)
INHERIT (to_get_ada_task_ptid, t);
/* Do not inherit to_search_memory. */
INHERIT (to_supports_multi_process, t);
+ INHERIT (to_trace_init, t);
+ INHERIT (to_download_tracepoint, t);
+ INHERIT (to_download_trace_state_variable, t);
+ INHERIT (to_trace_set_readonly_regions, t);
+ INHERIT (to_trace_start, t);
+ INHERIT (to_get_trace_status, t);
+ INHERIT (to_trace_stop, t);
+ INHERIT (to_trace_find, t);
+ INHERIT (to_get_trace_state_variable_value, t);
+ INHERIT (to_set_disconnected_tracing, t);
INHERIT (to_magic, t);
/* Do not inherit to_memory_map. */
/* Do not inherit to_flash_erase. */
@@ -833,6 +843,36 @@ update_current_target (void)
de_fault (to_supports_multi_process,
(int (*) (void))
return_zero);
+ de_fault (to_trace_init,
+ (void (*) (void))
+ tcomplain);
+ de_fault (to_download_tracepoint,
+ (void (*) (struct breakpoint *))
+ tcomplain);
+ de_fault (to_download_trace_state_variable,
+ (void (*) (struct trace_state_variable *))
+ tcomplain);
+ de_fault (to_trace_set_readonly_regions,
+ (void (*) (void))
+ tcomplain);
+ de_fault (to_trace_start,
+ (void (*) (void))
+ tcomplain);
+ de_fault (to_get_trace_status,
+ (int (*) (int *))
+ return_minus_one);
+ de_fault (to_trace_stop,
+ (void (*) (void))
+ tcomplain);
+ de_fault (to_trace_find,
+ (int (*) (enum trace_find_type, int, ULONGEST, ULONGEST, int *))
+ return_zero);
+ de_fault (to_get_trace_state_variable_value,
+ (int (*) (int, LONGEST *))
+ return_zero);
+ de_fault (to_set_disconnected_tracing,
+ (void (*) (int))
+ tcomplain);
#undef de_fault
/* Finally, position the target-stack beneath the squashed