diff options
author | Yao Qi <yao@codesourcery.com> | 2012-07-27 16:21:44 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2012-07-27 16:21:44 +0000 |
commit | a8a64aa848820a3143319ad3bce00d1a2f815cc5 (patch) | |
tree | d3e156f0bd6d565ce98929dc6fa77366b5e7d9bb /gdb | |
parent | c92b291c62cccb1f2ed46ae01966724bc2499e42 (diff) | |
download | gdb-a8a64aa848820a3143319ad3bce00d1a2f815cc5.zip gdb-a8a64aa848820a3143319ad3bce00d1a2f815cc5.tar.gz gdb-a8a64aa848820a3143319ad3bce00d1a2f815cc5.tar.bz2 |
gdb/
* tracepoint.c (cur_traceframe_number): Remove.
(set_tfile_traceframe): Remove.
(tfile_trace_find, tfile_fetch_registers): Update callers.
(tfile_xfer_partial, tfile_get_trace_state_variable_value): Likewise.
(tfile_open, tfile_trace_find): Likewise.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/tracepoint.c | 40 |
2 files changed, 10 insertions, 38 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 79e11f5..e6f9627 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,13 @@ 2012-07-27 Yao Qi <yao@codesourcery.com> + * tracepoint.c (cur_traceframe_number): Remove. + (set_tfile_traceframe): Remove. + (tfile_trace_find, tfile_fetch_registers): Update callers. + (tfile_xfer_partial, tfile_get_trace_state_variable_value): Likewise. + (tfile_open, tfile_trace_find): Likewise. + +2012-07-27 Yao Qi <yao@codesourcery.com> + * thread.c (switch_to_thread): Don't call registers_changed. 2012-07-26 Tom Tromey <tromey@redhat.com> diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 0fc4ea4..8060971 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -3623,7 +3623,6 @@ char *trace_filename; int trace_fd = -1; off_t trace_frames_offset; off_t cur_offset; -int cur_traceframe_number; int cur_data_size; int trace_regblock_size; @@ -3716,8 +3715,6 @@ tfile_open (char *filename, int from_tty) ts->disconnected_tracing = 0; ts->circular_buffer = 0; - cur_traceframe_number = -1; - TRY_CATCH (ex, RETURN_MASK_ALL) { /* Read through a section of newline-terminated lines that @@ -4214,28 +4211,6 @@ tfile_get_traceframe_address (off_t tframe_offset) return addr; } -/* Make tfile's selected traceframe match GDB's selected - traceframe. */ - -static void -set_tfile_traceframe (void) -{ - int newnum; - - if (cur_traceframe_number == get_traceframe_number ()) - return; - - /* Avoid recursion, tfile_trace_find calls us again. */ - cur_traceframe_number = get_traceframe_number (); - - newnum = target_trace_find (tfind_number, - get_traceframe_number (), 0, 0, NULL); - - /* Should not happen. If it does, all bets are off. */ - if (newnum != get_traceframe_number ()) - warning (_("could not set tfile's traceframe")); -} - /* Given a type of search and some parameters, scan the collection of traceframes in the file looking for a match. When found, return both the traceframe and tracepoint number, otherwise -1 for @@ -4252,12 +4227,7 @@ tfile_trace_find (enum trace_find_type type, int num, off_t offset, tframe_offset; ULONGEST tfaddr; - /* Lookups other than by absolute frame number depend on the current - trace selected, so make sure it is correct on the tfile end - first. */ - if (type != tfind_number) - set_tfile_traceframe (); - else if (num == -1) + if (num == -1) { if (tpp) *tpp = -1; @@ -4316,7 +4286,7 @@ tfile_trace_find (enum trace_find_type type, int num, *tpp = tpnum; cur_offset = offset; cur_data_size = data_size; - cur_traceframe_number = tfnum; + return tfnum; } /* Skip past the traceframe's data. */ @@ -4431,8 +4401,6 @@ tfile_fetch_registers (struct target_ops *ops, if (!trace_regblock_size) return; - set_tfile_traceframe (); - regs = alloca (trace_regblock_size); if (traceframe_find_block_type ('R', 0) >= 0) @@ -4516,8 +4484,6 @@ tfile_xfer_partial (struct target_ops *ops, enum target_object object, if (readbuf == NULL) error (_("tfile_xfer_partial: trace file is read-only")); - set_tfile_traceframe (); - if (traceframe_number != -1) { int pos = 0; @@ -4603,8 +4569,6 @@ tfile_get_trace_state_variable_value (int tsvnum, LONGEST *val) { int pos; - set_tfile_traceframe (); - pos = 0; while ((pos = traceframe_find_block_type ('V', pos)) >= 0) { |