This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug mi/15806] Some fields in async MI events get escaped twice
- From: "asmwarrior at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 25 Apr 2014 03:10:02 +0000
- Subject: [Bug mi/15806] Some fields in async MI events get escaped twice
- Auto-submitted: auto-generated
- References: <bug-15806-4717 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=15806
--- Comment #10 from asmwarrior <asmwarrior at gmail dot com> ---
(In reply to asmwarrior from comment #9)
>
> 5, So, we can change the if condition here is like:
> if (c == '\\' || (c == quoter && quoter != 0))
> do_fputs ("\\", stream);
>
Oh, there is a mistake in the above. The correct patch is:
gdb/utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/utils.c b/gdb/utils.c
index a8a7cb3..31bdb7e 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1539,7 +1539,7 @@ printchar (int c, void (*do_fputs) (const char *, struct
ui_file *),
}
else
{
- if (c == '\\' || c == quoter)
+ if ( (c == '\\' && quoter != 0) || c == quoter)
do_fputs ("\\", stream);
do_fprintf (stream, "%c", c);
}
But the result is still bad, which lead to some unexpected issue in my comment
4.
--
You are receiving this mail because:
You are on the CC list for the bug.