0

I used MinGW's gdb-python27.exe.

Chinese characters are not displayed correctly, when using string.

Such as string s1="a的";

Finally, it is shown as a, and the input GDB command is also shown as a in Eclipse CDT:

ks1322
  • 33,961
  • 14
  • 109
  • 164
陈林熙
  • 21
  • 1
  • 4
  • Unfortunately I can't reproduce the problem you are seeing (see https://i.stack.imgur.com/WnvE8.png) My guess is that the problem is python2.7 which does not handle unicode string as well as python3. My GDB is using python3. Do you have a Python 3 version of GDB available? – Jonah Graham Aug 14 '17 at 08:47
  • I tried this out with python2.7 enabled GDB and it worked fine, so that wasn't it. Can you provide the MI trace and/or run this in GDB directly to see if it works. I am trying to understand where in the stack it is going wrong. https://wiki.eclipse.org/CDT/User/NewIn92#Hide_gdb_traces_by_default – Jonah Graham Aug 14 '17 at 12:10
  • Did you test in Linux? I asked someone to help test the situation under Linux. There was no problem with Linux. I've tested it with the command line of MI trace, and the result is the same. I now suspect that the MinGW's gdb-python27.exe problem. gdb-python27 supports only python2, and does not support python3. – 陈林熙 Aug 15 '17 at 02:12
  • Oh, I was so foolish. In windows, the direct use of gdb.exe can work. I see the old tutorial, it says to use the MingW `gdb-python27.exe` to support Pretty-Printer, and now gdb.exe integrated integrated Python extension, and this is no problem. – 陈林熙 Aug 15 '17 at 02:37

0 Answers0