From: Bob Rossi <bob@brasko.net>
To: gdb@sourceware.org
Subject: GDB/MI output command documentation error
Date: Fri, 23 May 2014 01:26:00 -0000 [thread overview]
Message-ID: <20140523012631.GB10166@linux> (raw)
Hi,
The documentation for a GDB/MI output command says,
output ==>
( out-of-band-record )* [ result-record ] "(gdb)" nl
Where an out-of-band-record is one or more lines starting with
* + = (for async records)
~ @ & (for stream records)
A result record starts with a ^ (if no token is used).
The result record is after the possible out-of-band-records.
This Documentation is incorrect for the most basic GDB/MI command.
When I provide the GDB/MI command, -exec-run I get the following output.
=library-unloaded,...
=library-unloaded,...
=thread-group-started,...
=thread-created,...
^running <- Incorrect location or docs are wrong
*running,...
(gdb)
In mi-interp.c:mi_on_resume the code says:
/* To cater for older frontends, emit ^running, but do it only once
per each command. We do it here, since at this point we know
that the target was successfully resumed, and in non-async mode,
we won't return back to MI interpreter code until the target
is done running, so delaying the output of "^running" until then
will make it impossible for frontend to know what's going on.
In future (MI3), we'll be outputting "^done" here. */
if (!running_result_record_printed && mi_proceeded)
{
fprintf_unfiltered (raw_stdout, "%s^running\n",
current_token ? current_token : "");
}
So, I assume we aren't going to change what GDB outputs at this point.
For that reason, I would argue the documentation is wrong.
The correct grammar would be something like,
output ==>
( out-of-band-record )* [ result-record ] ( out-of-band-record )* "(gdb)" nl
Right?
Thanks,
Bob Rossi
next reply other threads:[~2014-05-23 1:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-23 1:26 Bob Rossi [this message]
2014-05-25 7:15 ` Vladimir Prus
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=20140523012631.GB10166@linux \
--to=bob@brasko.net \
--cc=gdb@sourceware.org \
/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