2012-03-08 Stan Shebs <stan@codesourcery.com>
authorHafiz Abid Qadeer <abidh@codesourcery.com>
Fri, 8 Mar 2013 15:06:39 +0000 (15:06 +0000)
committerHafiz Abid Qadeer <abidh@codesourcery.com>
Fri, 8 Mar 2013 15:06:39 +0000 (15:06 +0000)
commitf6f899bfc53faa15406ba58f491760ad07563c47
tree87a405d8290d1bb8308653168ac151be81aedf7c
parent7da3ab792088f01bb2d2453e08ef7d5a4458982b
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.
14 files changed:
gdb/ChangeLog
gdb/NEWS
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/gdbserver/ChangeLog
gdb/gdbserver/server.c
gdb/gdbserver/tracepoint.c
gdb/remote.c
gdb/target.c
gdb/target.h
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.trace/trace-buffer-size.c [new file with mode: 0644]
gdb/testsuite/gdb.trace/trace-buffer-size.exp [new file with mode: 0644]
gdb/tracepoint.c