From: Tom Tromey <tromey@redhat.com>
To: Simon Marchi <simon.marchi@ericsson.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] PR mi/15806: Fix quoting of async events
Date: Fri, 16 May 2014 15:42:00 -0000 [thread overview]
Message-ID: <878uq17mrq.fsf@fleche.redhat.com> (raw)
In-Reply-To: <1398568091-21253-1-git-send-email-simon.marchi@ericsson.com> (Simon Marchi's message of "Sat, 26 Apr 2014 23:08:11 -0400")
>>>>> "Simon" == Simon Marchi <simon.marchi@ericsson.com> writes:
Simon> The quoting in whatever goes in the event_channel of MI is little
Simon> bit broken. Link for the lazy:
Simon> https://sourceware.org/bugzilla/show_bug.cgi?id=15806
Thanks for looking at this.
A long time ago I wrote a somewhat similar patch, but I don't think I
noticed some of the issues you dug up. Mine was here, I don't recall
why it didn't go in:
https://www.sourceware.org/ml/gdb-patches/2011-01/msg00518.html
Simon> In retrospect, there is no way escaping can be done reliably in
Simon> mi_console_raw_packet for data that is already formatted, such as
Simon> event_channel. At this point, there is no way to differentiate
Simon> quotes that delimit field values from those that should be
Simon> escaped. In the case of other MI consoles, it is ok since
Simon> mi_console_raw_packet receives one big string that should be
Simon> quoted and escaped as a whole.
Simon> So, first part of the fix: for the MI channels that specify no
Simon> quoting character, no escaping at all should be done in
Simon> mi_console_raw_packet (that's the change in printchar, thanks to
Simon> Yuanhui Zhang for this).
Seems reasonable.
Did you check the other callers of printchar, even indirect ones?
I did a spot check and didn't see any issues, but it would be reassuring
if you could look.
Simon> 2014-04-26 Simon Marchi <simon.marchi@ericsson.com>
Simon> PR mi/15806
Simon> * utils.c (printchar): Don't escape at all if quoter is NUL.
Simon> * mi/mi-interp.c (mi_solib_loaded): Use ui_out_field_* functions to
Simon> generate the output.
Simon> (mi_solib_unloaded): Same.
Simon> 2014-04-26 Simon Marchi <simon.marchi@ericsson.com>
Simon> * gdb.mi/mi-breakpoint-changed.exp (test_insert_delete_modify): Fix
Simon> erroneous dprintf expected input.
This is ok. Before putting it in could you, if needed, look into the
printchar thing and then reply? Thank you.
Tom
next prev parent reply other threads:[~2014-05-16 15:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-27 3:08 Simon Marchi
2014-04-28 18:36 ` Marc Khouzam
2014-05-12 17:56 ` Simon Marchi
2014-05-16 15:42 ` Tom Tromey [this message]
2014-05-16 17:58 ` Simon Marchi
2014-05-16 18:24 ` Tom Tromey
2014-05-16 19:57 ` Simon Marchi
2014-05-16 20:17 ` Tom Tromey
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=878uq17mrq.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@ericsson.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).