Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Fix for bug 307311

Dear members of the Eclipse CDT mailing list,

I've already posted to this mailing list some weeks ago, but didn't
receive any reply so far - so I'm trying again now: I've fixed bug
307311 and attached a corresponding patch. Please see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=307311

The fix brings UTF-8 Unicode support to the Eclipse CDT debugging views.

The patch works well for me, but a short review might cover the
following things:

1) Changes have been made to the MIConst.java file contained within
the package org.eclipse.cdt.dsf.mi.service.command.output, but what
about the package org.eclipse.cdt.debug.mi.core.output? Does it have
to be changed, too?

2) MIVarEvaluateExpressionInfo and MIDataEvaluateExpressionInfo should
probably call MIConst.getString instead of MIConst.getCString in order
to support UTF-8 for evaluated expressions too, if this has no other
side effects (I didn't notice any, at least).

3) This patch is related to the following gdb options:
--> gdb's "host-charset" must be set to "UTF-8" (if it's not, the
patch possibly can't recognize all UTF-8 strings correctly). As far as
I know, this is gdb's default setting on Linux (and Mac?), but not on
Windows. CDT users on Windows can set this via the .gdbinit file, but
a separate Eclipse preference option would probably be handier.
--> gdb's "print sevenbit-strings" must be set to "on" (again, if it's
not, the patch possibly can't recognize all UTF-8 strings correctly).
This is the default setting for the gdb/mi interface on all platforms
as far as I know.

I'd be happy about any feedback / comments. Thank you very much for
your valued time and work.

Best regards,
Mathias Kunter


Back to the top