diff options
author | Pedro Alves <palves@redhat.com> | 2011-02-14 11:22:29 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2011-02-14 11:22:29 +0000 |
commit | e6e4e7014d3721283cf0415cadb3c7f1a1200f7b (patch) | |
tree | 9107c3b03c92b237512758b98bf539c616ea90b9 /gdb/tracepoint.h | |
parent | e6ca34fcfbd6f341cb70c680d45f229cb5801eeb (diff) | |
download | gdb-e6e4e7014d3721283cf0415cadb3c7f1a1200f7b.zip gdb-e6e4e7014d3721283cf0415cadb3c7f1a1200f7b.tar.gz gdb-e6e4e7014d3721283cf0415cadb3c7f1a1200f7b.tar.bz2 |
gdb/
* target.c (target_read_live_memory): New function.
(memory_xfer_live_readonly_partial): New.
(memory_xfer_partial): If reading from a traceframe, fallback to
reading unavailable read-only memory from read-only regions of
live target memory.
* tracepoint.c (disconnect_tracing): Adjust.
(set_current_traceframe): New, factored out from
set_traceframe_number.
(set_traceframe_number): Reimplement to only change the traceframe
number on the GDB side.
(do_restore_current_traceframe_cleanup): Adjust.
(make_cleanup_restore_traceframe_number): New.
(cur_traceframe_number): New global.
(tfile_open): Set cur_traceframe_number to no traceframe.
(set_tfile_traceframe): New function.
(tfile_trace_find): If looking up a traceframe using any method
other than by number, make sure the current tfile traceframe
matches gdb's current traceframe. Update the current tfile
traceframe if the lookup succeeded.
(tfile_fetch_registers, tfile_xfer_partial)
(tfile_get_trace_state_variable_value): Make sure the remote
traceframe matches gdb's current traceframe.
* remote.c (remote_traceframe_number): New global.
(remote_open_1): Set it to -1.
(set_remote_traceframe): New function.
(remote_fetch_registers, remote_store_registers)
(remote_xfer_memory, remote_xfer_partial)
(remote_get_trace_state_variable_value): Make sure the remote
traceframe matches gdb's current traceframe.
(remote_trace_find): If looking up a traceframe using any method
other than by number, make sure the current remote traceframe
matches gdb's current traceframe. Update the current remote
traceframe if the lookup succeeded.
* infrun.c (fetch_inferior_event): Adjust.
* tracepoint.h (set_current_traceframe): Declare.
(get_traceframe_number, set_traceframe_number): Add describing
comments.
Diffstat (limited to 'gdb/tracepoint.h')
-rw-r--r-- | gdb/tracepoint.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/gdb/tracepoint.h b/gdb/tracepoint.h index ee15e94..b94537c 100644 --- a/gdb/tracepoint.h +++ b/gdb/tracepoint.h @@ -192,9 +192,24 @@ extern void release_static_tracepoint_marker (struct static_tracepoint_marker *) extern void (*deprecated_trace_find_hook) (char *arg, int from_tty); extern void (*deprecated_trace_start_stop_hook) (int start, int from_tty); -int get_traceframe_number (void); -void set_traceframe_number (int); +/* Returns the current traceframe number. */ +extern int get_traceframe_number (void); + +/* Make the traceframe NUM be the current GDB trace frame number, and + do nothing more. In particular, this does not flush the + register/frame caches or notify the target about the trace frame + change, so that is can be used when we need to momentarily access + live memory. Targets lazily switch their current traceframe to + match GDB's traceframe number, at the appropriate times. */ +extern void set_traceframe_number (int); + +/* Make the traceframe NUM be the current trace frame, all the way to + the target, and flushes all global state (register/frame caches, + etc.). */ +extern void set_current_traceframe (int num); + struct cleanup *make_cleanup_restore_current_traceframe (void); +struct cleanup *make_cleanup_restore_traceframe_number (void); void free_actions (struct breakpoint *); extern void validate_actionline (char **, struct breakpoint *); |