This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
gdbserver, report trace buffer circularity with tstatus
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 9 Apr 2010 15:43:18 +0100
- Subject: gdbserver, report trace buffer circularity with tstatus
Now that gdb can report the real current target circularity
with `tstatus', provided the target feeds the data, I've made
gdbserver report it.
Applied.
--
Pedro Alves
2010-04-09 Pedro Alves <pedro@codesourcery.com>
gdb/gdbserver/
* tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
---
gdb/gdbserver/tracepoint.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
Index: src/gdb/gdbserver/tracepoint.c
===================================================================
--- src.orig/gdb/gdbserver/tracepoint.c 2010-04-09 04:23:27.000000000 +0100
+++ src/gdb/gdbserver/tracepoint.c 2010-04-09 15:30:42.000000000 +0100
@@ -1853,12 +1853,13 @@ cmd_qtstatus (char *packet)
convert_int_to_ascii ((gdb_byte *) result_name, p, strlen (result_name));
}
- sprintf (packet, "T%c;%s:%x;tframes:%x;tcreated:%x;tfree:%x;tsize:%s",
- (tracing ? '1' : '0'),
+ sprintf (packet, "T%d;%s:%x;tframes:%x;tcreated:%x;tfree:%x;tsize:%s;circular:%d",
+ tracing ? 1 : 0,
stop_reason_rsp, tracing_stop_tpnum,
traceframe_count, traceframes_created,
free_space (),
- phex_nz (trace_buffer_hi - trace_buffer_lo, 0));
+ phex_nz (trace_buffer_hi - trace_buffer_lo, 0),
+ circular_trace_buffer);
}
/* State variables to help return all the tracepoint bits. */