From: Eli Zaretskii <eliz@gnu.org>
To: gdb@sourceware.org
Subject: Thread names and non-ASCII characters
Date: Thu, 19 Dec 2019 15:17:00 -0000 [thread overview]
Message-ID: <831rt02vlb.fsf@gnu.org> (raw)
Can someone tell what GDB assumes to be the character encoding used by
thread names we get from the system APIs (such as pthread_getname_np)?
It sounds like we assume the host character set, since the functions
used to display the thread name don't perform any encoding conversion.
Is my understanding correct?
I'm asking because Windows 10 introduces a new API for setting and
getting a thread's name, but this API wants a UTF-16 encoded string,
so if we want to use it, we need to decide from/to what encoding to
convert to/from UTF-16. The current code in windows-nat.c that
processes the special MSVC exception used on older platforms to set
thread names for debugging purposes simply copies the name as an array
of 'char', so it, too, implicitly assumes the host encoding
(a.k.a. "system codepage" in Windows parlance).
Am I missing something?
next reply other threads:[~2019-12-19 15:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-19 15:17 Eli Zaretskii [this message]
2019-12-19 17:22 ` Tom Tromey
2019-12-19 17:55 ` Paul Koning
2019-12-19 18:25 ` Tom Tromey
2019-12-19 19:02 ` Eli Zaretskii
2019-12-19 18:59 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=831rt02vlb.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox