diff options
author | Stan Shebs <shebs@codesourcery.com> | 2010-03-18 21:23:35 +0000 |
---|---|---|
committer | Stan Shebs <shebs@codesourcery.com> | 2010-03-18 21:23:35 +0000 |
commit | 4daf5ac07eb7f8cd187f7800785b2e5a465fc38a (patch) | |
tree | b58639d3f486f6fff2649cf5a52e20a3d649bc37 /gdb/remote.c | |
parent | 576ee33af3eb7e4db87587ac57d91ea3b585896a (diff) | |
download | gdb-4daf5ac07eb7f8cd187f7800785b2e5a465fc38a.zip gdb-4daf5ac07eb7f8cd187f7800785b2e5a465fc38a.tar.gz gdb-4daf5ac07eb7f8cd187f7800785b2e5a465fc38a.tar.bz2 |
2010-03-18 Stan Shebs <stan@codesourcery.com>
Pedro Alves <pedro@codesourcery.com>
* target.h (struct target_ops): New method
to_set_circular_trace_buffer.
(target_set_circular_trace_buffer): New macro.
* target.c (update_current_target): Add
to_set_circular_trace_buffer, fix to_set_disconnected_tracing
default behavior.
* remote.c (remote_set_circular_trace_buffer): New function.
(init_remote_ops): Add it to vector.
* tracepoint.h (struct trace_status): New field traceframes_created,
change buffer_size and buffer_free to int.
* tracepoint.c (circular_trace_buffer): New global.
(start_tracing): Send values of disconnected tracing and circular
trace buffer settings.
(set_circular_trace_buffer): New function.
(parse_trace_state): Handle total space and frames created.
(trace_status_command): Display total space and total frames
created.
(trace_save): Write out new status values.
(parse_trace_status): Set traceframe_count, traceframes_created,
buffer_free and buffer_size to -1 by default.
(_initialize_tracepoint): New setshow for circular-trace-buffer.
* NEWS: Mention the circular trace buffer option.
* gdb.texinfo (Starting and Stopping Trace Experiments): Describe
circular-trace-buffer.
(Tracepoint Packets): Describe QTBuffer, and details of the
qTStatus reply.
* gdb.trace/circ.exp: Test circular-trace-buffer.
* gdb.trace/tfile.exp: Update tstatus test.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r-- | gdb/remote.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index 01d558c..024b629 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -9659,6 +9659,18 @@ remote_core_of_thread (struct target_ops *ops, ptid_t ptid) } static void +remote_set_circular_trace_buffer (int val) +{ + struct remote_state *rs = get_remote_state (); + + sprintf (rs->buf, "QTBuffer:circular:%x", val); + putpkt (rs->buf); + remote_get_noisy_reply (&target_buf, &target_buf_size); + if (strcmp (target_buf, "OK")) + error (_("Target does not support this command.")); +} + +static void init_remote_ops (void) { remote_ops.to_shortname = "remote"; @@ -9736,6 +9748,7 @@ Specify the serial device it is connected to\n\ remote_ops.to_upload_trace_state_variables = remote_upload_trace_state_variables; remote_ops.to_get_raw_trace_data = remote_get_raw_trace_data; remote_ops.to_set_disconnected_tracing = remote_set_disconnected_tracing; + remote_ops.to_set_circular_trace_buffer = remote_set_circular_trace_buffer; remote_ops.to_core_of_thread = remote_core_of_thread; } |