Discussion:
[Bug gdb/22973] New: The print command doesn't support identifiers named with non-ASCII characters.
zjz at zjz dot name
2018-03-16 13:13:38 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=22973

Bug ID: 22973
Summary: The print command doesn't support identifiers named
with non-ASCII characters.
Product: gdb
Version: 7.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: zjz at zjz dot name
Target Milestone: ---

It's well known for a long time that GCC C compiler doesn't implement support
for non-ASCII Unicode identifiers, which is a pity for those non-English
programmers who would like to write code in their native languages, the reason
behind this may be a required daunting and time-consuming effort, which is
understandable.

But I guess it might be easier to implement the support for non-ASCII Unicode
identifiers in the print command in GDB first.

Please consider adding support for non-ASCII Unicode identifiers.

Thanks!
--
You are receiving this mail because:
You are on the CC list for the bug.
zjz at zjz dot name
2018-03-29 09:09:02 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=22973

--- Comment #1 from Zhang Junzhi <zjz at zjz dot name> ---
Ping...

I think this bug is not hard to be confirmed.

Would someone confirm this bug?

Thanks
--
You are receiving this mail because:
You are on the CC list for the bug.
palves at redhat dot com
2018-03-29 14:35:11 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=22973

Pedro Alves <palves at redhat dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-03-29
CC| |palves at redhat dot com
Ever confirmed|0 |1

--- Comment #2 from Pedro Alves <palves at redhat dot com> ---
Confirmed. (Doesn't mean anyone is working on it, TBC.)
--
You are receiving this mail because:
You are on the CC list for the bug.
cvs-commit at gcc dot gnu.org
2018-05-22 16:37:42 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=22973

--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Pedro Alves <***@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b1b60145aedb8adcb0b9dcf43a5ae735c2f03b51

commit b1b60145aedb8adcb0b9dcf43a5ae735c2f03b51
Author: Pedro Alves <***@redhat.com>
Date: Tue May 22 17:35:38 2018 +0100

Support UTF-8 identifiers in C/C++ expressions (PR gdb/22973)

Factor out cp_ident_is_alpha/cp_ident_is_alnum out of
gdb/cp-name-parser.y and use it in the C/C++ expression parser too.

New test included.

gdb/ChangeLog:
2018-05-22 Pedro Alves <***@redhat.com>
張俊芝 <***@zjz.name>

PR gdb/22973
* c-exp.y: Include "c-support.h".
(parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
of tolower. Use c_ident_is_alpha to scan names.
* c-lang.c: Include "c-support.h".
(convert_ucn, convert_octal, convert_hex, convert_escape): Use
ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
* c-support.h: New file, with bits factored out from ...
* cp-name-parser.y: ... this file.
Include "c-support.h".
(cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
c-support.h and renamed.
(symbol_end, yylex): Adjust.

gdb/testsuite/ChangeLog:
2018-05-22 Pedro Alves <***@redhat.com>

PR gdb/22973
* gdb.base/utf8-identifiers.c: New file.
* gdb.base/utf8-identifiers.exp: New file.
--
You are receiving this mail because:
You are on the CC list for the bug.
palves at redhat dot com
2018-05-22 16:44:54 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=22973

Pedro Alves <palves at redhat dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |8.2

--- Comment #4 from Pedro Alves <palves at redhat dot com> ---
Fix pushed.
--
You are receiving this mail because:
You are on the CC list for the bug.
brobecker at gnat dot com
2018-05-30 22:59:03 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=22973

Joel Brobecker <brobecker at gnat dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |brobecker at gnat dot com

--- Comment #5 from Joel Brobecker <brobecker at gnat dot com> ---
Hi Pedro - I am wondering if you meant to change the PR's status to
RESOLVED-FIXED in your latest update?
--
You are receiving this mail because:
You are on the CC list for the bug.
zjz at zjz dot name
2018-06-02 13:09:23 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=22973

--- Comment #6 from Zhang Junzhi <zjz at zjz dot name> ---
(In reply to Joel Brobecker from comment #5)
Post by brobecker at gnat dot com
Hi Pedro - I am wondering if you meant to change the PR's status to
RESOLVED-FIXED in your latest update?
I think it's ready to change the status to RESOLVED-FIXED.
--
You are receiving this mail because:
You are on the CC list for the bug.
palves at redhat dot com
2018-06-02 18:51:52 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=22973

Pedro Alves <palves at redhat dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED

--- Comment #7 from Pedro Alves <palves at redhat dot com> ---
Agreed, I meant to close it but forgot.
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...