diff options
author | Hafiz Abid Qadeer <abidh@codesourcery.com> | 2013-03-08 15:06:39 +0000 |
---|---|---|
committer | Hafiz Abid Qadeer <abidh@codesourcery.com> | 2013-03-08 15:06:39 +0000 |
commit | f6f899bfc53faa15406ba58f491760ad07563c47 (patch) | |
tree | 87a405d8290d1bb8308653168ac151be81aedf7c /gdb/target.h | |
parent | 7da3ab792088f01bb2d2453e08ef7d5a4458982b (diff) | |
download | gdb-f6f899bfc53faa15406ba58f491760ad07563c47.zip gdb-f6f899bfc53faa15406ba58f491760ad07563c47.tar.gz gdb-f6f899bfc53faa15406ba58f491760ad07563c47.tar.bz2 |
2012-03-08 Stan Shebs <stan@codesourcery.com>
Hafiz Abid Qadeer <abidh@codesourcery.com>
gdb/
* NEWS: Mention set and show trace-buffer-size commands.
Mention new packet.
* target.h (struct target_ops): New method
to_set_trace_buffer_size.
(target_set_trace_buffer_size): New macro.
* target.c (update_current_target): Set up new method.
* tracepoint.c (trace_buffer_size): New global.
(start_tracing): Send it to the target.
(set_trace_buffer_size): New function.
(_initialize_tracepoint): Add new setshow for trace-buffer-size.
* remote.c (remote_set_trace_buffer_size): New function.
(_initialize_remote): Use it.
(QTBuffer:size) New remote command.
(PACKET_QTBuffer_size): New enum.
(remote_protocol_features): Add an entry for
PACKET_QTBuffer_size.
gdb/gdbserver/
* tracepoint.c (trace_buffer_size): New global.
(DEFAULT_TRACE_BUFFER_SIZE): New define.
(init_trace_buffer): Change to one-argument function. Allocate
trace buffer memory.
(handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
handle QTBuffer:size packet.
(cmd_bigqtbuffer_size): New function.
(initialize_tracepoint): Call init_trace_buffer with
DEFAULT_TRACE_BUFFER_SIZE.
* server.c (handle_query): Add QTBuffer:size in the
supported packets.
gdb/doc/
* gdb.texinfo (Starting and Stopping Trace Experiments): Document
trace-buffer-size set and show commands.
(Tracepoint Packets): Document QTBuffer:size.
(General Query Packets): Document QTBuffer:size.
gdb/testsuite/
* gdb.trace/trace-buffer-size.exp: New file.
* gdb.trace/trace-buffer-size.c: New file.
Diffstat (limited to 'gdb/target.h')
-rw-r--r-- | gdb/target.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/target.h b/gdb/target.h index 1971265..c99642d 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -806,6 +806,8 @@ struct target_ops disconnection - set VAL to 1 to keep tracing, 0 to stop. */ void (*to_set_disconnected_tracing) (int val); void (*to_set_circular_trace_buffer) (int val); + /* Set the size of trace buffer in the target. */ + void (*to_set_trace_buffer_size) (LONGEST val); /* Add/change textual notes about the trace run, returning 1 if successful, 0 otherwise. */ @@ -1700,6 +1702,9 @@ extern char *target_fileio_read_stralloc (const char *filename); #define target_set_circular_trace_buffer(val) \ (*current_target.to_set_circular_trace_buffer) (val) +#define target_set_trace_buffer_size(val) \ + (*current_target.to_set_trace_buffer_size) (val) + #define target_set_trace_notes(user,notes,stopnotes) \ (*current_target.to_set_trace_notes) ((user), (notes), (stopnotes)) |