From: Pedro Alves <pedro@codesourcery.com>
To: Vladimir Prus <vladimir@codesourcery.com>
Cc: gdb-patches@sourceware.org, Stan Shebs <stan@codesourcery.com>
Subject: Re: [MI tracepoints 4/9] -trace-start/end/status
Date: Tue, 16 Mar 2010 13:58:00 -0000 [thread overview]
Message-ID: <201003161358.48076.pedro@codesourcery.com> (raw)
In-Reply-To: <201003161512.33593.vladimir@codesourcery.com>
On Tuesday 16 March 2010 12:12:33, Vladimir Prus wrote:
> On Monday 15 March 2010 21:46:05 Pedro Alves wrote:
>
> > Double space after period everywhere please.
> >
> > + ui_out_field_int (uiout, "buffer-size", (int) ts->buffer_size);
> > + ui_out_field_int (uiout, "buffer-free", (int) ts->buffer_free);
> >
> > When these optional fields aren't reported by the target, this
> > will print -1. I don't see that mentioned in the manual. Is
> > this intended? I would have expected optional fields to just
> > not be present, as is common in MI. trace_status_command does
> > that too.
>
> I did not realize they are optional.
All status fields are optional, except for "running", "not running".
The original packet was just:
@item qTStatus
Ask the stub if there is a trace experiment running right now.
Replies:
@table @samp
@item T0
There is no trace experiment running.
@item T1
There is a trace experiment running.
@end table
We then added the support for passing a `:' list of
extra fields to that packet. See tracepoint.c:parse_trace_status.
> Attached is the revised patch,
> + gdb_assert (ts->stop_reason != trace_stop_reason_unknown);
Therefore, this assertion is too strong. It should be a plain
if (ts->stop_reason != trace_stop_reason_unknown)
{
> +
> + switch (ts->stop_reason)
> + {
> + case tstop_command:
> + stop_reason = "request";
> + break;
> + case trace_buffer_full:
> + stop_reason = "overflow";
> + break;
> + case trace_disconnected:
> + stop_reason = "disconnection";
> + break;
> + case tracepoint_passcount:
> + stop_reason = "passcount";
> + stopping_tracepoint = ts->stopping_tracepoint;
> + break;
> + }
> +
> + if (stop_reason)
> + {
> + ui_out_field_string (uiout, "stop-reason", stop_reason);
> + if (stopping_tracepoint != -1)
> + ui_out_field_int (uiout, "stopping-tracepoint",
> + stopping_tracepoint);
> + }
> + }
> +
And this one should be conditionalized as well:
> + ui_out_field_int (uiout, "frames", ts->traceframe_count);
And I think the manual patch should be updated to mention
any of these fields might be missing.
--
Pedro Alves
prev parent reply other threads:[~2010-03-16 13:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-14 8:54 Vladimir Prus
2010-03-15 18:46 ` Pedro Alves
2010-03-15 18:47 ` Pedro Alves
2010-03-15 18:58 ` Stan Shebs
2010-03-16 12:12 ` Vladimir Prus
2010-03-16 13:58 ` Pedro Alves [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201003161358.48076.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=stan@codesourcery.com \
--cc=vladimir@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox