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:35:16 +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 #11 from asmwarrior <asmwarrior at gmail dot com> ---
@Simon, I think the patch in comment 10 is a good fix. Look at the issue
statement in my comment 4, I think the code below
static void
mi_solib_loaded (struct so_list *solib)
{
struct mi_interp *mi = top_level_interpreter_data ();
target_terminal_ours ();
if (gdbarch_has_global_solist (target_gdbarch ()))
fprintf_unfiltered (mi->event_channel,
"library-loaded,id=\"%s\",target-name=\"%s\","
"host-name=\"%s\",symbols-loaded=\"%d\"",
solib->so_original_name, solib->so_original_name,
solib->so_name, solib->symbols_loaded);
else
fprintf_unfiltered (mi->event_channel,
"library-loaded,id=\"%s\",target-name=\"%s\","
"host-name=\"%s\",symbols-loaded=\"%d\","
"thread-group=\"i%d\"",
solib->so_original_name, solib->so_original_name,
solib->so_name, solib->symbols_loaded,
current_inferior ()->num);
gdb_flush (mi->event_channel);
}
should fix itself, not the gdb_flush (mi->event_channel). I mean, since
mi->event_channel is created with quoter = 0, which means when user put some
text in the mi->event_channel, they should do their escape handling themselves.
Once gdb_flush (mi->event_channel) is called, it should not add more
backslashes(escape handling).
What do you think?
--
You are receiving this mail because:
You are on the CC list for the bug.