From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdbserver: Introduce write_error_msg
Date: Wed, 23 Nov 2016 20:40:00 -0000 [thread overview]
Message-ID: <1479933767.1447.27.camel@skynet.be> (raw)
In-Reply-To: <1479915352-23983-1-git-send-email-palves@redhat.com>
On Wed, 2016-11-23 at 15:35 +0000, Pedro Alves wrote:
> Instead of writing an error message to (gdbserver's) stderr and then
> returning back "E01" to GDB, send the error message to GDB directly
> using the E.MSG format, so the user can potentially see it. Several
> places in the code already do this manually. This patch adds a new
> function (write_error_msg) that abstracts out the "E." prefix detail.
The protocol description/doc does not (very) clearly describe E. prefix.
In the doc, I found the E. is used only at a few places:
vFlashWrite and a few packets used for branch tracing,
while the gdbserver code uses it at more places.
I think that gdb will accept such an error reply
as a reply to any? many? packet that can cause an error
(at least I have used E. here and there in Valgrind gdbserver
and it is always accepted by gdb).
The E (error packet) is not formally described.
In the protocol Overview, there is:
" The error response returned for some packets includes a two
character error number. That number is not well defined."
But the E packet itself seems not well defined :).
This patch is maybe the occasion to clarify/document
explicitely what gdbserver stubs are allowed to send as an
error response, and then change the doc to just indicate
what packets can send an E error message, rather than
document that 'E NN' is only to be expected for many
packets.
Thanks
Philippe
prev parent reply other threads:[~2016-11-23 20:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-23 15:36 Pedro Alves
2016-11-23 16:06 ` Metzger, Markus T
2016-11-23 16:23 ` Luis Machado
2016-11-23 20:40 ` Philippe Waroquiers [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=1479933767.1447.27.camel@skynet.be \
--to=philippe.waroquiers@skynet.be \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.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