[Bug 1866604] [NEW] gdbtui source window does't display Unicode text
Лъчезар Георгиев
1866604 at bugs.launchpad.net
Mon Mar 9 08:32:35 UTC 2020
Public bug reported:
In Ubuntu 20.04, I discovered that the gdb 9 TUI source code window
doesn't display properly the UTF-8 characters (Chinese, Cyrillic, etc.)
but displays correctly only the ASCII ones. For example, the following
source code
printf("Здравей, свят!\n");
appears in the source code window as
printf("^^P^ ^P^ ^Q^┗↑@^^P^ ^P^ ^P^ ^P^ ^^Q^┗↑╝^^P^ ^Q^ ^Q^ \n");
The command windows is not affected (when I type non-ASCII characters
into it, they appear OK).
Additionally, I found out the following:
(1) This bug was introduced in version 8.3;
(2) It affects only some CPU architectures.
In more detail, I tested version "Debian 8.3.1-1" on two 64-bit machines
with the same version of Debian (bullseye/sid), one with PowerPC, and
the other with SPARC. The bug shows up only on the SPARC machine, not
the PowerPC one. I then built the generic version 8.3.1 on a 64-bit ARM
machine. The bug didn't show up there. And then, I built it on a 64-bit
MIPS (big endian) machine, where the bug did show up. Repeated this with
version 8.3. The bug showed up again. When I built the generic version
8.2.1 on the same MIPS machine, the bug didn't show up. A "diff -u
gdb-8.2.1/gdb/tui gdb-8.3/gdb/tui" shows a lot of changes made in the
TUI code of version 8.3 to add some colourisation to the TUI, and the
bug was probably introduced during this process. Sorry that I can't help
more to isolate the bug. But it's quite strange that it manifests itself
only on x86-64 (as I had found out previously using Ubuntu 20-04), SPARC
and MIPS, but not on ARM and PowerPC. I suppose that because of this, it
will be rather hard to pinpoint.
This bug is similar to the already fixed bug 1275210 where I also
described it but then realised that it has a different origin and is
therefore a different bug, so I report it as a new one now. Someone
already reported this bug as bug 25296 in the gdb Bugzilla which I
confirmed there.
** Affects: gdb (Ubuntu)
Importance: Undecided
Status: New
** Tags: gdb gdbtui utf-8
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gdb in Ubuntu.
https://bugs.launchpad.net/bugs/1866604
Title:
gdbtui source window does't display Unicode text
Status in gdb package in Ubuntu:
New
Bug description:
In Ubuntu 20.04, I discovered that the gdb 9 TUI source code window
doesn't display properly the UTF-8 characters (Chinese, Cyrillic,
etc.) but displays correctly only the ASCII ones. For example, the
following source code
printf("Здравей, свят!\n");
appears in the source code window as
printf("^^P^ ^P^ ^Q^┗↑@^^P^ ^P^ ^P^ ^P^ ^^Q^┗↑╝^^P^ ^Q^ ^Q^ \n");
The command windows is not affected (when I type non-ASCII characters
into it, they appear OK).
Additionally, I found out the following:
(1) This bug was introduced in version 8.3;
(2) It affects only some CPU architectures.
In more detail, I tested version "Debian 8.3.1-1" on two 64-bit
machines with the same version of Debian (bullseye/sid), one with
PowerPC, and the other with SPARC. The bug shows up only on the SPARC
machine, not the PowerPC one. I then built the generic version 8.3.1
on a 64-bit ARM machine. The bug didn't show up there. And then, I
built it on a 64-bit MIPS (big endian) machine, where the bug did show
up. Repeated this with version 8.3. The bug showed up again. When I
built the generic version 8.2.1 on the same MIPS machine, the bug
didn't show up. A "diff -u gdb-8.2.1/gdb/tui gdb-8.3/gdb/tui" shows a
lot of changes made in the TUI code of version 8.3 to add some
colourisation to the TUI, and the bug was probably introduced during
this process. Sorry that I can't help more to isolate the bug. But
it's quite strange that it manifests itself only on x86-64 (as I had
found out previously using Ubuntu 20-04), SPARC and MIPS, but not on
ARM and PowerPC. I suppose that because of this, it will be rather
hard to pinpoint.
This bug is similar to the already fixed bug 1275210 where I also
described it but then realised that it has a different origin and is
therefore a different bug, so I report it as a new one now. Someone
already reported this bug as bug 25296 in the gdb Bugzilla which I
confirmed there.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1866604/+subscriptions
More information about the foundations-bugs
mailing list