omniosorg / omnios-extra

Packages for OmniOS extra
https://omnios.org
Other
26 stars 58 forks source link

gdb has some locale trouble #1348

Closed robertdfrench closed 11 months ago

robertdfrench commented 11 months ago

With gdb 13.2 on r151046, I am get a warning like this as soon as I start debugging a process:

warning: could not convert 'mutex_t' from the host encoding (ISO-8859-1) to UTF-32.
This normally should not happen, please file a bug report.

I am attempting to file a bug report with the GDB folks, but I assume they are going to ask me for information about how it was built for OmniOS. I suspect this is on their end, and not just a packaging issue. There is a lot going on in build/gdb, but I didn't see anything strictly referencing locale or encoding issues. Any wild guesses?

For C programs, this warning does not seem to have any other impact. For Rust programs, it causes Strings to look like this when I do info locals:

(gdb) info locals
greeting = <error reading variable greeting (Converting character sets: Resource temporarily unavailable.)>

For what it's worth, my locale is as follows:

$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_ALL=en_US.UTF-8
robertdfrench commented 11 months ago

alanc said this exists on Solaris 11.4 as well, and I've heard someone else say they saw this crop up on OpenIndiana, so I no longer think this is a result of how gdb is being packaged for OmniOS.

Here is an existing GDB bug report describing the issue: https://sourceware.org/bugzilla/show_bug.cgi?id=29315