This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug mi/15806] Some fields in async MI events get escaped twice


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]