UTF-8 not working for MI?

Tom Tromey tromey@redhat.com
Fri Aug 20 18:51:00 GMT 2010

>>>>> "Marc" == Marc Khouzam <marc.khouzam@ericsson.com> writes:

Marc> Or maybe using "interpreter-exec mi" does not quite give the true
Marc> MI interpreter?

I dug harder and found this:

static void
mi_command_loop (int mi_version)
  /* Turn off 8 bit strings in quoted output.  Any character with the
     high bit set is printed using C's octal format. */
  sevenbit_strings = 1;

So, you can reproduce this situation from the CLI by "set print
sevenbit-strings on" before invoking the MI command.

It is an oddity that currently an MI consumer must check gdb's host
charset in order to know how to decode its output.  I would recommend
that the client force it to be UTF-8, but I think this currently may not
work with PHONY_ICONV.


More information about the Gdb mailing list