* Report the new trace status fields in MI as well
@ 2010-04-09 15:02 Pedro Alves
2010-04-09 15:05 ` Pedro Alves
2010-04-09 15:13 ` Eli Zaretskii
0 siblings, 2 replies; 4+ messages in thread
From: Pedro Alves @ 2010-04-09 15:02 UTC (permalink / raw)
To: gdb-patches
I noticed that the new trace status fields aren't visible with MI yet.
This fixes it.
The (int) casts are no longer necessary, the fields are `int' to
begin with.
The field descriptions are borrowed from the corresponding RSP
qtStatus packet descriptions.
--
Pedro Alves
2010-04-09 Pedro Alves <pedro@codesourcery.com>
gdb/
* tracepoint.c (trace_status_mi): Report disconnected tracing and
circular trace buffer statuses.
gdb/doc/
* gdb.texinfo (gdb/mi Tracepoint Commands) <-trace-status>:
Describe the `circular' and `disconnected' fields.
---
gdb/doc/gdb.texinfo | 13 ++++++++++++-
gdb/tracepoint.c | 14 ++++++++------
2 files changed, 20 insertions(+), 7 deletions(-)
Index: src/gdb/tracepoint.c
===================================================================
--- src.orig/gdb/tracepoint.c 2010-04-09 15:46:22.000000000 +0100
+++ src/gdb/tracepoint.c 2010-04-09 15:48:53.000000000 +0100
@@ -1796,13 +1796,15 @@ trace_status_mi (int on_stop)
}
}
-
- if ((int) ts->traceframe_count != -1)
+ if (ts->traceframe_count != -1)
ui_out_field_int (uiout, "frames", ts->traceframe_count);
- if ((int) ts->buffer_size != -1)
- ui_out_field_int (uiout, "buffer-size", (int) ts->buffer_size);
- if ((int) ts->buffer_free != -1)
- ui_out_field_int (uiout, "buffer-free", (int) ts->buffer_free);
+ if (ts->buffer_size != -1)
+ ui_out_field_int (uiout, "buffer-size", ts->buffer_size);
+ if (ts->buffer_free != -1)
+ ui_out_field_int (uiout, "buffer-free", ts->buffer_free);
+
+ ui_out_field_int (uiout, "disconnected-tracing", ts->disconnected_tracing);
+ ui_out_field_int (uiout, "circular", ts->circular_buffer);
}
/* This function handles the details of what to do about an ongoing
Index: src/gdb/doc/gdb.texinfo
===================================================================
--- src.orig/gdb/doc/gdb.texinfo 2010-04-09 15:49:08.000000000 +0100
+++ src/gdb/doc/gdb.texinfo 2010-04-09 15:55:59.000000000 +0100
@@ -26387,7 +26387,7 @@ The corresponding @value{GDBN} command i
-trace-status
@end smallexample
-Obtains the status of a tracing experiement. The result may include
+Obtains the status of a tracing experiment. The result may include
the following fields:
@table @samp
@@ -26429,6 +26429,17 @@ field is optional.
These fields tell the current size of the tracing buffer and the
remaining space. These field is optional.
+@item circular
+This field indicates the value of the circular trace buffer flag.
+@code{1} means that the trace buffer is circular and old trace frames
+will be discarded if necessary to make room, @code{0} means that the
+trace buffer is linear and may fill up.
+
+@item disconnected
+The value of the disconnected tracing flag. @code{1} means that
+tracing will continue after @value{GDBN} disconnects, @code{0} means
+that the trace run will stop.
+
@end table
@subsubheading @value{GDBN} Command
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Report the new trace status fields in MI as well
2010-04-09 15:02 Report the new trace status fields in MI as well Pedro Alves
@ 2010-04-09 15:05 ` Pedro Alves
2010-04-09 15:13 ` Eli Zaretskii
1 sibling, 0 replies; 4+ messages in thread
From: Pedro Alves @ 2010-04-09 15:05 UTC (permalink / raw)
To: gdb-patches
On Friday 09 April 2010 16:02:18, Pedro Alves wrote:
> I noticed that the new trace status fields aren't visible with MI yet.
> This fixes it.
>
> The (int) casts are no longer necessary, the fields are `int' to
> begin with.
>
> The field descriptions are borrowed from the corresponding RSP
> qtStatus packet descriptions.
Sorry, forgot to "quilt refresh"; the patch didn't match the
documentation. Here's the correct patch.
--
Pedro Alves
2010-04-09 Pedro Alves <pedro@codesourcery.com>
gdb/
* tracepoint.c (trace_status_mi): Report disconnected tracing and
circular trace buffer statuses.
gdb/doc/
* gdb.texinfo (gdb/mi Tracepoint Commands) <-trace-status>:
Describe the `circular' and `disconnected' fields.
---
gdb/doc/gdb.texinfo | 13 ++++++++++++-
gdb/tracepoint.c | 14 ++++++++------
2 files changed, 20 insertions(+), 7 deletions(-)
Index: src/gdb/tracepoint.c
===================================================================
--- src.orig/gdb/tracepoint.c 2010-04-09 15:46:22.000000000 +0100
+++ src/gdb/tracepoint.c 2010-04-09 16:03:18.000000000 +0100
@@ -1796,13 +1796,15 @@ trace_status_mi (int on_stop)
}
}
-
- if ((int) ts->traceframe_count != -1)
+ if (ts->traceframe_count != -1)
ui_out_field_int (uiout, "frames", ts->traceframe_count);
- if ((int) ts->buffer_size != -1)
- ui_out_field_int (uiout, "buffer-size", (int) ts->buffer_size);
- if ((int) ts->buffer_free != -1)
- ui_out_field_int (uiout, "buffer-free", (int) ts->buffer_free);
+ if (ts->buffer_size != -1)
+ ui_out_field_int (uiout, "buffer-size", ts->buffer_size);
+ if (ts->buffer_free != -1)
+ ui_out_field_int (uiout, "buffer-free", ts->buffer_free);
+
+ ui_out_field_int (uiout, "disconnected", ts->disconnected_tracing);
+ ui_out_field_int (uiout, "circular", ts->circular_buffer);
}
/* This function handles the details of what to do about an ongoing
Index: src/gdb/doc/gdb.texinfo
===================================================================
--- src.orig/gdb/doc/gdb.texinfo 2010-04-09 15:49:08.000000000 +0100
+++ src/gdb/doc/gdb.texinfo 2010-04-09 15:55:59.000000000 +0100
@@ -26387,7 +26387,7 @@ The corresponding @value{GDBN} command i
-trace-status
@end smallexample
-Obtains the status of a tracing experiement. The result may include
+Obtains the status of a tracing experiment. The result may include
the following fields:
@table @samp
@@ -26429,6 +26429,17 @@ field is optional.
These fields tell the current size of the tracing buffer and the
remaining space. These field is optional.
+@item circular
+This field indicates the value of the circular trace buffer flag.
+@code{1} means that the trace buffer is circular and old trace frames
+will be discarded if necessary to make room, @code{0} means that the
+trace buffer is linear and may fill up.
+
+@item disconnected
+The value of the disconnected tracing flag. @code{1} means that
+tracing will continue after @value{GDBN} disconnects, @code{0} means
+that the trace run will stop.
+
@end table
@subsubheading @value{GDBN} Command
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Report the new trace status fields in MI as well
2010-04-09 15:02 Report the new trace status fields in MI as well Pedro Alves
2010-04-09 15:05 ` Pedro Alves
@ 2010-04-09 15:13 ` Eli Zaretskii
2010-04-09 15:23 ` Pedro Alves
1 sibling, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2010-04-09 15:13 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches
> From: Pedro Alves <pedro@codesourcery.com>
> Date: Fri, 9 Apr 2010 16:02:18 +0100
>
> gdb/doc/
> * gdb.texinfo (gdb/mi Tracepoint Commands) <-trace-status>:
> Describe the `circular' and `disconnected' fields.
One comment to this part:
> +@item circular
> +This field indicates the value of the circular trace buffer flag.
I suggest to rephrase to be similar to what you have under
`disconnected':
The value of the circular trace buffer flag.
This is much simpler and more clear. "Indicates the value of" makes
me wonder what exactly does it mean ;-)
Okay with that change.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Report the new trace status fields in MI as well
2010-04-09 15:13 ` Eli Zaretskii
@ 2010-04-09 15:23 ` Pedro Alves
0 siblings, 0 replies; 4+ messages in thread
From: Pedro Alves @ 2010-04-09 15:23 UTC (permalink / raw)
To: gdb-patches, Eli Zaretskii
On Friday 09 April 2010 16:13:38, Eli Zaretskii wrote:
> I suggest to rephrase to be similar to what you have under
> `disconnected':
>
> The value of the circular trace buffer flag.
>
> This is much simpler and more clear. "Indicates the value of" makes
> me wonder what exactly does it mean ;-)
You know I like simpler and clearer. :-)
> Okay with that change.
Committed with that change. Thanks.
--
Pedro Alves
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-04-09 15:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-09 15:02 Report the new trace status fields in MI as well Pedro Alves
2010-04-09 15:05 ` Pedro Alves
2010-04-09 15:13 ` Eli Zaretskii
2010-04-09 15:23 ` Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox